[Mailman-Developers] Queue questions & thoughts...

Ken Manheimer klm@python.org
Sat, 29 Aug 1998 21:56:27 -0400 (EDT)


On Sat, 29 Aug 1998, The Dragon De Monsyne wrote:

> 	I just have a question.... Peering through the queueing system, I
> note that there does not seem to be any locking of the queuefiles...
> Correct?  The way it appears to me that mailman is working is thus:
> 	every outgoing message is queued, then an attempt to feed it to
> the MTA is made. After that it tries to run the queue to catch anything
> waiting there. 
> 	What keeps another process running the queue from grabbing &
> delivering the queued message whilst the first proccess is trying to send
> the same message to the MTA? Especially whence you have several proccesses
> rapidly forked all doing delivery at once?

John will have the authoritative answer on the queueing mechanism
(though i've messed with, and contributed some refinements to it), but
we have seen exactly the behavior you describe, where messages are
delivered out from under a TrySMTPDelivery process.  The solution you
describe - a separate process, _plus_ a cron job to ensure it's always
going - sounds a lot more cumbersome than simply using file locks, as
you mention. 

(It occurred to me to wonder whether it's best to just have the absence
of the queue file ignored, with the assumption that some other process
did the delivery.  But then i realized that this may in some cases mean
duplicate deliveries, which again calls for file locking.) 

Note also that in the context of a persistent server, your idea of a
process to handle the queue - probably a thread in the server - will
make a lot of sense.  But until that time, more processes hanging around
strike me as undesirability administrative and conceptual complexity...

ken manheimer
klm@python.org