sendmail queue run interferes with active transactions

Eric Wassenaar e07 at nikhefh.hep.nl
Wed Nov 23 09:18:04 AEST 1988


A sendmail queue run may destructively interfere with other active
sendmail transactions. As a result, mail may be lost, left-over queue
files may remain in the mqueue directory, and various error messages
may appear in the syslog file.

Analysis:
The routine runqueue() in queue.c scans the queue, calling dowork()
for each individual entry. If an entry is found busy, dowork() will
syslog such entry as "AAxxxxx: locked", and return immediately.
After the queue scan, runqueue() calls finis() to terminate.
However, if the last queue entry examined by dowork() was locked,
'CurEnv->e_id' still contains the id of this entry, and dropenvelope()
which is called by finis() will inappropriately perform cleanup action
for this queue entry, possibly unlinking associated queue files.

Remedy:
Either make CurEnv->e_id = NULL again in dowork() when returning after
signaling a locked entry, or put CurEnv->e_id = NULL in runqueue()
just before calling finis(). Now dropenvelope() will exit immediately.
Note that in case dowork() could process a non-active entry, it will
internally call dropenvelope() for this entry.

Eric Wassenaar
-- 
Organization: NIKHEF-H, National Institute for Nuclear and High-Energy Physics
Address: Kruislaan 409, P.O. Box 41882, 1009 DB Amsterdam, the Netherlands
Phone: +31 20 5920412   Home phone: +31 20 909449    Telex: 10262 (hef nl)
Internet: e07 at nikhefh.hep.nl  Bitnet: nikhefh!e07 at mcvax.bitnet



More information about the Comp.bugs.4bsd.ucb-fixes mailing list