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