MailScanner(8) Mail MailScanner(8)NAMEMailScanner - Virus/Spam Scanner for Sendmail, Exim and Postfix
SYNOPSISMailScanner [-v] [configfile]
DESCRIPTIONMailScanner starts the main MailScanner process. [configfile] should
point to a valid MailScanner configuration file (see MailScan‐
ner.conf(5) for details). The default location for this file depends on
the operating system.
Linux: /etc/MailScanner/MailScanner.conf
FreeBSD: /usr/local/etc/MailScanner/MailScanner.conf
Other: /opt/MailScanner/etc/MailScanner.conf
The main process then spawns n number of child processes. n is config‐
ured in [configfile] with the option "Max Children". Each process waits
for messages to appear in the "Incoming Queue Dir", processes these
messages and then puts them in the "Outgoing Queue Dir". You may need
to adjust the configuration of your MTA (or the startup of your MTA) to
make it work with MailScanner.
-v Prints version information for Mailscanner and all used
perl-modules.
MTA SETUP
It is important that your MTA only queues incoming mail and does not
deliver it automatically. You need two mail queues (incoming and outgo‐
ing). Moreover you should setup two instances of your MTA. One that
accepts incoming mail and puts it to an incoming queue and one that
sends out mail that resides in the outgoing queue.
A common setup for Sendmail could look like this:
1. Verify that you already have one queue (e.g. in /var/spool/mqueue).
2. Create a second queue (e.g. /var/spool/mqueue.in) and apply the same
owner/group/mode.
3. Change your sendmail startup from
sendmail -bd -q15m (or similar)
to
sendmail -bd -OPrivacyOptions=noetrn -ODeliveryMode=queueonly
-OQueueDirectory=/var/spool/mqueue.in
sendmail -q15m
A similar setup for Exim could look like this:
1. Create two queues (e.g. /var/spool/exim.in and /var/spool/exim.out)
with appropriate owner/group/mode (e.g. owner=mailnull, group=mail,
mode=750).
2. Create two exim configurations (e.g. /usr/local/etc/exim/config‐
ure.in, /usr/local/etc/exim/configure.out).
3. Make sure that the incoming exim configuration only queues mails and
never delivers mail itself. This can be achieved by using the Exim con‐
fig option "queue_only = true" and/or a special router definition (Exim
4 syntax):
defer_router:
driver = manualroute
self = defer
transport = remote_smtp
route_list = * 127.0.0.1 byname
verify = false
4. Start two exim instances:
exim -C /usr/local/etc/exim/configure.in
exim -C /usr/local/etc/exim/configure.out
SEE ALSOMailScanner.conf(5)Julian Field 4.49.7 MailScanner(8)