masqmail

view INSTALL @ 192:89f951be358f

REMOVED POP3 SUPPORT masqmail will not include a POP3 client anymore from 0.3.0 on maybe the POP3 code will be reworked into a standalone program some day if you rely on the POP3 client, use fetchmail or something similar instead
author meillo@marmaro.de
date Thu, 15 Jul 2010 14:24:40 +0200
parents b6fc62ea6058
children 346955794084
line source
1 Additional information may be available in docs/ or on the website.
2 For installing on GNU/Linux distributions read docs/INSTALL.linux.
5 Installation instructions
6 -------------------------
8 To compile masqmail you need glib (>= 1.2) (http://www.gtk.org). Your
9 distribution probably provides it. Glib-2.0 works out of the box, for
10 glib-1.2, you need to adjust configure.ac. See the comment in there.
12 You need a user and a group for masqmail to run. If
14 grep '^mail:' /etc/passwd
15 grep '^trusted:' /etc/group
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:
20 groupadd -g 42 trusted
21 useradd -u 23 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail
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'.
30 Compiling is a matter of the usual procedure. In the source directory,
31 after unpacking do:
33 ./configure
34 make
35 make install
39 Additional options for configure
40 --------------------------------
42 See the output of
44 ./configure -h
46 Here is a selection of the options with additional explanations:
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'.
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'.
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/.
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/.
65 --with-confdir=CONFDIR
66 sets the default configuration directory to CONFDIR, in case you
67 prefer another location than /etc/masqmail/.
70 --enable-auth
71 enables ESMTP AUTH support (disabled by default)
73 --enable-maildir
74 enables qmail style Maildir support (disabled by default)
76 --enable-ident
77 enables RFC 1413 support. If you have the libident dynamic library
78 installed, this will be linked, otherwise it will be statically linked
79 using the sources included in the package.
81 --disable-resolver
82 disables resolver support. Without the resolver functions, masqmail
83 uses only gethostbyname() to resolve DNS names, and you cannot send
84 mail without a smart host. Not recommended.
86 --disable-smtp-server
87 disables SMTP server support. You may want this if you do not need
88 masqmail to listen. In this case, you cannot use masqmail as a smart
89 host for other hosts on your LAN, you cannot use mail clients that
90 send SMTP, you cannot even use pine. In short, use of this option is
91 discouraged unless your resources are extremely limited.
94 --with-libcryto
95 instead of using the md5 and hmac functions within the package, link
96 dynamically with libcrypto. This applies only if you have SMTP AUTH
97 enabled. Only makes sense if your resources are limited and you have
98 libcrypto installed. Untested.
100 --with-glib-static
101 links with glib statically. This makes the binary larger by around 30K
102 (i386 architecture), but if masqmail is the only binary using glib,
103 you save some space in total, because you do not need the shared glib
104 library installed.
107 --disable-debug
108 disables debugging; setting it on the command line or in the
109 configuration has no effect. Strongly discouraged, since you miss
110 valuable information if something goes wrong.
114 Checking the installation
115 -------------------------
117 Check that 'make install' worked correctly. The following command:
119 ls -ld /usr/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
120 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/*
122 should give output similar to
124 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail
125 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail
126 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail
127 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail
128 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail
129 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input
130 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock
132 Important are the set-user-id bit for /usr/local/sbin/masqmail and
133 the permissions of all files.
137 Making masqmail the default
138 ---------------------------
140 `sendmail' is the de-facto standard name of the system's MTA, no
141 matter which MTA actually runs. If you want to make masqmail the
142 system's MTA (i.e. replace sendmail, postfix, etc), make two symbolic
143 links:
145 ln -s /usr/local/sbin/masqmail /usr/lib/sendmail
146 ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail
148 Now every mailer that used to call sendmail will now call masqmail.
149 If you already had an MTA installed and running, you can kill it and
150 start masqmail. Probably with:
152 /etc/init.d/sendmail restart
154 If this doesn't work as expected, you might need to add a special init
155 script for masqmail. Currently none is distributed with masqmail.
156 (Hopefully this will change soon.) Please ask on the mailing list for
157 help.
159 You can also directly start masqmail as daemon with:
161 /usr/local/sbin/masqmail -bd -q30m
165 Basic Configuration
166 -------------------
168 The only thing you must configure in order to use masqmail is the
169 hostname. It's the name under which masqmail operates. In most cases
170 it is the same as the machine's name, but it can be different.
172 The script `contrib/guess-hostname' tries to print the hostname of
173 your machine. The first output line is probably the best choice.
175 Create a minimal config with:
177 echo "host_name = HOSTNAME" >/etc/masqmail/masqmail.conf
179 (Substitute `HOSTNAME' with the real value, of course.)
181 Such a setup (i.e. the default one) does:
182 - deliver mail locally
183 - accept mail from local (via stdin)
184 - accept mail on localhost:25 (via SMTP) (if started as daemon)
186 It does not
187 - transfer mail to other machines
188 - accept mail from outside your machine
191 For more elaborate setups, have a look at docs/*setup and
192 docs/INSTALL*. You can also take the example configuration files in
193 examples/ as basis for your own. Take the man pages masqmail.conf(5)
194 and masqmail.route(5) for reference.
196 All configuration files should go into /etc/masqmail.
200 Written by oku.
201 Improved by meillo.