mail scanner help
Peter Bonivart
peter at UCGBOOK.COM
Wed Nov 19 19:47:54 GMT 2003
I prefer having two scripts for better control. I modify the Sendmail
script with only the necessary things and then I add a script for
MailScanner.
Changes in /etc/init.d/sendmail (add the first two lines and comment out
the third, note that is it three lines even though they might be broken
in the mail):
/usr/lib/sendmail $MODE -OPrivacyOptions=noetrn -ODeliveryMode=queueonly
-OQueueDirectory=/var/spool/mqueue.in &
/usr/lib/sendmail -q$QUEUEINTERVAL -OQueueDirectory=/var/spool/mqueue &
#/usr/lib/sendmail $MODE -q$QUEUEINTERVAL $OPTIONS &
A simple MailScanner script, /etc/init.d/mailscanner:
#!/sbin/sh
# mailscanner - controls MailScanner
# 2003-05-19 Peter Bonivart, CSC
DIR=/opt/MailScanner
case "$1" in
start)
$DIR/bin/check_mailscanner
;;
stop)
echo "Shutting down MailScanner..."
pkill -x MailScanner
> $DIR/MailScanner.pid
;;
reload)
echo "Reloading MailScanner..."
pkill -HUP -x MailScanner
;;
*)
echo "Usage: $0 { start | stop | reload }"
exit 1
;;
esac
exit 0
Remember to symlink it:
# cd /etc/rc2.d
# ln -s /etc/init.d/mailscanner S90mailscanner
# cd ../rc1.d
# ln -s /etc/init.d/mailscanner K34mailscanner
Now you can quickly get MS to read updated configs by using
"/etc/init.d/mailscanner reload". You can also stop Sendmail and MS
independently, for example stop Sendmail to let MS catch up.
When running you should have something similar to this:
root at kleenex[/]# ps -ef | grep Mail
root 200 1 0 Oct 15 ? 0:01 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root 7390 200 0 18:26:11 ? 0:19 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root 5140 200 1 18:04:07 ? 0:20 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root 4749 200 0 18:01:17 ? 0:23 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root 7306 200 0 18:25:44 ? 0:18 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root 6550 200 0 18:16:16 ? 0:19 /usr/bin/perl
-I/opt/MailScanner/lib /opt/MailScanner/bin/MailScanner /opt/Mail
root at kleenex[/]# ps -ef | grep send
smmsp 182 1 0 Oct 15 ? 0:00 /usr/lib/sendmail -Ac -q15m
root 171 1 0 Oct 15 ? 6:02 /usr/lib/sendmail -bd
-OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueD
root 172 1 0 Oct 15 ? 0:00 /usr/lib/sendmail -q15m
-OQueueDirectory=/queues/mqueue
root 18085 171 0 20:31:03 ? 0:00 /usr/lib/sendmail -bd
-OPrivacyOptions=noetrn -ODeliveryMode=queueonly -OQueueD
You might not have the "sendmail -Ac" depending on your Sendmail
version. But you should at all times have one "sendmail -q" and at least
one "sendmail -bd" depending on current load.
/Peter Bonivart
--Unix lovers do it in the Sun
Sun Fire V210, Solaris 9, Sendmail 8.12.10, MailScanner 4.23-11,
SpamAssassin 2.60 + DCC 1.2.9, ClamAV 20030829
Sathes Nair wrote:
> hi guys,, i need your help on this.
>
> I would like to know how do i configure the startup
> script for my sendmail and also, do i need to start
> sendmail and mailscanner together or only mailscanner
> to send and receive mails. I have attach the sendmail
> startup scipt and can anyone help me to configure it.
> really apprecite your help. I am running mail scanner
> on solaris 8.
> I could able to start sendmail and mailscanner but
> really dont no whether it is working or not.
>
> Thank you so much
>
> cheers
More information about the MailScanner
mailing list