summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/Handlers/SMTPDirect.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py
index 1c64b4698..fe44e1d3f 100644
--- a/Mailman/Handlers/SMTPDirect.py
+++ b/Mailman/Handlers/SMTPDirect.py
@@ -80,10 +80,14 @@ def process(mlist, msg, msgdata):
(len(recips), (t1-t0)))
if refused:
+ # Always log failures
syslog('post', 'post to %s from %s, size=%d, %d failures' %
(mlist.internal_name(), msg.GetSender(), len(msg.body),
len(refused)))
- else:
+ elif msgdata.get('tolist'):
+ # Log the successful post, but only if it really was a post to the
+ # mailing list. Don't log sends to the -owner, or -admin addrs.
+ # -request addrs should never get here.
syslog('post', 'post to %s from %s, size=%d, success' %
(mlist.internal_name(), msg.GetSender(), len(msg.body)))