summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1999-12-16 00:04:00 +0000
committerbwarsaw1999-12-16 00:04:00 +0000
commit8c3c47ac5a7655c46866f7ad154c82ba3f64e11f (patch)
tree34c05bfe3c3fdec18e029e3ac673148149f3a90a
parenta19fe9424fd06322967e7ae4a88e9cd1bcf4cc1e (diff)
downloadmailman-8c3c47ac5a7655c46866f7ad154c82ba3f64e11f.tar.gz
mailman-8c3c47ac5a7655c46866f7ad154c82ba3f64e11f.tar.zst
mailman-8c3c47ac5a7655c46866f7ad154c82ba3f64e11f.zip
process(): Use only the From: field to get the name to stick in the
TOC. Try to use the From:'s name comment, otherwise fallback to just the address. Do /not/ use the Sender: field because by now it's been munged into the list-admin's address.
-rw-r--r--Mailman/Handlers/ToDigest.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py
index d6b6e459a..dfe9930eb 100644
--- a/Mailman/Handlers/ToDigest.py
+++ b/Mailman/Handlers/ToDigest.py
@@ -51,7 +51,11 @@ def process(mlist, msg):
topicsfp = open(topicsfile, 'a+')
finally:
os.umask(omask)
- sender = quotemime(msg.GetSenderName())
+ # For the sender, use either the From: field's name comment or the mail
+ # address. Don't use Sender: field because by now it's been munged into
+ # the list-admin's address
+ name, addr = msg.getaddr('from')
+ sender = quotemime(name or addr)
fromline = quotemime(msg.getheader('from'))
date = quotemime(msg.getheader('date'))
body = quotemime(msg.body)
@@ -170,6 +174,9 @@ def inject_digest(mlist, digestfile, topicsfile):
os.unlink(topicsfile)
mlist.next_digest_number = mlist.next_digest_number + 1
mlist.next_post_number = 1
+ mlist.LogMsg('digest', 'next %s digest: #%d, post#%d' %
+ (mlist.internal_name(), mlist.next_digest_number,
+ mlist.next_post_number))