Problem with latest version of Mailscanner

John Rudd jrudd at UCSC.EDU
Thu Feb 12 01:10:00 GMT 2004


(note to the mailscanner list: I'm top-posting due to the location of
the included files, I'm sorry, and I generally try to avoid that ...
the context is in the quoted section)


Cyrille,

I suspect that the problems are the two "SENDMAIL=" lines.

Unfortunately, I don't know anything about how these new configurations
are set up (I haven't updated my mailscanner in a while), so I'm CC'ing
the mailscanner mailing list in case I'm wrong (and some of my comments
are more directed at them, than at you).


I'm assuming that the "SENDMAIL=" lines are somehow over-riding the
MailScanner.conf entires for "Sendmail =" and "Sendmail2 =".

The problem is that neither of the lines mentioned below are clear as to
which MailScanner.conf item they are supposed to be.  In
MailScanner.conf, Sendmail2 should be the ms2cgp script, and I don't
know how to set that in these new files you've sent.  the "Sendmail ="
line should be your communigate pro compatability "sendmail" (
/opt/CommuniGate/sendmail ), however, this does not run as a daemon, and
it's hard to tell if one of these is trying to run as a daemon.


Most directly, what I would suggest is: don't use rc.MailScanner (nor
it's newer counter-part) nor the equiv. for Sendmail.  Disable them.
(IMO, rc.MailScanner is riddled with assumptions about mailers, and,
IMO, that's poor coding)

I would, instead, create a new MailScanner start-up script (that goes in
/etc/init.d or /etc/rc.d/init.d or wherever redhat puts that stuff these
days) that just invokes "/opt/mailscanner/bin/check_mailscanner" for
starting, and just kills whatever is in
/opt/mailscanner/var/MailScanner.pid for stopping.  Something like this:

#!/bin/sh
#
case "$1" in
'start')
        /opt/mailscanner/bin/check_mailscanner
        ;;
'stop')
        kill `cat /opt/mailscanner/var/MailScanner.pid`
        ;;
*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0


That should be enough.  Having MailScanner's rc file start or stop the
external mailer (such as sendmail) is an incredibly bad idea, and I
don't know why anyone started doing that.  It breaks encapsulation, and
a host of other "good ideas" all for the sake of convenience ... never a
good trade.  This is exactly the type of thing that is the target of the
old acronym "KISS: Keep it Simple" (with emphasis on the missing S
word).

Have MailScanner's rc file control mailscanner, and do nothing else.
Have CommuniGate Pro's rc file control CommuniGate Pro, and do nothing
else (or substitute in whichever mailer is in discussion).  That's how
it should be.

Hopefully MailScanner still propperly listens to its MailScanner.conf
directives, though.  If they've stopped having it do that, then I don't
know what to say.  It may mean that new versions of MailScanner have
stopped being useable with CommuniGate Pro.



