summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2001-02-16 06:16:48 +0000
committerbwarsaw2001-02-16 06:16:48 +0000
commited9c41c842cc28800ebcd9bdf7512d099cf5e555 (patch)
treec9946ecb6b34a90de91b2531abc40aa081ad14e2
parent5fc2b6cc704d3902a9cdfc1db45f18cac599ef58 (diff)
downloadmailman-ed9c41c842cc28800ebcd9bdf7512d099cf5e555.tar.gz
mailman-ed9c41c842cc28800ebcd9bdf7512d099cf5e555.tar.zst
mailman-ed9c41c842cc28800ebcd9bdf7512d099cf5e555.zip
-rw-r--r--Mailman/Handlers/SMTPDirect.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index 53431ca59..767f272e0 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -85,6 +85,7 @@ def process(mlist, msg, msgdata):
# Process any failed deliveries.
tempfailures = []
+ permfailures = []
for recip, (code, smtpmsg) in refused.items():
# DRUMS is an internet draft, but it says:
#
@@ -96,18 +97,16 @@ def process(mlist, msg, msgdata):
# so the logic below works.
#
if code >= 500 and code <> 552:
- # It's a permanent failure for this recipient so register it. We
- # don't save the list between each registration because we assume
- # it happens around the whole message delivery sequence
- mlist.RegisterBounce(recip, msg)
+ # A permanent failure
+ permfailures.append(recip)
else:
# Deal with persistent transient failures by queuing them up for
# future delivery. TBD: this could generate lots of log entries!
- syslog('smtp-failure', '%d %s (%s)' % (code, recip, smtpmsg))
tempfailures.append(recip)
- if tempfailures:
- msgdata['recips'] = tempfailures
- raise Errors.SomeRecipientsFailed
+ syslog('smtp-failure', '%d %s (%s)' % (code, recip, smtpmsg))
+ # Return the results
+ if tempfailures or permfailures:
+ raise Errors.SomeRecipientsFailed(tempfailures, permfailures)