Mercurial > masqmail
annotate INSTALL @ 434:f2a7271746d1 default tip
Removes Freshmeat.net from the docs
The site, which was later renamed to freecode.com, is no longer
maintained (contains only a static copy).
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 07 Feb 2015 11:45:07 +0100 |
parents | a19e47ebbb33 |
children |
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 | |
425
a19e47ebbb33
Create the spool and log dirs on program startup if missing.
markus schnalke <meillo@marmaro.de>
parents:
422
diff
changeset
|
58 created on program startup if it does not exist. Default is |
a19e47ebbb33
Create the spool and log dirs on program startup if missing.
markus schnalke <meillo@marmaro.de>
parents:
422
diff
changeset
|
59 /var/log/masqmail. |
0 | 60 |
165 | 61 --with-spooldir=SPOOLDIR |
62 sets the directory where masqmail stores its spool files. It will be | |
425
a19e47ebbb33
Create the spool and log dirs on program startup if missing.
markus schnalke <meillo@marmaro.de>
parents:
422
diff
changeset
|
63 created on program startup if it does not exist. Default is |
a19e47ebbb33
Create the spool and log dirs on program startup if missing.
markus schnalke <meillo@marmaro.de>
parents:
422
diff
changeset
|
64 /var/spool/masqmail. |
0 | 65 |
165 | 66 --with-confdir=CONFDIR |
67 sets the default configuration directory to CONFDIR, in case you | |
425
a19e47ebbb33
Create the spool and log dirs on program startup if missing.
markus schnalke <meillo@marmaro.de>
parents:
422
diff
changeset
|
68 prefer another location than /etc/masqmail. |
165 | 69 |
420
09da6e72cd30
Updated INSTALL to the new --with-piddir option.
markus schnalke <meillo@marmaro.de>
parents:
419
diff
changeset
|
70 --with-piddir=PIDDIR |
421
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
71 sets the directory for the pid file of the daemon. The default and usual |
420
09da6e72cd30
Updated INSTALL to the new --with-piddir option.
markus schnalke <meillo@marmaro.de>
parents:
419
diff
changeset
|
72 location is /var/run, but some GNU/Linux distributions have converted |
421
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
73 to /run. It gets created on program startup if missing. |
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
74 |
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
75 --with-lockdir=LOCKDIR |
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
76 sets the default directory for lock file for spooled messages. Default |
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
77 is /var/lock/masqmail. It gets created on program startup if missing. |
420
09da6e72cd30
Updated INSTALL to the new --with-piddir option.
markus schnalke <meillo@marmaro.de>
parents:
419
diff
changeset
|
78 |
0 | 79 |
165 | 80 --disable-resolver |
175 | 81 disables resolver support. Without the resolver functions, masqmail |
165 | 82 uses only gethostbyname() to resolve DNS names, and you cannot send |
83 mail without a smart host. Not recommended. | |
0 | 84 |
364
72653295b75d
Enabled auth support per default
markus schnalke <meillo@marmaro.de>
parents:
363
diff
changeset
|
85 --disable-auth |
72653295b75d
Enabled auth support per default
markus schnalke <meillo@marmaro.de>
parents:
363
diff
changeset
|
86 disables ESMTP AUTH support (enabled by default) |
72653295b75d
Enabled auth support per default
markus schnalke <meillo@marmaro.de>
parents:
363
diff
changeset
|
87 |
0 | 88 |
165 | 89 --disable-debug |
175 | 90 disables debugging; setting it on the command line or in the |
91 configuration has no effect. Strongly discouraged, since you miss | |
92 valuable information if something goes wrong. | |
0 | 93 |
59 | 94 |
95 | |
165 | 96 Checking the installation |
97 ------------------------- | |
0 | 98 |
99 Check that 'make install' worked correctly. The following command: | |
100 | |
195
5beb5d6d9623
There was still a /usr/sbin/masqmail path
meillo@marmaro.de
parents:
194
diff
changeset
|
101 ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \ |
422
bdbedce60247
Remove `input' dir in spool dir. Spooled files are in spool dir directly now.
markus schnalke <meillo@marmaro.de>
parents:
421
diff
changeset
|
102 /var/spool/masqmail/ |
0 | 103 |
104 should give output similar to | |
105 | |
165 | 106 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail |
59 | 107 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
|
108 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
|
109 drwxr-xr-x 5 mail mail 4096 May 10 12:34 /var/spool/masqmail |
0 | 110 |
165 | 111 Important are the set-user-id bit for /usr/local/sbin/masqmail and |
421
f37384470855
Changed lockdir to /var/lock/masqmail; Create lockdir and piddir on startup.
markus schnalke <meillo@marmaro.de>
parents:
420
diff
changeset
|
112 the ownership of the directories. |
165 | 113 |
114 | |
0 | 115 |
165 | 116 Making masqmail the default |
117 --------------------------- | |
0 | 118 |
165 | 119 `sendmail' is the de-facto standard name of the system's MTA, no |
120 matter which MTA actually runs. If you want to make masqmail the | |
185 | 121 system's MTA (i.e. replace sendmail, postfix, etc), make two symbolic |
122 links: | |
59 | 123 |
165 | 124 ln -s /usr/local/sbin/masqmail /usr/lib/sendmail |
185 | 125 ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail |
0 | 126 |
165 | 127 Now every mailer that used to call sendmail will now call masqmail. |
128 If you already had an MTA installed and running, you can kill it and | |
129 start masqmail. Probably with: | |
59 | 130 |
165 | 131 /etc/init.d/sendmail restart |
59 | 132 |
165 | 133 If this doesn't work as expected, you might need to add a special init |
134 script for masqmail. Currently none is distributed with masqmail. | |
135 (Hopefully this will change soon.) Please ask on the mailing list for | |
136 help. | |
59 | 137 |
165 | 138 You can also directly start masqmail as daemon with: |
59 | 139 |
165 | 140 /usr/local/sbin/masqmail -bd -q30m |
59 | 141 |
0 | 142 |
143 | |
165 | 144 Basic Configuration |
145 ------------------- | |
59 | 146 |
165 | 147 The only thing you must configure in order to use masqmail is the |
148 hostname. It's the name under which masqmail operates. In most cases | |
149 it is the same as the machine's name, but it can be different. | |
59 | 150 |
227 | 151 The script `admin/guess-hostname' tries to print the hostname of |
165 | 152 your machine. The first output line is probably the best choice. |
59 | 153 |
165 | 154 Create a minimal config with: |
59 | 155 |
165 | 156 echo "host_name = HOSTNAME" >/etc/masqmail/masqmail.conf |
59 | 157 |
165 | 158 (Substitute `HOSTNAME' with the real value, of course.) |
59 | 159 |
165 | 160 Such a setup (i.e. the default one) does: |
161 - deliver mail locally | |
206
0241aaccfcdb
default listen_addresses: use 127.0.0.1 instead of `localhost'
meillo@marmaro.de
parents:
205
diff
changeset
|
162 - 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
|
163 - 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
|
164 - accept mail on the local port 25 (SMTP) (if started with -bd) |
185 | 165 |
165 | 166 It does not |
185 | 167 - transfer mail to other machines |
165 | 168 - accept mail from outside your machine |
59 | 169 |
92 | 170 |
165 | 171 For more elaborate setups, have a look at docs/*setup and |
172 docs/INSTALL*. You can also take the example configuration files in | |
173 examples/ as basis for your own. Take the man pages masqmail.conf(5) | |
174 and masqmail.route(5) for reference. | |
59 | 175 |
165 | 176 All configuration files should go into /etc/masqmail. |
59 | 177 |
178 | |
179 | |
180 Written by oku. | |
165 | 181 Improved by meillo. |