[Mailman-Developers] Re-tries for failed SMTPDirect deliveries

Thomas Wouters thomas@xs4all.net
Thu, 30 Mar 2000 14:08:43 +0200


On Tue, Mar 28, 2000 at 11:14:00PM +0200, Thomas Wouters wrote:
> On Tue, Mar 28, 2000 at 03:00:18PM -0500, Barry A. Warsaw wrote:

[ about the new queueing of failed message, and implementing that also in ]
[ ToArchive and ToUsenet ]

> Actually, I think I'll post a diff tomorrow morning, after I have some time
> to think 'bout it ;) 

Well, I didn't make next morning, and I'm still thinking about it. Should it
be integrating with the pipeline architecture, or module-specific ? I mean,
it could be done two ways:

- inside each 'process' function for every module that might want to
requeue, in the form of

def process(mlist, msg):
    try:
        <original code here>
    except TemporaryFailure:
        Utils.queue_message(mlist, msg, re-injection point)

and a

def reprocess(mlist, msg):
    <code that reinjects message>

most process()es can probably just call reprocess() after some basic
checking, forking, message-header-editing, etc. reprocess() should raise
TemporaryFailure, but not catch it itself -- the queue runner should catch
it, and update the pickled state for that message.

- inside the pipeline structure, in the pipeline delivery.

This would require all handlers to have a reprocess() function, but most
(those that will never raise TemporaryFailure) can have it just 'pass'. (Or
perhaps just leave them out... that would raise AttributeError when the
impossible happens, instead of silently vanishing messages)

The pipeline itself would catch TemporaryFailure, and queue the messages not
only with the list, message and what pipeline segment it broke at, but also
the rest of the pipeline still to be traversed. Might prove a bit more
tricky, but it's a lot more elegant if more than a few modules support the
queueing interface :P

Comments welcome, but I'm off for a long weekend Rome, I wont be back until
tuesday, and I wont read my mail in between ;)

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!