SMPID vs. INPID
Alden Levy
alden at engineno9inc.com
Tue May 8 01:11:09 IST 2007
I'm still scratching my head over this one. Would someone with a Redhat
install please post the relevant lines of their MailScanner_app_init, so I
can compare it to mine?
>Basically, when I start MS, all works well, but when I check status, I get
>an error
># service MailScanner status
>Checking MailScanner daemons:
> MailScanner: [ OK ]
> incoming sendmail: [ FAIL ]
> outgoing sendmail: [ OK ]
>
>However, it works fine as it is. In order to get rid of the fail, though,
>I've been updating sendmail.in.pid with the proper pid, and everything
>works.
>
>I finally had a few minutes to track down the issue, and it seems that
>something (I did something??) confused SMPID and INPID in
>MailScanner_app_init.
>
>The relevant code is:
>In StartInSendmail:
> elif [ $MTA = 'sendmail' ]; then
> /usr/bin/newaliases > /dev/null 2>&1
> if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
> make -C /etc/mail -s
> else
> for i in virtusertable access domaintable mailertable ; do
> if [ -f /etc/mail/$i ] ; then
> makemap hash /etc/mail/$i < /etc/mail/$i
> fi
> done
> fi
> $SENDMAIL -bd -OPrivacyOptions=noetrn \
> -ODeliveryMode=queueonly \
> -OQueueDirectory=$INQDIR \
> -OPidFile=$INPID
> touch /var/run/sm-client.pid
> chown $MSPUSER:$MSPGROUP /var/run/sm-client.pid 2>/dev/null
> $SENDMAIL -L sm-msp-queue -Ac -q15m -OPidFile=$SMPID 2>/dev/null
> success
> echo
>
>And in status:
> status)
> # Work out if all of MailScanner is running
> echo 'Checking MailScanner daemons:'
> echo -n ' MailScanner: '
> pid=`pidofproc MailScanner`
> if [ -z "$pid" ] ; then failure; else success; fi
> echo
> if [ $MTA = "sendmail" ]; then
> # Now the incoming sendmail
> echo -n ' incoming sendmail: '
> pid=`head -1 $INPID`
> alive=`ps ax | awk '{ print $1 }' | grep '^'$pid'$'`
> #pid=`ps ax | egrep '\[sendmail\]|sendmai[l]: accepting
>connections'`
> if [ -z "$alive" ] ; then failure; else success; fi
> echo
>
Thanks,
Alden
Alden Levy
Engine No. 9, Inc.
130 W. 57th Street, Suite 2F
New York, NY 10019
(212) 981-1122
(212) 504-9598 fax
More information about the MailScanner
mailing list