summaryrefslogtreecommitdiff
path: root/Mailman/Deliverer.py
diff options
context:
space:
mode:
authorhmeland1999-05-04 14:10:10 +0000
committerhmeland1999-05-04 14:10:10 +0000
commit181e620fcc2cc898bb549bf22377d2f154ed0a3a (patch)
treec14df1c18e81f461d075549bff7f1a2a2109f748 /Mailman/Deliverer.py
parent1e6ce6fe639d29ab680733050744fd44db2fc382 (diff)
downloadmailman-181e620fcc2cc898bb549bf22377d2f154ed0a3a.tar.gz
mailman-181e620fcc2cc898bb549bf22377d2f154ed0a3a.tar.zst
mailman-181e620fcc2cc898bb549bf22377d2f154ed0a3a.zip
Diffstat (limited to 'Mailman/Deliverer.py')
-rw-r--r--Mailman/Deliverer.py25
1 files changed, 9 insertions, 16 deletions
diff --git a/Mailman/Deliverer.py b/Mailman/Deliverer.py
index 74a701c61..bf7c39171 100644
--- a/Mailman/Deliverer.py
+++ b/Mailman/Deliverer.py
@@ -96,11 +96,14 @@ class Deliverer:
return string.join(string.split(text, '\n.\n'), '\n .\n')
#
- # this function is used to deliver messages
- # that are sent to <listname>-admin. the sender
- # is the envelope sender of the message, or if
- # that is not available, the sender via Message.GetSender()
- # the recipients arg is a list of the current list
+ # This function is used to deliver messages
+ # that are sent to <listname>-admin. The sender
+ # of the Mailman-originating message is the admin address
+ # of the list -- otherwise, if both incoming sender and the
+ # list's admin address(es) were non-local, many MTAs
+ # wouldn't accept the message as it would be considered
+ # improper relaying.
+ # The recipients arg is a list of the current list
# owners. We don't mess with adding list specific
# headers on body modifications so that the address
# will work just like a normal forwarding address
@@ -108,22 +111,12 @@ class Deliverer:
def DeliverToOwner(self, msg, recipients):
if not (len(recipients)):
return
- sender = None
- if mm_cfg.USE_ENVELOPE_SENDER:
- sender = msg.GetEnvelopeSender()
- if not sender:
- sender = msg.GetSender()
- if sender:
- if not '@' in sender:
- sender = sender + "@" + mm_cfg.DEFAULT_HOST_NAME
- else:
- sender = self.GetAdminEmail()
cmd = "%s %s" % (mm_cfg.PYTHON,
os.path.join(mm_cfg.SCRIPTS_DIR, "deliver"))
cmdproc = os.popen(cmd, 'w')
cmdproc.write("%d\n" % self.num_spawns)
- cmdproc.write("%s\n" % sender)
+ cmdproc.write("%s\n" % self.GetAdminEmail())
for r in recipients:
# Mustn't send blank lines before end of recipients:
if not r: continue