masqmail-0.2

annotate INSTALL @ 75:257a9e6d1a8e

fixed correct processing of mails with data lines longer 4096 chars Mail messages with lines longer than 4096 chars were already read correctly, i.e. the spool files were correct. This commit fixes the reading of spool files with long lines. The old behavior was that the message body was truncated right before the first line longer 4096 chars. The number comes from MAX_DATALINE.
author meillo@marmaro.de
date Wed, 16 Jun 2010 19:06:34 +0200
parents 08114f7dcc23
children 10d00e3235f2
rev   line source
meillo@59 1 Additional information may be available in docs/ or on the website.
meillo@59 2 For installing on GNU/Linux distributions read docs/linux-distris.
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@59 21 Compliling 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@0 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@0 61 --enable-ident enable 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@0 65 --disable-resolver disable 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@0 69 --disable-smtp-server disable 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@0 75 --enable-mserver enable 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@0 79 link dynamically with libcrypto. This applies only if you have pop3 or SMTP
meillo@0 80 AUTH enabled. Makes only sense if your resources are limited and you have
meillo@0 81 libcrypto installed. Untested.
meillo@0 82
meillo@0 83 --with-glib-static link 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@0 88 --disable-debug disable debugging, setting it on by command line or configuration
meillo@0 89 has no effect. Strongly discouraged, since you miss valuable information if something
meillo@0 90 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@0 94
meillo@59 95
meillo@59 96
meillo@0 97 after make install:
meillo@0 98 -------------------
meillo@0 99
meillo@0 100 You can also use these instructions to omit 'make install' if you do
meillo@0 101 not want to use it.
meillo@0 102
meillo@0 103 Check that 'make install' worked correctly. The following command:
meillo@0 104
meillo@59 105 ls -ld /usr/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
meillo@59 106 /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/*
meillo@0 107
meillo@0 108 should give output similar to
meillo@0 109
meillo@59 110 -rwsr-xr-x 1 root root 399356 May 10 12:34 /usr/sbin/masqmail
meillo@59 111 drwxr-xr-x 2 root root 4096 May 10 12:34 /etc/masqmail
meillo@59 112 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/log/masqmail
meillo@59 113 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/run/masqmail
meillo@59 114 drwxr-xr-x 5 mail trusted 4096 May 10 12:34 /var/spool/masqmail
meillo@59 115 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/input
meillo@59 116 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/lock
meillo@59 117 drwxr-xr-x 2 mail trusted 4096 May 10 12:34 /var/spool/masqmail/popuidl
meillo@0 118
meillo@0 119 (important is the set-user-id bit for /usr/sbin/masqmail and the
meillo@0 120 ownership of all items).
meillo@0 121
meillo@0 122 Use the example configuration files in examples/ to edit your own. The
meillo@59 123 main configuration file `masqmail.conf' and the *.route and *.get files
meillo@59 124 should go into /etc/masqmail.
meillo@0 125
meillo@59 126 The default destination for the executable `masqmail' is /usr/sbin.
meillo@59 127 Check that it has the set-uid bit set. You can set it with:
meillo@59 128
meillo@59 129 chmod u+s /usr/sbin/masqmail
meillo@0 130
meillo@0 131 If you want to replace sendmail, move your old sendmail binary to
meillo@59 132 another name and make a symbolic link:
meillo@0 133
meillo@59 134 ln -s /usr/sbin/masqmail /usr/sbin/sendmail
meillo@0 135
meillo@59 136 Now every mailer that used to call sendmail will now call masqmail. You
meillo@59 137 can now kill your old sendmail if it is running and start masqmail.
meillo@59 138
meillo@59 139 /sbin/init.d/sendmail restart
meillo@59 140
meillo@59 141 should do that. You can also start masqmail with:
meillo@59 142
meillo@59 143 /usr/sbin/masqmail -bd -q30m
meillo@59 144
meillo@59 145
meillo@59 146
meillo@59 147 Configuring for online delivery
meillo@59 148 -------------------------------
meillo@59 149
meillo@59 150 (This section covers dial-up internet connections.)
meillo@59 151
meillo@59 152 Now you have to set up the online configuration. The trick is to tell
meillo@59 153 your ip-up script the connection name. You could use the IP number of
meillo@59 154 the far side of the ppp link, but this is a pain and may change each
meillo@59 155 time. But you can give it an additional argument via pppd with ipparam.
meillo@59 156 Somewhere in your dial up script you have a line similar to:
meillo@59 157
meillo@59 158 /usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \
meillo@59 159 -d -d -d user user@somewhere file "$OPTIONS"
meillo@59 160
meillo@59 161 Just add 'ipparam FastNet' in the command line for pppd if your ISP has
meillo@59 162 the name FastNet. The ip-up script will then get 'FastNet' as a sixth
meillo@59 163 parameter. In your ip-up script you can then call masqmail with
meillo@59 164
meillo@59 165 /usr/sbin/masqmail -qo "$6"
meillo@59 166
meillo@59 167 instead of 'sendmail -q', if you had that in the script before.
meillo@59 168 Masqmail will then read the route configuration specified for the
meillo@59 169 connection name 'FastNet' and deliver the mail destined to the internet.
meillo@59 170 See the configuration manual on how to write a route configuration or
meillo@59 171 use one of the examples as a template.
meillo@59 172
meillo@59 173 I do not know how do configure that for an ISDN adapter, but I am sure
meillo@59 174 you will find something similar in the man pages.
meillo@59 175
meillo@59 176 If you want mail that is received by masqmail from your local net to be
meillo@59 177 delivered immediately using the route configuration, you have two
meillo@59 178 possibilities:
meillo@59 179
meillo@59 180 * if you are using the masqdialer system, you just have to set the
meillo@59 181 variables online_detect to mserver and mserver_iface to the interface
meillo@59 182 mserver is listening to.
meillo@59 183 * otherwise you have to add two commands in your ip-up script:
meillo@59 184 echo -n $6 > /tmp/connect_route
meillo@59 185 chmod 644 /tmp/connect_route
meillo@59 186 and you have to remove the file /tmp/connect_route in your ip-down script:
meillo@59 187 rm /tmp/connect_route.
meillo@59 188 Then you have to set online_detect to file and online_file to
meillo@59 189 /tmp/connect_route.
meillo@59 190
meillo@59 191 See the route documentation for more.
meillo@59 192
meillo@59 193
meillo@59 194
meillo@59 195 Written by oku.
meillo@59 196 Updated by meillo.