As ZMailer has a clear distinction between the accepting of a message (either via SMTP with smtpserver or locally via the sendmail command), the routing and the delivery of the message, MailScanner sits between the accepting and the routing of the message.
That is, in the graph that shows ZMailer's processes interaction, you would see a new MailScanner process processing messages from the input spool and leaving them in the router spool.
Unlike Sendmail, Exim and Postfix implementations of ZMailer, you don't need two instances of ZMailer to run MailScanner, but you slightly modify one part of a standard ZMailer setup. In fact, the equivalent of the "incoming sendmail" part of a standard MailScanner installation is done by a slightly differently configured smtpserver; and the equivalent of the "outgoing sendmail" part, is done by a standard router and scheduler.
There are two ways of installing ZMailer and MailScanner, that is, you grab the sources and compile ZMailer, and get the MailScanner tarball and configure everything manually, or, in a GNU/Linux environment with RPM support you install everything via RPM.
Here you'll find instructions to handle both kinds of setup: using RPM or Manual
service zmailer stop
chkconfig zmailer off
./modify-zmailer.sh
(you have to be root to run it). The script is very simple and has "-v"
options on everything it runs so you see what's happening.
cd /
patch -p0 < /tmp/ZMailer-2.99.55-5.rpm-MailScanner.patch
/etc/sysconfig/MailScanner
,
comment out the following line:and uncomment the following one:
#MTA=zmailer
MTA=sendmail
so it says:
MTA=zmailer
and the lines:
Incoming Queue Dir = /var/spool/mqueue.in
Outgoing Queue Dir = /var/spool/mqueueso they look like:
Incoming Queue Dir = /var/spool/postoffice-incoming/router
Outgoing Queue Dir = /var/spool/postoffice/router
chkconfig --add MailScanner
chkconfig MailScanner on
service MailScanner start
In your MailScanner.conf file (probably in /etc/MailScanner or /opt/MailScanner/etc), there are 3 settings you need to change. They are all really near the top of the file. The settings are
Incoming Queue Dir = /var/spool/postoffice-incoming/router Outgoing Queue Dir = /var/spool/postoffice/router MTA = zmailer
However, you should check where is zmailer's sendmail emulation program and configure the following variables accordingly:
Sendmail = /usr/local/zmailer/bin/sendmail Sendmail2 = /usr/local/zmailer/bin/sendmail
Unlike the standard RPM Insallation, I like to have independent startup scripts for starting ZMailer and MailScanner. The standard ZMailer RPM package by Xosé Vázquez has a startup script for ZMailer. I left a copy here for you to grab.
I also modified a version of MailScanner's startup script so it only starts MailScanner independently from the MTA. It is here and it should run with any MTA, provided you convince the MTA to start its two instances apropiately, as we described for ZMailer here.