masqmail-0.2

annotate INSTALL @ 185:1210d3f1af2b

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