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
>[email protected] (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 <[email protected]>"
>might become "John Doe <[email protected]>".
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 <[email protected]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
--- /cygdrive/f/test-mailman-2.1/Mailman/Handlers/SMTPDirect.py 2011-03-17
22:20:28.000000000 -0700
+++ Mailman/Handlers/SMTPDirect.py 2013-02-14 18:05:47.015625000 -0800
@@ -95,6 +95,10 @@
def process(mlist, msg, msgdata):
+ syslog('debug', 'On entry From: = "%s", Message-ID = "%s',
+ msg.get('from', ''),
+ msg.get('message-id', '')
+ )
recips = msgdata.get('recips')
if not recips:
# Nobody to deliver to!
@@ -169,6 +173,10 @@
conn.quit()
msgdata['recips'] = origrecips
# Log the successful post
+ syslog('debug', 'After send From: = "%s", Message-ID = "%s',
+ msg.get('from', ''),
+ msg.get('message-id', '')
+ )
t1 = time.time()
d = MsgSafeDict(msg, {'time' : t1-t0,
# BAW: Urg. This seems inefficient.
------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org