[Mailman-Users] Odd replacement of the sender address

Mark Sapiro mark at msapiro.net
Tue Feb 19 06:16:40 CET 2013


Michael Smith wrote:
>
>I have a strange problem using mailman 2.1.13: Every time, a mail is sent
>to one of the lists, the real sender address is replaced by
>somelocaluser at example.com (somelocaluser being a unix user on the server
>and example.com being the domain). This is very inconvenient since some of
>the addresses doesn't even exist. Interestingly only the address is
>changed; the name is unaltered. For example "John Doe <john at thedoefamily.com>"
>might become "John Doe <root at example.com>".


I have been working a similar but not identical problem (From: header
replaced with one containing Sender: or the envelope sender). See the
thread at
<http://mail.python.org/pipermail/mailman-users/2013-February/074709.html>
for the start of this.

I gave him the attached patch to Mailman/Handlers/SMTPDirect.py, which
logs the content of the messages From: and Message-ID: headers upon
entry to SMTPDirect.py and after delivery to the outgoing MTA. The
From: is unchanged in these log messages, and the ultimate, erroneous
From: has been added after (above in the message headers) the
Received: header added by the outgoing MTA.

Thus, it seems that the header must be munged or removed after initial
SMTP delivery to the outgoing MTA. You might try the patch and see if
the same appears true in your case.

The instructions I provided with the patch (his MTA is Postfix) are:

SMTPDirect.patch.txt is a patch you can apply to
Mailman/Handlers/SMTPDirect.py via the command

patch /path/to/Mailman/Handlers/SMTPDirect.py
/path/to/SMTPDirect.patch.txt

(all on one line). This adds two statements to log to Mailman's 'debug'
log the values of each message's From: header and Message-ID: header
upon entry and after sending the message. Apply this patch and restart
Mailman and then look at Mailman's 'debug' log after a post.

Then you can remove the patch via

patch -R /path/to/Mailman/Handlers/SMTPDirect.py
/path/to/SMTPDirect.patch.txt

(again, all on one line) and restart Mailman. The information in the
debug log will tell us whether the message had a good From: upon entry
to SMTPDirect and whether it had a good From: upon delivery to Postfix.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SMTPDirect.patch.txt
URL: <http://mail.python.org/pipermail/mailman-users/attachments/20130218/5b366868/attachment.txt>


More information about the Mailman-Users mailing list