Subject: mailman: Hostname settings are ignored when generating admin emails

From: Chris Adams <[email-masked]>
Date: Tue, 14 Nov 2006 17:18:51 -0800

Package: mailman
Version: 2.1.5-8sarge5
Severity: normal

We're using mailman with a virtual domain ("lists.example.edu") on an
existing postfix server ("example.edu"). Postfix is configured to use a
mailman transport for that domain.

We have the various host variables set to "lists.example.edu":

DEFAULT_EMAIL_HOST = 'lists.example.edu'
DEFAULT_URL_HOST   = 'lists.example.edu'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

This works for normal usage - list traffic goes to the right places, the
web pages are generated correctly and all of the host names listed in
emails are correct.

Unfortunately the email address generated for subscription requests and
other admin messages is generated incorrectly as "server.example.edu"
and so these requests bounce.

The list-related headers are generated correctly:
Message-ID: <[email-masked]>
X-BeenThere: [email-masked]
List-Id: test.lists.example.edu

Everything else is generated incorrectly:
Return-Path: <[email-masked]>
From: [email-masked]
Reply-To: [email-masked]
Sender: [email-masked]
Errors-To: [email-masked]

After a fair amount of searching it appears that this is not supposed to
be possible as long as DEFAULT_EMAIL_HOST is set correctly. Postfix is
not configured to masquerade email.

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.12-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages mailman depends on:
ii  apache [httpd]        1.3.33-6sarge3     versatile, high-performance HTTP s
ii  cron                  3.0pl1-86          management of regular background p
ii  debconf               1.4.30.13          Debian configuration management sy
ii  libc6                 2.3.2.ds1-22sarge4 GNU C Library: Shared libraries an
ii  logrotate             3.7-5              Log rotation utility
ii  postfix [mail-transpo 2.1.5-9            A high-performance mail transport 
ii  pwgen                 2.03-1             Automatic Password generation
ii  python                2.3.5-2            An interactive high-level object-o
ii  ucf                   1.17               Update Configuration File: preserv

-- debconf information:
* mailman/queue_files_present:
  mailman/default_server_language: en
  mailman/gate_news: false
* mailman/site_languages: en
* mailman/used_languages: en
* mailman/create_site_list:

---

From: Lionel Elie Mamane <[email-masked]>
Date: Wed, 15 Nov 2006 10:05:29 +0100

On Tue, Nov 14, 2006 at 05:18:51PM -0800, Chris Adams wrote:

> Unfortunately the email address generated for subscription requests
> and other admin messages is generated incorrectly as
> "server.example.edu" and so these requests bounce.

> After a fair amount of searching it appears that this is not
> supposed to be possible as long as DEFAULT_EMAIL_HOST is set
> correctly. Postfix is not configured to masquerade email.

Have you created the list before setting DEFAULT_EMAIL_HOST and/or
DEFAULT_URL_HOST correctly? In this case, you need to call:

 /var/lib/mailman/bin/withlist -l -r fix_url ${LISTNAME}

Else, please do the following:

/var/lib/mailman/bin/withlist -i ${LISTNAME}
m.getListAddress('request')
m.GetListEmail()
m.GetRequestEmail()
m.internal_name()
m.host_name
m.GetConfirmEmail("foo")

What are the answers?

-- 
Lionel

---

From: Chris Adams <[email-masked]>
Date: Wed, 15 Nov 2006 09:06:52 -0800

>  /var/lib/mailman/bin/withlist -l -r fix_url ${LISTNAME}

I'm sorry - I should have mentioned that I had already run fix_url.

> m.getListAddress('request')

Loading list test (unlocked)
The variable `m' is the test MailList instance
 >>> m.getListAddress('request')
[email-masked]'
 >>> m.GetListEmail()
[email-masked]'
 >>> m.GetRequestEmail()
[email-masked]'
 >>> m.internal_name()
'test'
 >>> m.host_name
'lists.example.edu'
 >>> m.GetConfirmEmail("foo")
[email-masked]'

---

From: Lionel Elie Mamane <[email-masked]>
Date: Wed, 15 Nov 2006 19:44:21 +0100

Please keep [email-masked] in the CC list.

>> please do the following:

>> (...)

> [email-masked]'

GetRequestEmail is exactly what gets called to determine the value to
give to the Reply-To and From headers. Are you absolutely 100% certain
that postfix doesn't muck with the mail later? Could you for example
snoop on the communication between postfix and mailman (with a packet
sniffer that can reconstruct TCP flows, such as ethereal) to check
what mailman sends to postfix?

-- 
Lionel