diff options
| author | bwarsaw | 1999-12-09 22:11:28 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-12-09 22:11:28 +0000 |
| commit | c45dfc85aa583dfdfc335366b3707b1a51772f9e (patch) | |
| tree | 32a096a7cb92ce287b5e6694f98849fd44dae0d3 | |
| parent | 802876639975db98fc832af5dce4a2f60b84edb9 (diff) | |
| download | mailman-c45dfc85aa583dfdfc335366b3707b1a51772f9e.tar.gz mailman-c45dfc85aa583dfdfc335366b3707b1a51772f9e.tar.zst mailman-c45dfc85aa583dfdfc335366b3707b1a51772f9e.zip | |
| -rw-r--r-- | Mailman/Handlers/SMTPDirect.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py index fd283e713..13513d41a 100644 --- a/Mailman/Handlers/SMTPDirect.py +++ b/Mailman/Handlers/SMTPDirect.py @@ -31,6 +31,9 @@ from Mailman.pythonlib import smtplib def process(mlist, msg): + if msg.recips == 0: + # nothing to do! + return # I want to record how long the SMTP dialog takes because this will help # diagnose whether we need to rewrite this module to relinquish the list # lock or not. @@ -50,11 +53,11 @@ def process(mlist, msg): conn.quit() except smtplib.SMTPRecipientsRefused, e: refused = e.recipients - mlist.LogMsg('smtp', 'All recipients refused') # MTA not responding, or other socket problems, or any other kind of # SMTPException. In that case, nothing got delivered except (socket.error, smtplib.SMTPException), e: mlist.LogMsg('smtp', 'Some other exception occurred:\n' + `e`) + mlist.LogMsg('smtp', 'All recipients refused') # # Go through all refused recipients and deal with them if possible for recip, (code, smtpmsg) in refused.items(): @@ -67,3 +70,5 @@ def process(mlist, msg): # queue them up and try to resend them? Should we log the smtp error # messages, or do any other processing of failures? Lots of # questions... + else: + mlist.LogMsg('smtp-failure', '%d %s (%s)' % (code, recip, smtpmsg)) |