> Cyrille Gueugnon wrote:
>
> Hello John,
>
> First of all I would like to thank you for your work, i've been
> searching for days on the web a solution to control the viruses and
> Spam on Communigate and your page made me discover MailScanner.
>
> So I'm Cyrille a french geek and i have a small problem to make
> MailScanner to work properly with Communigate pro.
>
> My config is
>
> Linux Redhat 9
> Communigate Pro 4.1.8
> MailScanner 4.26.8
>
> using mcafee 4.3.32 for virus scanning
>
> I've followed all you indications to setup the connection beetween CGP
> and MS and it seems to work only in one way.
>
> cgp2ms is making his job, sending the mail to MS which analyse them
> but don't send them back to CGP. It's putting them in the Queue and it
> seems that sendmail is sending the messages directy.
>
> The only point I'm not sure is the configuration of the rc.MailScanner
> file. This Script does not exist anymore and has been replaced by a
> file simply name MailScanner in the /etc/init.d/ directory.
> It uses variables stored in a /etc/sysconfig/MailScanner file
>
> The sendmail_enable does not seems to work as variable
> and sendmail_program is  no longer present.
>
> There's a SENDMAIL variable that i set to '/dev/null' that cause
> MailScanner to crah, when I just let a blank field, I have 2 error
> messages about Sendmail but MailScanner Starts correctly.
>
>
> here are those files.
>
> Thanks by advance for your help
>
> Cyrille
>
> ***************************************************************************************************
>  /etc/init.d/MailScanner
>
> #!/bin/bash
> #
> # mailscanner   This shell script takes care of starting and stopping
> #               MailScanner, and its associated copies of sendmail.
> #
> # chkconfig: 2345 80 30
> # description: MailScanner is an open-source E-Mail Gateway Virus
> Scanner.
> # processname: MailScanner
> # config: /etc/MailScanner/MailScanner.conf
> # pidfile: /var/run/MailScanner.pid
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> # Source networking configuration.
> . /etc/sysconfig/network
>
> #
> # If you are using sendmail, Exim or Postfix, please try to avoid
> editing
> # thie file. Edit /etc/sysconfig/MailScanner instead.
> #
> MTA=sendmail
> QUEUETIME=15m
> WORKDIR=/var/spool/MailScanner/incoming
> INQDIR=/var/spool/mqueue.in
> INPID=/var/run/sendmail.in.pid
> OUTPID=/var/run/sendmail.out.pid
> SMPID=/var/run/sm-client.pid
> MSPUSER=smmsp
> MSPGROUP=smmsp
> SENDMAIL=/usr/sbin/sendmail
> POSTFIX=/usr/sbin/postfix
> POSTFIXINCF=/etc/postfix.in
> POSTFIXOUTCF=/etc/postfix
> EXIM=/usr/sbin/exim
> EXIMINCF=/etc/exim.conf
> EXIMSENDCF=/etc/exim_send.conf
> ZMAILER=/usr/lib/zmailer/zmailer
> ZMAILERCF=/etc/zmailer/zmailer.conf
> RESTART_DELAY=10
>
> # Source mailscanner configuration.
> if [ -f /etc/sysconfig/MailScanner ] ; then
>         . /etc/sysconfig/MailScanner
> fi
> export MTA
> export QUEUETIME
> export WORKDIR
> export INQDIR
> export INPID
> export OUTPID
> export SMPID
> export MSPUSER
> export MSPGROUP
> export SENDMAIL
> export POSTFIX
> export POSTFIXINCF
> export POSTFIXOUTCF
> export EXIM
> export EXIMINCF
> export EXIMSENDCF
> export ZMAILER
> export ZMAILERCF#
> Then the code
>
> ************************************************************************************
> /etc/sysconfig/MailScanner
>
> # Put in here all the settings for your particular mail system so that
> # MailScanner's init.d script can run it all for you.
> #
>
> #
> # Are you running Postfix, sendmail, Exim or ZMailer?
> #
> MTA=sendmail
> #MTA=postfix
> #MTA=exim
> #MTA=zmailer
>
> #
> # MailScanner Settings
> #
> WORKDIR=/var/spool/MailScanner/incoming # Where the temp MailScanner
> files live
> RESTART_DELAY=10 # Pause time between stop and start when restarting
>
> #
> # Sendmail Settings
> #
> SENDMAIL=
> # Was /usr/bin/sendmail
> QUEUETIME=15m
> INQDIR=/var/spool/mqueue.in
> INPID=/var/run/sendmail.in.pid
> OUTPID=/var/run/sendmail.out.pid
> SMPID=/var/run/sm-client.pid
> MSPUSER=smmsp  # User for mail submission queue runner
> MSPGROUP=smmsp # Group for mail submission queue runner
> #
> # Postfix settings
> #
> POSTFIX=/usr/sbin/postfix
> POSTFIXINCF=/etc/postfix.in   # Directory containing incoming
> configuration
> POSTFIXOUTCF=/etc/postfix     # Directory containing outgoing
> configuration
>
> #
> # Exim settings
> #
> EXIM=/usr/local/exim/bin/exim
> EXIMINCF=/usr/local/exim/configure         # Incoming configuration
> file
> EXIMSENDCF=/usr/local/exim/exim_send.conf  # Outgoing configuration
> file
>
> #
> # ZMailer settings
> #
> ZMAILER=/usr/lib/zmailer/zmailer
> ZMAILERCF=/etc/zmailer/zmailer.conf     # Configuration file
>
>
>
>
> export RESTART_DELAY
> ****************************************************************************************************



More information about the MailScanner mailing list