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