SMPID vs. INPID
Alden Levy
alden at engineno9inc.com
Sat May 5 20:12:57 IST 2007
I had a problem a long time ago on my old server that never got solved;
unfortunately, it's reared it's ugly head on the new server (I had to copy
over a file from the old server), and I'd like to put it to bed for good.
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
Please note that both $INPID and $SMPID (as well as /var/run/sm-client.pid)
are referenced in StartInSendmail and only $INPID is checked in status.
Any help would be greatly appreciated.
For the record, I am running MS 4.68.9-1 and SA 3.18 on CentOS 4.4.
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