masqmail

view INSTALL @ 284:4869321aa7bf

recognize the program name `newaliases' too We still simply exit in this mode, but now we can create a link called `newaliases' to masqmail instead of needing a script to call `masqmail -bi'. `ln /bin/true /usr/bin/newaliases' would be a fancy way too, but letting the MTA handle it is probably the safer approach.
author markus schnalke <meillo@marmaro.de>
date Tue, 07 Dec 2010 17:09:07 -0300
parents 0241aaccfcdb
children 92340177150d
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 trusted -d /nonexistent -s /bin/false -c "masqmail MTA" 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-ident
74 enables RFC 1413 support. If you have the libident dynamic library
75 installed, this will be linked, otherwise it will be statically linked
76 using the sources included in the package.
78 --disable-resolver
79 disables resolver support. Without the resolver functions, masqmail
80 uses only gethostbyname() to resolve DNS names, and you cannot send
81 mail without a smart host. Not recommended.
84 --with-libcryto
85 instead of using the md5 and hmac functions within the package, link
86 dynamically with libcrypto. This applies only if you have SMTP AUTH
87 enabled. Only makes sense if your resources are limited and you have
88 libcrypto installed. Untested.
91 --disable-debug
92 disables debugging; setting it on the command line or in the
93 configuration has no effect. Strongly discouraged, since you miss
94 valuable information if something goes wrong.
98 Checking the installation
99 -------------------------
101 Check that 'make install' worked correctly. The following command:
103 ls -ld /usr/local/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
104 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/*
106 should give output similar to
108 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/local/sbin/masqmail
109 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail
110 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail
111 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail
112 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail
113 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input
114 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock
116 Important are the set-user-id bit for /usr/local/sbin/masqmail and
117 the permissions of all files.
121 Making masqmail the default
122 ---------------------------
124 `sendmail' is the de-facto standard name of the system's MTA, no
125 matter which MTA actually runs. If you want to make masqmail the
126 system's MTA (i.e. replace sendmail, postfix, etc), make two symbolic
127 links:
129 ln -s /usr/local/sbin/masqmail /usr/lib/sendmail
130 ln -s /usr/local/sbin/masqmail /usr/sbin/sendmail
132 Now every mailer that used to call sendmail will now call masqmail.
133 If you already had an MTA installed and running, you can kill it and
134 start masqmail. Probably with:
136 /etc/init.d/sendmail restart
138 If this doesn't work as expected, you might need to add a special init
139 script for masqmail. Currently none is distributed with masqmail.
140 (Hopefully this will change soon.) Please ask on the mailing list for
141 help.
143 You can also directly start masqmail as daemon with:
145 /usr/local/sbin/masqmail -bd -q30m
149 Basic Configuration
150 -------------------
152 The only thing you must configure in order to use masqmail is the
153 hostname. It's the name under which masqmail operates. In most cases
154 it is the same as the machine's name, but it can be different.
156 The script `admin/guess-hostname' tries to print the hostname of
157 your machine. The first output line is probably the best choice.
159 Create a minimal config with:
161 echo "host_name = HOSTNAME" >/etc/masqmail/masqmail.conf
163 (Substitute `HOSTNAME' with the real value, of course.)
165 Such a setup (i.e. the default one) does:
166 - deliver mail locally
167 - accept mail on stdin (plain text)
168 - accept mail on stdin (SMTP) (if started with -bs)
169 - accept mail on the local port 25 (SMTP) (if started with -bd)
171 It does not
172 - transfer mail to other machines
173 - accept mail from outside your machine
176 For more elaborate setups, have a look at docs/*setup and
177 docs/INSTALL*. You can also take the example configuration files in
178 examples/ as basis for your own. Take the man pages masqmail.conf(5)
179 and masqmail.route(5) for reference.
181 All configuration files should go into /etc/masqmail.
185 Written by oku.
186 Improved by meillo.