masqmail-0.2

annotate INSTALL @ 157:d56914eb9f75

added a development helper script to update the date and version in man pages
author meillo@marmaro.de
date Wed, 14 Jul 2010 20:52:37 +0200
parents 10d00e3235f2
children 949ccc02eecf
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@59 106 ls -ld /usr/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@59 111 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/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@0 120 (important is the set-user-id bit for /usr/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@59 127 The default destination for the executable `masqmail' is /usr/sbin.
meillo@59 128 Check that it has the set-uid bit set. You can set it with:
meillo@59 129
meillo@59 130 chmod u+s /usr/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@59 135 ln -s /usr/sbin/masqmail /usr/sbin/sendmail
meillo@0 136
meillo@59 137 Now every mailer that used to call sendmail will now call masqmail. You
meillo@59 138 can now kill your old sendmail if it is running and start masqmail.
meillo@59 139
meillo@59 140 /sbin/init.d/sendmail restart
meillo@59 141
meillo@59 142 should do that. You can also start masqmail with:
meillo@59 143
meillo@59 144 /usr/sbin/masqmail -bd -q30m
meillo@59 145
meillo@59 146
meillo@59 147
meillo@59 148 Configuring for online delivery
meillo@59 149 -------------------------------
meillo@59 150
meillo@59 151 (This section covers dial-up internet connections.)
meillo@59 152
meillo@59 153 Now you have to set up the online configuration. The trick is to tell
meillo@59 154 your ip-up script the connection name. You could use the IP number of
meillo@59 155 the far side of the ppp link, but this is a pain and may change each
meillo@59 156 time. But you can give it an additional argument via pppd with ipparam.
meillo@59 157 Somewhere in your dial up script you have a line similar to:
meillo@59 158
meillo@59 159 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \
meillo@59 160 -d -d -d user user@somewhere file "$OPTIONS"
meillo@59 161
meillo@59 162 Just add 'ipparam FastNet' in the command line for pppd if your ISP has
meillo@59 163 the name FastNet. The ip-up script will then get 'FastNet' as a sixth
meillo@59 164 parameter. In your ip-up script you can then call masqmail with
meillo@59 165
meillo@59 166 /usr/sbin/masqmail -qo "$6"
meillo@59 167
meillo@59 168 instead of 'sendmail -q', if you had that in the script before.
meillo@59 169 Masqmail will then read the route configuration specified for the
meillo@59 170 connection name 'FastNet' and deliver the mail destined to the internet.
meillo@59 171 See the configuration manual on how to write a route configuration or
meillo@59 172 use one of the examples as a template.
meillo@59 173
meillo@59 174 I do not know how do configure that for an ISDN adapter, but I am sure
meillo@59 175 you will find something similar in the man pages.
meillo@59 176
meillo@59 177 If you want mail that is received by masqmail from your local net to be
meillo@59 178 delivered immediately using the route configuration, you have two
meillo@59 179 possibilities:
meillo@59 180
meillo@59 181 * if you are using the masqdialer system, you just have to set the
meillo@92 182 variables online_detect to pipe and online_pipe to something like
meillo@92 183 /usr/bin/mservdetect localhost 222
meillo@92 184 if mserver is running on localhost and listens on port 222. See the
meillo@92 185 man page to mservdetect(1).
meillo@92 186
meillo@59 187 * otherwise you have to add two commands in your ip-up script:
meillo@92 188 echo "$6" >/var/run/masqmail/masqmail-route
meillo@92 189 chmod 644 /var/run/masqmail/masqmail-route
meillo@92 190 and you have to remove the file /var/run/masqmail/masqmail-route in
meillo@92 191 your ip-down script:
meillo@92 192 rm /var/run/masqmail/masqmail-route
meillo@59 193 Then you have to set online_detect to file and online_file to
meillo@92 194 /var/run/masqmail/masqmail-route
meillo@59 195
meillo@59 196 See the route documentation for more.
meillo@59 197
meillo@59 198
meillo@59 199
meillo@59 200 Written by oku.
meillo@59 201 Updated by meillo.