59
+ − 1 Additional information may be available in docs/ or on the website.
+ − 2 For installing on GNU/Linux distributions read docs/linux-distris.
+ − 3
0
+ − 4
59
+ − 5 Installation instructions
+ − 6 -------------------------
+ − 7
+ − 8 To compile masqmail you need glib 1.2 (http://www.gtk.org).
0
+ − 9
+ − 10 You need a user and a group for masqmail to run, I suggest user
+ − 11 'mail' and group 'trusted'. Say:
+ − 12
59
+ − 13 groupadd -g 42 trusted
+ − 14 useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail
0
+ − 15
+ − 16 If you use other names than 'mail' and 'trusted' use the options
+ − 17 described below for configure. The 42 is just a suggestion, you can
+ − 18 use any number you like, but preferably one < 100. It does not have
+ − 19 to be the same for the user 'mail' and the group 'trusted'.
+ − 20
59
+ − 21 Compliling is a matter of the usual procedure. In the source directory,
+ − 22 after unpacking do:
0
+ − 23
59
+ − 24 ./configure
+ − 25 make
+ − 26 make install
0
+ − 27
+ − 28
+ − 29
59
+ − 30 Additional options for configure
+ − 31 --------------------------------
0
+ − 32
59
+ − 33 See the output of
+ − 34
+ − 35 ./configure -h
+ − 36
+ − 37 Here is additional, but maybe obsolete, explanation:
0
+ − 38
+ − 39 --with-user=USER sets the user as which MasqMail will run. Default is
+ − 40 'mail'. USER has to exist before you 'make install'.
+ − 41
+ − 42 --with-group=GROUP sets the group as which MasqMail will run. Default
+ − 43 is 'trusted'. GROUP has to exist before you 'make install'.
+ − 44
+ − 45 --with-logdir=LOGDIR sets the directory where MasqMail stores its log
+ − 46 files. It will be created if it does not exist. Default is /var/masqmail/.
+ − 47
+ − 48 --with-spooldir=SPOOLDIR sets the directory where MasqMail stores its
+ − 49 spool files. It will be created if it does not exist. Default is
+ − 50 /var/spool/masqmail/.
+ − 51
+ − 52 --with-confdir=CONFDIR sets the default configuration directory to
+ − 53 CONFDIR, in case you prefer another location than /etc/masqmail/.
+ − 54
+ − 55 --enable-auth enables ESMTP AUTH support (disabled by default)
+ − 56
163
+ − 57 --enable-pop3 enables pop3 support (disabled by default)
0
+ − 58
+ − 59 --enable-maildir enables qmail style Maildir support (disabled by default)
+ − 60
+ − 61 --enable-ident enable RFC 1413 support. If you have the libident
+ − 62 dynamic library installed, this will be linked, otherwise it will be
+ − 63 statically linked using the sources included in the package.
+ − 64
+ − 65 --disable-resolver disable resolver support. Without the resolver functions,
+ − 66 masqmail uses only gethostbyname() to resolve DNS names, and you cannot send
+ − 67 mail without a smart host. Not recommended. You save 3K at most.
+ − 68
+ − 69 --disable-smtp-server disable SMTP server support. You may want this if you do
+ − 70 not need masqmail to listen. In this case, you cannot use masqmail as a smart
+ − 71 host for other hosts on your LAN, you cannot use mail clients that send SMTP,
+ − 72 you cannot even use pine. In short, use of this option is discouraged unless
+ − 73 your resources are extremely limited.
+ − 74
+ − 75 --with-libcryto instead of using the md5 and hmac functions within the package,
+ − 76 link dynamically with libcrypto. This applies only if you have pop3 or SMTP
+ − 77 AUTH enabled. Makes only sense if your resources are limited and you have
+ − 78 libcrypto installed. Untested.
+ − 79
+ − 80 --with-glib-static link with glib statically. This makes the binary larger
+ − 81 by around 30K (i386 architecture), but if masqmail is the only binary using
+ − 82 glib, you save some space in total, because you do not need the shared glib
+ − 83 library installed.
+ − 84
+ − 85 --disable-debug disable debugging, setting it on by command line or configuration
+ − 86 has no effect. Strongly discouraged, since you miss valuable information if something
+ − 87 goes wrong. You save 6K.
+ − 88
+ − 89 BTW, to get 3K of space, call
+ − 90 strip --remove-section=.comment --remove-section=.note --strip-unneeded src/masqmail
+ − 91
59
+ − 92
+ − 93
0
+ − 94 after make install:
+ − 95 -------------------
+ − 96
+ − 97 You can also use these instructions to omit 'make install' if you do
+ − 98 not want to use it.
+ − 99
+ − 100 Check that 'make install' worked correctly. The following command:
+ − 101
59
+ − 102 ls -ld /usr/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
+ − 103 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/*
0
+ − 104
+ − 105 should give output similar to
+ − 106
59
+ − 107 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/sbin/masqmail
+ − 108 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail
+ − 109 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail
+ − 110 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail
+ − 111 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail
+ − 112 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input
+ − 113 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock
+ − 114 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/popuidl
0
+ − 115
+ − 116 (important is the set-user-id bit for /usr/sbin/masqmail and the
+ − 117 ownership of all items).
+ − 118
+ − 119 Use the example configuration files in examples/ to edit your own. The
59
+ − 120 main configuration file `masqmail.conf' and the *.route and *.get files
+ − 121 should go into /etc/masqmail.
0
+ − 122
59
+ − 123 The default destination for the executable `masqmail' is /usr/sbin.
+ − 124 Check that it has the set-uid bit set. You can set it with:
+ − 125
+ − 126 chmod u+s /usr/sbin/masqmail
0
+ − 127
+ − 128 If you want to replace sendmail, move your old sendmail binary to
59
+ − 129 another name and make a symbolic link:
+ − 130
+ − 131 ln -s /usr/sbin/masqmail /usr/sbin/sendmail
+ − 132
+ − 133 Now every mailer that used to call sendmail will now call masqmail. You
+ − 134 can now kill your old sendmail if it is running and start masqmail.
+ − 135
+ − 136 /sbin/init.d/sendmail restart
+ − 137
+ − 138 should do that. You can also start masqmail with:
+ − 139
+ − 140 /usr/sbin/masqmail -bd -q30m
+ − 141
0
+ − 142
+ − 143
59
+ − 144 Configuring for online delivery
+ − 145 -------------------------------
+ − 146
+ − 147 (This section covers dial-up internet connections.)
+ − 148
+ − 149 Now you have to set up the online configuration. The trick is to tell
+ − 150 your ip-up script the connection name. You could use the IP number of
+ − 151 the far side of the ppp link, but this is a pain and may change each
+ − 152 time. But you can give it an additional argument via pppd with ipparam.
+ − 153 Somewhere in your dial up script you have a line similar to:
+ − 154
+ − 155 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \
+ − 156 -d -d -d user user@somewhere file "$OPTIONS"
+ − 157
+ − 158 Just add 'ipparam FastNet' in the command line for pppd if your ISP has
+ − 159 the name FastNet. The ip-up script will then get 'FastNet' as a sixth
+ − 160 parameter. In your ip-up script you can then call masqmail with
+ − 161
+ − 162 /usr/sbin/masqmail -qo "$6"
+ − 163
+ − 164 instead of 'sendmail -q', if you had that in the script before.
+ − 165 Masqmail will then read the route configuration specified for the
+ − 166 connection name 'FastNet' and deliver the mail destined to the internet.
+ − 167 See the configuration manual on how to write a route configuration or
+ − 168 use one of the examples as a template.
+ − 169
+ − 170 I do not know how do configure that for an ISDN adapter, but I am sure
+ − 171 you will find something similar in the man pages.
+ − 172
+ − 173 If you want mail that is received by masqmail from your local net to be
+ − 174 delivered immediately using the route configuration, you have two
+ − 175 possibilities:
+ − 176
+ − 177 * if you are using the masqdialer system, you just have to set the
92
+ − 178 variables online_detect to pipe and online_pipe to something like
164
+ − 179 /usr/bin/mservdetect localhost 224
+ − 180 if mserver is running on localhost and listens on port 224. See the
92
+ − 181 man page to mservdetect(1).
+ − 182
59
+ − 183 * otherwise you have to add two commands in your ip-up script:
92
+ − 184 echo "$6" >/var/run/masqmail/masqmail-route
+ − 185 chmod 644 /var/run/masqmail/masqmail-route
+ − 186 and you have to remove the file /var/run/masqmail/masqmail-route in
+ − 187 your ip-down script:
+ − 188 rm /var/run/masqmail/masqmail-route
59
+ − 189 Then you have to set online_detect to file and online_file to
92
+ − 190 /var/run/masqmail/masqmail-route
59
+ − 191
+ − 192 See the route documentation for more.
+ − 193
+ − 194
+ − 195
+ − 196 Written by oku.
+ − 197 Updated by meillo.