summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw2000-07-22 02:39:00 +0000
committerbwarsaw2000-07-22 02:39:00 +0000
commit76a8d2acaf0255ffdf37ae0eccfc6e00f4c23f32 (patch)
tree300b165bf471ab48503bb7e13c71e6cccbafe14e
parent776ed60fffd694c8ed05dc47385699bcb2e29d44 (diff)
downloadmailman-76a8d2acaf0255ffdf37ae0eccfc6e00f4c23f32.tar.gz
mailman-76a8d2acaf0255ffdf37ae0eccfc6e00f4c23f32.tar.zst
mailman-76a8d2acaf0255ffdf37ae0eccfc6e00f4c23f32.zip
process(): Addressing both SF bug #108167 and patch #100861, this
patch writes success and failure messages to logs/post. It retains the writing of smtp delivery timing messages to logs/smtp.
-rw-r--r--Mailman/Handlers/SMTPDirect.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index cc6f972e7..b9f75eca1 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -75,9 +75,19 @@ def process(mlist, msg, msgdata):
finally:
t1 = time.time()
mlist.Lock()
- # Process any failed deliveries.
+ # Log the successful post
syslog('smtp', 'smtp for %d recips, completed in %.3f seconds' %
(len(recips), (t1-t0)))
+
+ if refused:
+ syslog('post', 'post to %s from %s, size=%d, %d failures' %
+ (mlist.internal_name(), msg.GetSender(), len(msg.body),
+ len(refused)))
+ else:
+ syslog('post', 'post to %s from %s, size=%d, success' %
+ (mlist.internal_name(), msg.GetSender(), len(msg.body)))
+
+ # Process any failed deliveries.
tempfailures = []
for recip, (code, smtpmsg) in refused.items():
# DRUMS is an internet draft, but it says: