[Mailman-Users] Puzzle Regarding Sender Header

David Eisner deisner at gmail.com
Sat Jan 16 00:59:55 CET 2010

I just moved a Mailman setup from one server to another.  This is
Mailman 2.1.12, with one modification, described in this message:[1]
Basically, I change the Sender header in SMTPDirect.py so it comes
from the -admin address rather than the -bounce address:

    # msg['Sender'] = envsender
    msg['Sender'] = mlist.getListAddress('admin')

The new server has two network interfaces.  Each interface has its own
IP.  The second interface has a single IP, call it, with two
hostnames mapped to it:

  intranet.foo.org. A
  lists.foo.org A

The reverse DNS mapping for points to intranet.foo.org.

I've set the host_name for all the lists to be 'lists.foo.org'.  I
also set DEFAULT_EMAIL_HOST and DEFAULT_URL_HOST to 'lists.foo.org'.
I also ran fix_url for all the lists.

Everything is working fine, except for one problem: the Sender: header
in messages is 'listname-admin at intranet.foo.org' rather than the
desired 'listname-admin at lists.foo.org'.

I added this to mm_cfg.py, but it didn't help:

  DEFAULT_EMAIL_HOST = 'lists.foo.org'
  DEFAULT_URL_HOST = 'lists.foo.org'

The weird thing is that if I use withlist, it tells me the list
address is 'lists.foo.org' (I've obfuscated the hostname consistent
with the rest of this message):

$ withlist -l test
Loading list test (locked)
The variable `m' is the test MailList instance
>>> m.getListAddress('admin')
'test-admin at lists.foo.org'
>>> m.getListAddress()
'test at lists.foo.org'

I undid my patch as a sanity check, but it does what I'd expect: the
Sender: header is now "test-bounces at intranet.foo.org" rather than
"test-admin at intranet.foo.org", but not "test-bounces at lists.foo.org".

Any ideas?  Thanks.


[1] http://mail.python.org/pipermail/mailman-users/2009-March/065568.html

David Eisner     http://cradle.brokenglass.com

More information about the Mailman-Users mailing list