manual Installation Options

You need a user and a group for masqmail to run, I suggest user 'mail' and group 'trusted'. Say:

groupadd -g 42 trusted
useradd -u 42 -g 42 -d / -s /bin/sh -c "Mail Transfer Agent" mail

If you use other names than mail and trusted use the options described below for configure. The 42 is just a suggestion, you can use any number you like, but preferably one < 100. It does not have to be the same for the user 'mail' and the group 'trusted'.

Compliling is a matter of the usual procedure:

In the source directory, after unpacking do:
./configure
make
make install

Optionally, after you have called make, you can make some tests in the tests directory. Read the README in that directory for instructions.

Additional options for configure:

--with-user=USER sets the user as which MasqMail will run. Default is mail. USER has to exist before you 'make install'.

--with-group=GROUP sets the group as which MasqMail will run. Default is trusted. GROUP has to exist before you 'make install'.

--with-logdir=LOGDIR sets the directory where MasqMail stores its log files. It will be created if it does not exist. Default is /var/masqmail/.

--with-spooldir=SPOOLDIR sets the directory where MasqMail stores its spool files. It will be created if it does not exist. Default is /var/spool/masqmail/.

--enable-auth enables ESMTP AUTH support (disabled by default)

--disable-pop3 disables pop3 support (enabled by default)

After make install

You can also use these instructions to omit 'make install' if you do not want to use it.

Check that 'make install' worked correctly. The following command:

ls -ld /usr/sbin/masqmail /var/masqmail/ /var/spool/masqmail /var/spool/masqmail/input

should give output similar to

-rwsr-xr-x   1 root     root        86955 Oct 14 14:27 /usr/sbin/masqmail
drwxr-xr-x   2 mail     trusted      1024 Oct 14 14:29 /var/masqmail/
drwxr-xr-x   3 mail     trusted      1024 Oct 14 14:27 /var/spool/masqmail
drwxr-xr-x   2 mail     trusted      1024 Oct 14 18:32 /var/spool/masqmail/input
drwxr-xr-x   2 mail     trusted      1024 Oct 14 18:32 /var/spool/masqmail/popuidl

(important is the set-user-id bit for /usr/sbin/masqmail and the ownership of all items).

Edit the configuration files. You can use the files from the examples directory as a template. Copy masqmail.conf to /etc/maqmail.conf, the others to the location given in masqmail.conf.

If you already have an MTA (eg. sendmail) installed, move that to another location:

mv /usr/sbin/sendmail /usr/sbin/sendmail.orig

Then make a link to the new MTA:

ln -s /usr/sbin/masqmail /usr/sbin/sendmail

Now every mailer that used to call sendmail will now call masqmail. You can now kill your old sendmail if it is running and start masqmail. Usually this is done with the startup scripts. For SuSE this would be (as root):

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

or shorter:

/sbin/init.d/sendmail restart

You can also start it with:

/usr/sbin/sendmail -bd -q30m

You can also let it be called from inetd (with the -bs option), but this is untested.

Configuring for online delivery

Now you have to set up the online configuration. The trick is to tell your ip-up script the connection name. You could use the IP number of the far side of the ppp link, but this is a pain and may change each time. But you can give it an additional argument via pppd with ipparam. Somewhere in your dial up script you have a line similar to:

/usr/sbin/pppd /dev/ttyS1 connect "/usr/sbin/chat -t 90 -f
${CHATFILE}" -d -d -d user user@somewhere file ${OPTIONS}

Just add 'ipparam FastNet' in the command line for pppd if your ISP has the name FastNet. The ip-up script will then get 'FastNet' as a sixth parameter. In your ip-up script you can then call masqmail with

/usr/sbin/masqmail -qo $6

instead of 'sendmail -q', if you had that in the script before. Masqmail will then read the route configuration specified for the connection name 'FastNet' and deliver the mail destined to the internet. See the configuration manual on how to write a route configuration or use one of the examples as a template. I do not know how do configure that for an ISDN adapter, but I am sure you will find something similar in the man pages.

If you want mail that is received by masqmail from your local net to be delivered immediately using the route configuration, you have two possibilities:

  • if you are using the masqdialer system, you just have to set the variables online_detect to mserver and mserver_iface to the interface mserver is listening to.
  • otherwise you have to add two commands in your ip-up script:
    echo -n $6 > /tmp/connect_route
    chmod 644 /tmp/connect_route
    and you have to remove the file /tmp/connect_route in your ip-down script:
    rm /tmp/connect_route.
    Then you have to set online_detect to file and online_file to /tmp/connect_route.

See the route documentation for more.


Oliver Kurth
Last modified: Tue May 30 15:19:56 CEST 2000
This page was created using Genpage - Version: 1.0.6