diff options
Diffstat (limited to 'Mailman/Handlers/Sendmail.py')
| -rw-r--r-- | Mailman/Handlers/Sendmail.py | 5 |
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: |
