1
From: Jim Barber <jim.barber@ddihealth.com>
2
Subject: MailScanner, Sendmail, and Queue aging in Debian
4
To integrate MailScanner with Sendmail do the following steps.
5
Note that there are some optional steps for if you want to support Debian's queue aging.
7
1. Edit the /etc/mail/sendmail.mc file and add the following entries just before the MAILER_DEFINITIONS entry:
9
QUEUE_GROUP(`mqueue', `Path=/var/spool/mqueue/incoming, Runners=0')dnl
10
QUEUE_GROUP(`main', `Path=/var/spool/mqueue, Flags=f')dnl
12
If you want more queue groups, then add them as well.
13
For this example I'll add a queue group that will be checked hourly and used by the queue aging later.
15
QUEUE_GROUP(`hourly', `Path=/var/spool/mqueue/hourly, Flags=f, Interval=1h')dnl
17
2. Edit the /etc/mail/sendmail.conf file:
19
DAEMON_PARMS="-OPrivacyOptions=noetrn -ODeliveryMode=queueonly";
21
If you want to use the hourly queue defined earlier for queue aging change the AGE_DATA to:
24
['20m', '-s 3600', 'hourly', '/var/spool/mqueue'],\
27
This will check the queue every 20 minutes and move all messages older than 3600 seconds (1 hour) into the hourly queue.
29
3. Rebuild the sendmail configuration and explicitly restart it (important!) by running:
32
/etc/init.d/sendmail restart
34
4. Edit /etc/MailScanner/MailScanner.conf and change at least the following:
38
Incoming Queue Dir = /var/spool/mqueue/incoming
39
Outgoing Queue Dir = /var/spool/mqueue
43
5. Change owner and group of MailScanner's directories.
45
chown -R root:mail /var/spool/MailScanner
46
chown -R root:mail /var/lib/MailScanner
47
chown -R root:mail /var/run/MailScanner
48
chown -R root:mail /var/lock/subsys/MailScanner
50
6. Edit /etc/default/mailscanner and set run_mailscanner=1
52
7. Run: /etc/init.d/mailscanner start
54
---------------------------
56
The queue directories don't need to be created by hand as specified in the old instructions.
57
Sendmail will create them and set them to the correct permission upon start (because of the QUEUE_GROUP definitions).
59
Note that we no longer pass a -OQueueDirectory= parameter in DAEMON_PARMS.
60
The "mqueue" queue group handles this properly.