masqmail

diff INSTALL @ 59:941413084f56

updated docs; moved files around updated the INSTALL file with content from the old website moved *agenda* and *ipaq files to docs (are they still relevant?)
author meillo@marmaro.de
date Sat, 29 May 2010 22:53:42 +0200
parents 08114f7dcc23
children 10d00e3235f2
line diff
     1.1 --- a/INSTALL	Sat May 29 22:33:10 2010 +0200
     1.2 +++ b/INSTALL	Sat May 29 22:53:42 2010 +0200
     1.3 @@ -1,46 +1,40 @@
     1.4 -simple installation instructions, see docs/install.html for more.
     1.5 +Additional information may be available in docs/ or on the website.
     1.6 +For installing on GNU/Linux distributions read docs/linux-distris.
     1.7  
     1.8 -To compile MasqMail you need glib 1.2 (http://www.gtk.org).
     1.9 +
    1.10 +Installation instructions
    1.11 +-------------------------
    1.12 +
    1.13 +To compile masqmail you need glib 1.2 (http://www.gtk.org).
    1.14  
    1.15  You need a user and a group for masqmail to run, I suggest user
    1.16  'mail' and group 'trusted'. Say:
    1.17  
    1.18 -groupadd -g 42 trusted
    1.19 -useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail
    1.20 +	groupadd -g 42 trusted
    1.21 +	useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail
    1.22  
    1.23  If you use other names than 'mail' and 'trusted' use the options
    1.24  described below for configure. The 42 is just a suggestion, you can
    1.25  use any number you like, but preferably one < 100. It does not have
    1.26  to be the same for the user 'mail' and the group 'trusted'.
    1.27  
    1.28 -Then do:
    1.29 +Compliling is a matter of the usual procedure. In the source directory,
    1.30 +after unpacking do:
    1.31  
    1.32 -./configure
    1.33 -make
    1.34 -make install
    1.35 +	./configure
    1.36 +	make
    1.37 +	make install
    1.38  
    1.39 -Debian:
    1.40 -If you compile for Debian, do the configure with at least these options,
    1.41 -this makes it compatible with the official debian package:
    1.42 -./configure --with-liblockfile --with-group=mail
    1.43 -you do not need the group 'trusted', use 'mail' instead.
    1.44  
    1.45 -You can also build your own Debian package with
    1.46 -dpkg-buildpackage -rfakeroot
    1.47 -You need to have fakeroot installed to do this. Or, as root, do:
    1.48 -dpkg-buildpackage
    1.49  
    1.50 -SuSE/Redhat:
    1.51 -There are spec files for rpm creation in suse/ or redhat/. You may have to adjust these files.
    1.52 +Additional options for configure
    1.53 +--------------------------------
    1.54  
    1.55 +See the output of
    1.56  
    1.57 -Sorry, but after that you are not yet finished. For instruction on how
    1.58 -to deliver mail using a connection to your ISP see
    1.59 -docs/install.html. It is probably a good idea to copy the files
    1.60 -docs/*.html to a directory where you can access them with a browser.
    1.61 +	./configure -h
    1.62  
    1.63 -additional options for configure:
    1.64 ----------------------------------
    1.65 +Here is additional, but maybe obsolete, explanation:
    1.66  
    1.67  --with-user=USER sets the user as which MasqMail will run. Default is
    1.68  'mail'. USER has to exist before you 'make install'.
    1.69 @@ -98,6 +92,8 @@
    1.70  BTW, to get 3K of space, call
    1.71  strip --remove-section=.comment --remove-section=.note --strip-unneeded src/masqmail
    1.72  
    1.73 +
    1.74 +
    1.75  after make install:
    1.76  -------------------
    1.77  
    1.78 @@ -106,30 +102,95 @@
    1.79  
    1.80  Check that 'make install' worked correctly. The following command:
    1.81  
    1.82 -ls -ld /usr/sbin/masqmail /var/masqmail/ /var/spool/masqmail /var/spool/masqmail/input
    1.83 +	ls -ld /usr/sbin/masqmail /etc/masqmail /var/log/masqmail/ \
    1.84 +	       /var/run/masqmail /var/spool/masqmail/ /var/spool/masqmail/* 
    1.85  
    1.86  should give output similar to
    1.87  
    1.88 --rwsr-xr-x   1 root     root        86955 Oct 14 14:27 /usr/sbin/masqmail
    1.89 -drwxr-xr-x   2 mail     trusted      1024 Oct 14 14:29 /var/masqmail/
    1.90 -drwxr-xr-x   3 mail     trusted      1024 Oct 14 14:27 /var/spool/masqmail
    1.91 -drwxr-xr-x   2 mail     trusted      1024 Oct 14 18:32 /var/spool/masqmail/input
    1.92 -drwxr-xr-x   2 mail     trusted      1024 Oct 14 18:32 /var/spool/masqmail/lock
    1.93 -drwxr-xr-x   2 mail     trusted      1024 Oct 14 18:32 /var/spool/masqmail/popuidl
    1.94 +	-rwsr-xr-x 1 root root    399356 May 10 12:34 /usr/sbin/masqmail
    1.95 +	drwxr-xr-x 2 root root      4096 May 10 12:34 /etc/masqmail
    1.96 +	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/log/masqmail
    1.97 +	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/run/masqmail
    1.98 +	drwxr-xr-x 5 mail trusted   4096 May 10 12:34 /var/spool/masqmail
    1.99 +	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/input
   1.100 +	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/lock
   1.101 +	drwxr-xr-x 2 mail trusted   4096 May 10 12:34 /var/spool/masqmail/popuidl
   1.102  
   1.103  (important is the set-user-id bit for /usr/sbin/masqmail and the
   1.104  ownership of all items).
   1.105  
   1.106  Use the example configuration files in examples/ to edit your own. The
   1.107 -main configuration should go to /etc/masqmail.conf. I recommend to
   1.108 -make a directory /etc/masqmail for the *.route amd *.get files.
   1.109 +main configuration file `masqmail.conf' and the *.route and *.get files
   1.110 +should go into /etc/masqmail.
   1.111  
   1.112 -The default destination for the executable 'masqmail' is
   1.113 -/usr/sbin. Check that it has the set user id bit set. (chmod u+s
   1.114 -/usr/sbin/masqmail does no harm in any case).
   1.115 +The default destination for the executable `masqmail' is /usr/sbin.
   1.116 +Check that it has the set-uid bit set. You can set it with:
   1.117 +
   1.118 +	chmod u+s /usr/sbin/masqmail
   1.119  
   1.120  If you want to replace sendmail, move your old sendmail binary to
   1.121 -another name and make a symbolic link /usr/sbin/sendmail ->
   1.122 -/usr/sbin/masqmail.
   1.123 +another name and make a symbolic link:
   1.124  
   1.125 +	ln -s /usr/sbin/masqmail /usr/sbin/sendmail
   1.126  
   1.127 +Now every mailer that used to call sendmail will now call masqmail. You
   1.128 +can now kill your old sendmail if it is running and start masqmail.
   1.129 +
   1.130 +	/sbin/init.d/sendmail restart
   1.131 +
   1.132 +should do that. You can also start masqmail with:
   1.133 +
   1.134 +	/usr/sbin/masqmail -bd -q30m
   1.135 +
   1.136 +
   1.137 +
   1.138 +Configuring for online delivery
   1.139 +-------------------------------
   1.140 +
   1.141 +(This section covers dial-up internet connections.)
   1.142 +
   1.143 +Now you have to set up the online configuration. The trick is to tell
   1.144 +your ip-up script the connection name. You could use the IP number of
   1.145 +the far side of the ppp link, but this is a pain and may change each
   1.146 +time. But you can give it an additional argument via pppd with ipparam.
   1.147 +Somewhere in your dial up script you have a line similar to:
   1.148 +
   1.149 +	/usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f $CHATFILE" \
   1.150 +	-d -d -d user user@somewhere file "$OPTIONS"
   1.151 +
   1.152 +Just add 'ipparam FastNet' in the command line for pppd if your ISP has
   1.153 +the name FastNet. The ip-up script will then get 'FastNet' as a sixth
   1.154 +parameter. In your ip-up script you can then call masqmail with
   1.155 +
   1.156 +	/usr/sbin/masqmail -qo "$6"
   1.157 +
   1.158 +instead of 'sendmail -q', if you had that in the script before.
   1.159 +Masqmail will then read the route configuration specified for the
   1.160 +connection name 'FastNet' and deliver the mail destined to the internet.
   1.161 +See the configuration manual on how to write a route configuration or
   1.162 +use one of the examples as a template.
   1.163 +
   1.164 +I do not know how do configure that for an ISDN adapter, but I am sure
   1.165 +you will find something similar in the man pages.
   1.166 +
   1.167 +If you want mail that is received by masqmail from your local net to be
   1.168 +delivered immediately using the route configuration, you have two
   1.169 +possibilities:
   1.170 +
   1.171 +* if you are using the masqdialer system, you just have to set the
   1.172 +  variables online_detect to mserver and mserver_iface to the interface
   1.173 +  mserver is listening to.
   1.174 +* otherwise you have to add two commands in your ip-up script:
   1.175 +	echo -n $6 > /tmp/connect_route
   1.176 +	chmod 644 /tmp/connect_route
   1.177 +  and you have to remove the file /tmp/connect_route in your ip-down script:
   1.178 +	rm /tmp/connect_route.
   1.179 +  Then you have to set online_detect to file and online_file to
   1.180 +  /tmp/connect_route.
   1.181 +
   1.182 +See the route documentation for more.
   1.183 +
   1.184 +
   1.185 +
   1.186 +Written by oku.
   1.187 +Updated by meillo.