masqmail

annotate INSTALL @ 178:91f8ee6514f5

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