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