summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbwarsaw1999-11-26 15:27:50 +0000
committerbwarsaw1999-11-26 15:27:50 +0000
commit45738c6d87d9676911f0aa76a0156aefd8c7dfb7 (patch)
tree6f4dfd2781cc61133b86c1e4fd33f9d897f80ef1
parente1e179611b34909bde3383c9e0d1dc991b04f53a (diff)
downloadmailman-45738c6d87d9676911f0aa76a0156aefd8c7dfb7.tar.gz
mailman-45738c6d87d9676911f0aa76a0156aefd8c7dfb7.tar.zst
mailman-45738c6d87d9676911f0aa76a0156aefd8c7dfb7.zip
-rw-r--r--Mailman/Handlers/Sendmail.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Handlers/Sendmail.py b/Mailman/Handlers/Sendmail.py
index f2d12acbc..2b70f2094 100644
--- a/Mailman/Handlers/Sendmail.py
+++ b/Mailman/Handlers/Sendmail.py
@@ -52,6 +52,8 @@ def process(mlist, msg):
program.
"""
+ # Use -f to set the envelope sender
+ cmd = mm_cfg.SENDMAIL_CMD + ' -f ' + msg.GetSender() + ' '
# make sure the command line is of a manageable size
recipchunks = []
currentchunk = []
@@ -71,7 +73,8 @@ def process(mlist, msg):
msgtext = str(msg)
# cycle through all chunks
for recips in recipchunks:
- fp = os.popen(mm_cfg.SENDMAIL_CMD + ' ' + recips, 'w')
+ # TBD: SECURITY ALERT. This invokes the shell!
+ fp = os.popen(cmd + recips, 'w')
fp.write(msgtext)
status = fp.close()
if status: