rev |
line source |
meillo@59
|
1 Additional information may be available in docs/ or on the website.
|
meillo@174
|
2 For installing on GNU/Linux distributions read docs/INSTALL.linux.
|
meillo@0
|
3
|
meillo@59
|
4
|
meillo@59
|
5 Installation instructions
|
meillo@59
|
6 -------------------------
|
meillo@59
|
7
|
meillo@165
|
8 To compile masqmail you need glib (>= 1.2) (http://www.gtk.org). Your
|
meillo@181
|
9 distribution probably provides it. Glib-2.0 works out of the box, for
|
meillo@181
|
10 glib-1.2, you need to adjust configure.ac. See the comment in there.
|
meillo@0
|
11
|
meillo@165
|
12 You need a user and a group for masqmail to run. If
|
meillo@165
|
13
|
meillo@165
|
14 grep '^mail:' /etc/passwd
|
meillo@165
|
15 grep '^trusted:' /etc/group
|
meillo@165
|
16
|
meillo@165
|
17 shows that the user `mail' and the group `trusted' exist, it's
|
meillo@165
|
18 probably best to use these. If they don't exist, create them:
|
meillo@0
|
19
|
meillo@59
|
20 groupadd -g 42 trusted
|
meillo@194
|
21 useradd -u 23 -g trusted -d /nonexistent -s /bin/false -c "masqmail MTA" mail
|
meillo@0
|
22
|
meillo@165
|
23 If you use other names than `mail' and `trusted' use the options
|
meillo@165
|
24 described below for configure. The 23 and 42 are just a suggestion,
|
meillo@165
|
25 you can use any (not yet used) number you like, but preferably one
|
meillo@165
|
26 lower than 100. It does not have to be the same for the user `mail'
|
meillo@165
|
27 and the group `trusted'.
|
meillo@165
|
28
|
meillo@0
|
29
|
meillo@174
|
30 Compiling is a matter of the usual procedure. In the source directory,
|
meillo@59
|
31 after unpacking do:
|
meillo@0
|
32
|
meillo@59
|
33 ./configure
|
meillo@59
|
34 make
|
meillo@59
|
35 make install
|
meillo@0
|
36
|
meillo@0
|
37
|
meillo@0
|
38
|
meillo@59
|
39 Additional options for configure
|
meillo@59
|
40 --------------------------------
|
meillo@0
|
41
|
meillo@59
|
42 See the output of
|
meillo@0
|
43
|
meillo@59
|
44 ./configure -h
|
meillo@0
|
45
|
meillo@165
|
46 Here is a selection of the options with additional explanations:
|
meillo@0
|
47
|
meillo@165
|
48 --with-user=USER
|
meillo@165
|
49 sets the user as which masqmail will run. Default is 'mail'. USER has
|
meillo@165
|
50 to exist before you 'make install'.
|
meillo@0
|
51
|
meillo@165
|
52 --with-group=GROUP
|
meillo@165
|
53 sets the group as which masqmail will run. Default is 'trusted'. GROUP
|
meillo@165
|
54 has to exist before you 'make install'.
|
meillo@0
|
55
|
meillo@0
|
56
|
meillo@165
|
57 --with-logdir=LOGDIR
|
meillo@165
|
58 sets the directory where masqmail stores its log files. It will be
|
meillo@165
|
59 created if it does not exist. Default is /var/log/masqmail/.
|
meillo@0
|
60
|
meillo@165
|
61 --with-spooldir=SPOOLDIR
|
meillo@165
|
62 sets the directory where masqmail stores its spool files. It will be
|
meillo@165
|
63 created if it does not exist. Default is /var/spool/masqmail/.
|
meillo@0
|
64
|
meillo@165
|
65 --with-confdir=CONFDIR
|
meillo@165
|
66 sets the default configuration directory to CONFDIR, in case you
|
meillo@165
|
67 prefer another location than /etc/masqmail/.
|
meillo@0
|
68
|
meillo@0
|
69
|
meillo@165
|
70 --enable-auth
|
meillo@165
|
71 enables ESMTP AUTH support (disabled by default)
|
meillo@0
|
72
|
meillo@165
|
73 --enable-maildir
|
meillo@165
|
74 enables qmail style Maildir support (disabled by default)
|
meillo@0
|
75
|
meillo@165
|
76 --enable-ident
|
meillo@175
|
77 enables RFC 1413 support. If you have the libident dynamic library
|
meillo@165
|
78 installed, this will be linked, otherwise it will be statically linked
|
meillo@165
|
79 using the sources included in the package.
|
meillo@0
|
80
|
meillo@165
|
81 --disable-resolver
|
meillo@175
|
82 disables resolver support. Without the resolver functions, masqmail
|
meillo@165
|
83 uses only gethostbyname() to resolve DNS names, and you cannot send
|
meillo@165
|
84 mail without a smart host. Not recommended.
|
meillo@0
|
85
|
meillo@165
|
86 --disable-smtp-server
|
meillo@175
|
87 disables SMTP server support. You may want this if you do not need
|
meillo@165
|
88 masqmail to listen. In this case, you cannot use masqmail as a smart
|
meillo@165
|
89 host for other hosts on your LAN, you cannot use mail clients that
|
meillo@165
|
90 send SMTP, you cannot even use pine. In short, use of this option is
|
meillo@165
|
91 discouraged unless your resources are extremely limited.
|
meillo@0
|
92
|
meillo@165
|
93
|
meillo@165
|
94 --with-libcryto
|
meillo@165
|
95 instead of using the md5 and hmac functions within the package, link
|
meillo@192
|
96 dynamically with libcrypto. This applies only if you have SMTP AUTH
|
meillo@192
|
97 enabled. Only makes sense if your resources are limited and you have
|
meillo@192
|
98 libcrypto installed. Untested.
|
meillo@165
|
99
|
meillo@0
|
100
|
meillo@165
|
101 --disable-debug
|
meillo@175
|
102 disables debugging; setting it on the command line or in the
|
meillo@175
|
103 configuration has no effect. Strongly discouraged, since you miss
|
meillo@175
|
104 valuable information if something goes wrong.
|
meillo@0
|
105
|
meillo@59
|
106
|
meillo@59
|
107
|
meillo@165
|
108 Checking the installation
|
meillo@165
|
109 -------------------------
|
meillo@0
|
110
|
meillo@0
|
111 Check that 'make install' worked correctly. The following command:
|
meillo@0
|
112
|
meillo@195
|
113 ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
|
meillo@174
|
114 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/*
|
meillo@0
|
115
|
meillo@0
|
116 should give output similar to
|
meillo@0
|
117
|
meillo@165
|
118 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail
|
meillo@59
|
119 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail
|
meillo@59
|
120 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail
|
meillo@59
|
121 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail
|
meillo@59
|
122 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail
|
meillo@59
|
123 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input
|
meillo@59
|
124 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock
|
meillo@0
|
125
|
meillo@165
|
126 Important are the set-user-id bit for /usr/local/sbin/masqmail and
|
meillo@165
|
127 the permissions of all files.
|
meillo@0
|
128
|
meillo@0
|
129
|
meillo@59
|
130
|
meillo@165
|
131 Making masqmail the default
|
meillo@165
|
132 ---------------------------
|
meillo@0
|
133
|
meillo@165
|
134 `sendmail' is the de-facto standard name of the system's MTA, no
|
meillo@165
|
135 matter which MTA actually runs. If you want to make masqmail the
|
meillo@185
|
136 system's MTA (i.e. replace sendmail, postfix, etc), make two symbolic
|
meillo@185
|
137 links:
|
meillo@0
|
138
|
meillo@165
|
139 ln -s /usr/local/sbin/masqmail /usr/lib/sendmail
|
meillo@185
|
140 ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail
|
meillo@0
|
141
|
meillo@165
|
142 Now every mailer that used to call sendmail will now call masqmail.
|
meillo@165
|
143 If you already had an MTA installed and running, you can kill it and
|
meillo@165
|
144 start masqmail. Probably with:
|
meillo@59
|
145
|
meillo@165
|
146 /etc/init.d/sendmail restart
|
meillo@59
|
147
|
meillo@165
|
148 If this doesn't work as expected, you might need to add a special init
|
meillo@165
|
149 script for masqmail. Currently none is distributed with masqmail.
|
meillo@165
|
150 (Hopefully this will change soon.) Please ask on the mailing list for
|
meillo@165
|
151 help.
|
meillo@59
|
152
|
meillo@165
|
153 You can also directly start masqmail as daemon with:
|
meillo@59
|
154
|
meillo@165
|
155 /usr/local/sbin/masqmail -bd -q30m
|
meillo@59
|
156
|
meillo@59
|
157
|
meillo@59
|
158
|
meillo@165
|
159 Basic Configuration
|
meillo@165
|
160 -------------------
|
meillo@59
|
161
|
meillo@165
|
162 The only thing you must configure in order to use masqmail is the
|
meillo@165
|
163 hostname. It's the name under which masqmail operates. In most cases
|
meillo@165
|
164 it is the same as the machine's name, but it can be different.
|
meillo@59
|
165
|
meillo@165
|
166 The script `contrib/guess-hostname' tries to print the hostname of
|
meillo@165
|
167 your machine. The first output line is probably the best choice.
|
meillo@59
|
168
|
meillo@165
|
169 Create a minimal config with:
|
meillo@59
|
170
|
meillo@165
|
171 echo "host_name = HOSTNAME" >/etc/masqmail/masqmail.conf
|
meillo@59
|
172
|
meillo@165
|
173 (Substitute `HOSTNAME' with the real value, of course.)
|
meillo@59
|
174
|
meillo@165
|
175 Such a setup (i.e. the default one) does:
|
meillo@165
|
176 - deliver mail locally
|
meillo@165
|
177 - accept mail from local (via stdin)
|
meillo@185
|
178 - accept mail on localhost:25 (via SMTP) (if started as daemon)
|
meillo@185
|
179
|
meillo@165
|
180 It does not
|
meillo@185
|
181 - transfer mail to other machines
|
meillo@165
|
182 - accept mail from outside your machine
|
meillo@59
|
183
|
meillo@59
|
184
|
meillo@165
|
185 For more elaborate setups, have a look at docs/*setup and
|
meillo@165
|
186 docs/INSTALL*. You can also take the example configuration files in
|
meillo@165
|
187 examples/ as basis for your own. Take the man pages masqmail.conf(5)
|
meillo@165
|
188 and masqmail.route(5) for reference.
|
meillo@92
|
189
|
meillo@165
|
190 All configuration files should go into /etc/masqmail.
|
meillo@59
|
191
|
meillo@59
|
192
|
meillo@59
|
193
|
meillo@59
|
194 Written by oku.
|
meillo@165
|
195 Improved by meillo.
|