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