summaryrefslogtreecommitdiff
path: root/Mailman/MailList.py
diff options
context:
space:
mode:
authorbwarsaw1999-03-09 19:36:48 +0000
committerbwarsaw1999-03-09 19:36:48 +0000
commitfb699dd06ad94e9dd4f29bb5ba0965261e65ee3b (patch)
treed527ed30d8cb48685edf821e1b68612fd17614d7 /Mailman/MailList.py
parenta4079818fc472196d19bb5c89b199e318c2cb4bf (diff)
downloadmailman-fb699dd06ad94e9dd4f29bb5ba0965261e65ee3b.tar.gz
mailman-fb699dd06ad94e9dd4f29bb5ba0965261e65ee3b.tar.zst
mailman-fb699dd06ad94e9dd4f29bb5ba0965261e65ee3b.zip
(Defaults.py.in): Added USE_ENVELOPE_SENDER variable, which is set to
1 by default. This instructs the MailList.Post() method to use first the envelope sender (i.e. Unix "From " line) and then the From: header. However, this breaks member_only_posting on some systems (for reasons unknown). Set this variable to 0 in mm_cfg.py to use only the From: header, although this can open the list up to spam. (MailList.py): in Post(), check USE_ENVELOPE_SENDER to see if GetEnvelopeSender() should be called. (FAQ): Add a question refering to USE_ENVELOPE_SENDER.
Diffstat (limited to 'Mailman/MailList.py')
-rw-r--r--Mailman/MailList.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index acb2a12b5..733d67e0e 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1041,9 +1041,13 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
msgapproved = self.ExtractApproval(msg)
if not approved:
approved = msgapproved
- sender = msg.GetEnvelopeSender()
+ sender = None
+ if mm_cfg.USE_ENVELOPE_SENDER:
+ sender = msg.GetEnvelopeSender()
if not sender:
sender = msg.GetSender()
+## sys.stderr.write('envsend: %s, sender: %s\n' %
+## (msg.GetEnvelopeSender(), msg.GetSender()))
# If it's the admin, which we know by the approved variable,
# we can skip a large number of checks.
if not approved:
@@ -1139,9 +1143,9 @@ class MailList(MailCommandHandler, HTMLFormatter, Deliverer, ListAdmin,
subj, re.I):
msg.SetHeader('Subject', '%s%s' % (prefix, subj))
if self.anonymous_list:
- del msg['reply-to']
- del msg['sender']
- msg.SetHeader('From', self.GetAdminEmail())
+ del msg['reply-to']
+ del msg['sender']
+ msg.SetHeader('From', self.GetAdminEmail())
if self.digestable:
self.SaveForDigest(msg)
if self.archive: