diff options
author | bwarsaw <> | 2003-11-27 00:05:47 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-11-27 00:05:47 +0000 |
commit | 336dd5c939307d1464071a2a04e5bd3bd1ca32de (patch) | |
tree | e00149cfb90ed9571d1764de1f747ae9a4bf9ead /Mailman/Handlers | |
parent | 1471103bc727585c21c1609e36959a2e7952e682 (diff) | |
download | mailman2-336dd5c939307d1464071a2a04e5bd3bd1ca32de.tar.gz mailman2-336dd5c939307d1464071a2a04e5bd3bd1ca32de.tar.xz mailman2-336dd5c939307d1464071a2a04e5bd3bd1ca32de.zip |
bulkdeliver(): Include the Message-ID in the log message.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r-- | Mailman/Handlers/SMTPDirect.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py index c61336fe..e1607358 100644 --- a/Mailman/Handlers/SMTPDirect.py +++ b/Mailman/Handlers/SMTPDirect.py @@ -345,15 +345,17 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn): msgtext = msg.as_string() refused = {} recips = msgdata['recips'] + msgid = msg['message-id'] try: # Send the message refused = conn.sendmail(envsender, recips, msgtext) except smtplib.SMTPRecipientsRefused, e: - syslog('smtp-failure', 'All recipients refused: %s', e) + syslog('smtp-failure', 'All recipients refused: %s, msgid: %s', + e, msgid refused = e.recipients except smtplib.SMTPResponseException, e: - syslog('smtp-failure', 'SMTP session failure: %s, %s', - e.smtp_code, smtp_error) + syslog('smtp-failure', 'SMTP session failure: %s, %s, msgid: %s', + e.smtp_code, smtp_error, msgid) # If this was a permanent failure, don't add the recipients to the # refused, because we don't want them to be added to failures. # Otherwise, if the MTA rejects the message because of the message @@ -368,7 +370,7 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn): # MTA not responding, or other socket problems, or any other kind of # SMTPException. In that case, nothing got delivered, so treat this # as a temporary failure. - syslog('smtp-failure', 'Low level smtp connection error: %s', e) + syslog('smtp-failure', 'Low level smtp error: %s, msgid: %s', e, msgid) error = str(e) for r in recips: refused[r] = (-1, error) |