diff options
| author | bwarsaw | 2000-05-31 18:23:30 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-05-31 18:23:30 +0000 |
| commit | 350b941780520195312d857fec57e0e46bcf064d (patch) | |
| tree | 4a6e5a908ad2233d401c705d13e854bb34d5cd34 /Mailman/Handlers/HandlerAPI.py | |
| parent | c276909bd6cfd96ae8482f0f4be2bfab4b3cc547 (diff) | |
| download | mailman-350b941780520195312d857fec57e0e46bcf064d.tar.gz mailman-350b941780520195312d857fec57e0e46bcf064d.tar.zst mailman-350b941780520195312d857fec57e0e46bcf064d.zip | |
Diffstat (limited to 'Mailman/Handlers/HandlerAPI.py')
| -rw-r--r-- | Mailman/Handlers/HandlerAPI.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Mailman/Handlers/HandlerAPI.py b/Mailman/Handlers/HandlerAPI.py index 614a96cbb..43108574f 100644 --- a/Mailman/Handlers/HandlerAPI.py +++ b/Mailman/Handlers/HandlerAPI.py @@ -82,6 +82,12 @@ def DeliverToList(mlist, msg, msgdata): # The delivery module being used (SMTPDirect or Sendmail) failed # to deliver the message to one or all of the recipients. Push # the delivery module back on the pipeline list and break. + # + # TBD: What this logic should really do is continue with the rest + # of the pipeline and put only the delivery module on the queued + # pipeline. I don't think this matters much right now because + # delivery success will generally be all-or-nothing until we + # support DSN. pipeline.insert(0, modname) # Consult and adjust some meager metrics that try to decide # whether it's worth continuing to attempt delivery of this @@ -91,14 +97,15 @@ def DeliverToList(mlist, msg, msgdata): last_recip_count = msgdata.get('last_recip_count', 0) deliver_until = msgdata.get('deliver_until', now) if len(recips) == last_recip_count: - # We didn't make any progress. How many times to we continue - # to attempt delivery? TBD: make this configurable. + # We didn't make any progress. if now > deliver_until: - # throw this message away - return 0 + # We won't attempt delivery any longer so continue with + # the rest of the pipeline. See the TBD above. + del pipeline[0] + break else: # Keep trying to delivery this for 3 days - deliver_until = now + 60*60*24*3 + deliver_until = now + mm_cfg.DELIVERY_RETRY_PERIOD msgdata['last_recip_count'] = len(recips) msgdata['deliver_until'] = deliver_until break |
