MailScanner won't pick up Mail
Martin Hepworth
martinh at SOLID-STATE-LOGIC.COM
Fri Feb 27 09:32:32 GMT 2004
Frank
you need exim setup's, one for the input and one for the out queue
I can't see any reference (apart from the MailScanner.conf) to
starting/stopping the second queue for the outbound (post MailScanner) queue
have a look in /var/spool/exim/input to see if MailScanner processed
email is there...
I presume you've read the FAQ on howto setup Exim with MS?
--
Martin Hepworth
Snr Systems Administrator
Solid State Logic
Tel: +44 (0)1865 842300
Frank Adler wrote:
> Hi List,
>
> I want to use Fetchmail->Exim->Mailscanner->Exim->Cyrus.
> (Using Suse 8.1, Exim 4.12, MailScanner 4.26.8-1)
>
> The Fetchmail-Part works fine.
> Puts the mail into /var/spool/exim.in/input
>
> Here comes the Problem:
> MailScanner does not pick up or touch the message in any way. I don't get
> any errors and don't know how to turn on the "Debug-Mode" - if there is
> such a thing. Sounds to me like a Dir-Problem, but I can't find it... :-(
>
> I would apreciate your help very much!
>
> Thank you,
>
> Frank
>
> Some Config-Extracts:
>
> MailScanner.conf:
> Run As User = exim
> Run As Group = mail
> Incoming Queue Dir = /var/spool/exim.in #I also tried: /input/*, /input/
> Outgoing Queue Dir = /var/spool/exim #I also tried: /input/
> Incoming Work Dir = /var/spool/MailScanner/incoming
> Quarantine Dir = /var/spool/MailScanner/quarantine
> PID file = /var/run/MailScanner.pid
> MTA = exim
> Sendmail = /usr/sbin/exim
> Sendmail2 = /usr/sbin/exim # Split Exim Spool = yes
> Virus Scanners = none
> Rest is unchanged...
>
> /etc/SysConfig/MailScanner:
> MTA=exim
> MAILSCANNER_WORKDIR=/var/spool/MailScanner/incoming
> RESTART_DELAY=2
> EXIM=/usr/sbin/exim
> POSTFIX=/usr/sbin/postfix
> POSTFIXINCF=/etc/postfix.in
> POSTFIXOUTCF=/etc/postfix
> MAILSCANNER_INQDIR=/var/spool/exim.in/input
> SENDMAIL=/usr/sbin/sendmail
> SENDMAIL_IN_ARGS="-L sendmail-in -Am -bd -om"
> SENDMAIL_OUT_ARGS="-L sendmail-out -Am -q30m -om"
>
> /etc/init.d/mailscanner:
> #!/bin/bash
>
> MAILSCANNER_BIN=/usr/sbin/check_MailScanner
> test -x $MAILSCANNER_BIN || exit 5
>
> MTA=exim
> POSTFIX=/usr/sbin/postfix
> POSTFIXINCF=/etc/postfix.in
> POSTFIXOUTCF=/etc/postfix
> MAILSCANNER_WORKDIR="/var/spool/MailScanner/incoming"
> MAILSCANNER_INQDIR="/var/spool/exim.in/input"
> SENDMAIL_IN_ARGS="-L sendmail-in -Am -bd -om"
> SENDMAIL_CLIENT_ARGS="-L sendmail-client -Ac -q30m"
> SENDMAIL_OUT_ARGS="-L sendmail-out -Am -q30m -om"
> SENDMAIL="/usr/sbin/sendmail"
> RESTART_DELAY=2
>
> # Check for existence of needed config files and read them
> test -s /etc/sysconfig/mail && \
> . /etc/sysconfig/mail
>
> test -s /etc/sysconfig/sendmail && \
> . /etc/sysconfig/sendmail
>
> test -s /etc/sysconfig/MailScanner && \
> . /etc/sysconfig/MailScanner
>
>
> if test "$SMTPD_LISTEN_REMOTE" != "yes" ; then
> SENDMAIL_IN_ARGS="-O DaemonPortOptions=Addr=127.0.0.1
> $SENDMAIL_IN_ARGS"
> fi
> if test "$MTA" = "sendmail" ; then
> test -x $SENDMAIL || exit 5
> fi
> SENDMAIL_IN_ARGS="-OPrivacyOptions=noetrn -ODeliveryMode=queueonly -
> OQueueDirectory=$MAILSCANNER_INQDIR $SENDMAIL_IN_ARGS"
>
> msppid=/var/spool/clientmqueue/sm-client.pid
> EXIM_PIDIN=/var/run/exim_in.pid
> EXIM_PIDOUT=/var/run/exim_out.pid
> mspid=/var/run/MailScanner.pid
>
> StartInSendmail() {
> echo -n "Initializing incoming $MTA"
> if [ $MTA = 'postfix' ]; then
> if test -x $POSTFIX -a -f $POSTFIXINCF/main.cf ; then
> startproc $POSTFIX -c $POSTFIXINCF start 2> /dev/null
> rc_status
> else
> echo
> echo "Error: Could not find Postfix installation,
> see /etc/sysconfig/MailScanner"
> fi
> elif [ $MTA = 'sendmail' ]; then
> startproc -p $srvpid $SENDMAIL $SENDMAIL_IN_ARGS
> startproc -f -p $msppid $SENDMAIL $SENDMAIL_CLIENT_ARGS
> rc_status
> elif [ $MTA = 'exim' ]; then
> echo -n "Starting Exim_Incoming..."
> $EXIM -bd -odq -DSPOOL=/var/spool/exim.in -oP $EXIM_PIDIN
> rc_status -v
> fi
> }
>
> StartOutSendmail() {
> echo -n "Initializing outgoing $MTA"
> if [ $MTA = 'postfix' ]; then
> if test -x $POSTFIX -a -f $POSTFIXOUTCF/main.cf ; then
> startproc $POSTFIX -c $POSTFIXOUTCF start 2> /dev/null
> rc_status
> else
> echo
> echo "Error: Could not find Postfix installation,
> see /etc/sysconfig/MailScanner"
> fi
> elif [ $MTA = 'sendmail' ]; then
> startproc -f -p $srvoutpid $SENDMAIL $SENDMAIL_OUT_ARGS
> rc_status
> elif [ $MTA = 'exim' ]; then
> echo -n "Starting Exim_Outgoing..."
> $EXIM -q1m -oP $EXIM_PIDOUT
> rc_status -v
> fi
> }
>
> . /etc/rc.status
> rc_reset
> case "$1" in
> startin)
> StartInSendmail
> ;;
> startout)
> StartOutSendmail
> ;;
> start)
> StartInSendmail
> StartOutSendmail
>
> echo -n "Initializing MailScanner\n"
> startproc -f -p $mspid /usr/sbin/check_MailScanner >/dev/null
> # This didn't work as expected: rc_status -v
> rm -f /var/lock/subsys/MailScanner.off >/dev/null 2>&1
> ;;
> stop)
> echo -n "Shutting down exim and MailScanner"
> if [ $MTA = 'postfix' ]; then
> $POSTFIX -c /etc/postfix.in stop 2>/dev/null
> $POSTFIX -c /etc/postfix stop 2>/dev/null
> rc_status
> elif [ $MTA = 'exim' ]; then
> killproc -TERM $EXIM
> rc_status
> elif [ $MTA = 'sendmail' ]; then
> killproc -p $msppid -TERM $SENDMAIL
> rc_status
> killproc -p $srvpid -TERM $SENDMAIL
> rc_status
> killproc -p $srvoutpid -TERM $SENDMAIL
> rc_status
> fi
> killproc -p $mspid -TERM /usr/sbin/MailScanner
> rc_status -v
> # Clear out all the old pid files
> rm -f $mspid
> # Clear out the old incoming dirs
> cd $MAILSCANNER_WORKDIR && ls | egrep '^[0123456789]+$' |
> xargs /bin/rm -rf 2>/dev/null
> touch /var/lock/subsys/MailScanner.off >/dev/null 2>&1
> ;;
> try-restart)
> $0 stop && sleep $RESTART_DELAY && $0 start
> rc_status
> ;;
> restart)
> $0 stop
> sleep $RESTART_DELAY
> $0 start
> rc_status
> ;;
> reload|force-reload)
> echo -n "Reload service sendmail"
> killproc -p $mspid -HUP /usr/sbin/MailScanner
> rc_status -v
> ;;
> status)
> echo -n "Checking for services exim & MailScanner: "
> checkproc -p $srvpid $SENDMAIL
> rc_status
> checkproc -p $msppid $SENDMAIL
> rc_status
> checkproc -p $srvoutpid $SENDMAIL
> rc_status
> checkproc -p $mspid /usr/sbin/MailScanner
> rc_status -v
> ;;
> probe)
> test /etc/sendmail.cf -nt $srvpid -o /etc/mail/submit.cf -nt
> $msppid \
> -o /etc/MailScanner/MailScanner.conf -nt $mspid && echo reload
> ;;
> *)
> echo "Usage: $0 {start|stop|status|try-restart|restart|force-
> reload|reload|probe|startin|startout}"
> exit 1
> esac
> rc_exit
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.
**********************************************************************
More information about the MailScanner
mailing list