Integrating mailman with postfix, using virtual domains

I'm sure this has been covered many times; however nothing I've found so far in the mailing list archives has alleviated this problem.
I've followed the mailman documentation for integrating mailman with postfix, according to http://www.list.org/mailman-install/postfix-virtual.html as well as various mailing list posts on this list.
Note that I am attempting to configure a virtual_mailbox_domain with mailman (not a virtual_alias_domain).
mm_cfg.py contains:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['valnet.net'] MTA = 'Postfix' DEFAULT_URL_HOST = 'mail.valnet.net' DEFAULT_EMAIL_HOST = 'valnet.net' VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'valnet.net'
A mailing list was created with the newlist, which created /etc/mailman/aliases and /etc/mailman/virtual-mailman (and their associated db files).
I've added /etc/mailman/virtual-mailman to my virtual_alias_maps, and added /etc/mailman/aliases to my alias_maps and alias_database in main.cf:
alias_maps = hash:/etc/aliases, hash:/etc/mailman/aliases alias_database = hash:/etc/aliases, hash:/etc/mailman/aliases virtual_alias_maps = hash:/etc/mailman/virtual-mailman
If I'm reading all of the documentation correctly, that should be all that is necessary to make it work.
Unfortunately, when I send an email to testlist@valnet.net I receive a bounce back of:
<testlist@valnet.net>: unknown user: "testlist@valnet.net"
With an associated postfix log entry of:
Oct 10 19:22:47 mail postfix/virtual[22090]: DBF7241F5F: to=<testlist@valnet.net>, relay=virtual, delay=0.39, delays=0.36/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "testlist@valnet.net")
When I test the alias maps I see:
[root@mail postfix]# postmap -q testlist@valnet.net hash:/etc/mailman/virtual-mailman testlist [root@mail postfix]# postmap -q testlist hash:/etc/mailman/aliases
"|/usr/lib/mailman/mail/mailman post testlist"
That output *seems* correct, but I don't know if that's really correct or not.
In case it's worth noting, the list administrator specified in newlist does receive an email about the list being created.
I really think I've just missed something simple in the documentation, but the documentation for how to do this is strung out in so many different places and is a bit difficult to find, that I'm not entirely certain I've read it all.
Any tips or things to check would be appreciated.
Thanks, Nick

On 10/10/2011 5:40 PM, Nick Bright wrote:
The above line is wrong. Normally you shouldn't need to specify VIRTUAL_MAILMAN_LOCAL_DOMAIN at all, but if it is specified, it should be something like 'localhost' or 'some.other.postfix.local.domain'. It must not be the list domain because if it is it will result in virtual-mailman mappings like
testlist@valnet.net testlist@valnet.net
which tell Postfix to map the virtual domain address testlist@valnet.net to the address testlist@valnet.net which is the same address and doesn't tell Postfix what real address to actually deliver to.
[...]
Because you are mapping testlist@valnet.net to testlist@valnet.net instead of to testlist or testlist@localhost
This is the puzzling part as it says that the mapping in virtual-mailman is to testlist and not to testlist@valnet.net, so it should be working ???
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/11/2011 6:07 PM, Mark Sapiro wrote:
[...]
Thank you for your reply, I appreciate you taking the time to look at my question.
I've commented out VIRTUAL_MAILMAN_LOCAL_DOMAIN completely from mm_cfg.py, and reran genaliases.
It's created a /etc/mailman/virtual-mailman contents of:
# STANZA START: testlist # CREATED: Wed Oct 12 13:16:32 2011 testlist@valnet.net testlist testlist-admin@valnet.net testlist-admin testlist-bounces@valnet.net testlist-bounces testlist-confirm@valnet.net testlist-confirm testlist-join@valnet.net testlist-join testlist-leave@valnet.net testlist-leave testlist-owner@valnet.net testlist-owner testlist-request@valnet.net testlist-request testlist-subscribe@valnet.net testlist-subscribe testlist-unsubscribe@valnet.net testlist-unsubscribe # STANZA END: testlist
and /etc/mailman/aliases contents of:
# STANZA START: testlist # CREATED: Wed Oct 12 13:16:32 2011 testlist: "|/usr/lib/mailman/mail/mailman post testlist" testlist-admin: "|/usr/lib/mailman/mail/mailman admin testlist" testlist-bounces: "|/usr/lib/mailman/mail/mailman bounces testlist" testlist-confirm: "|/usr/lib/mailman/mail/mailman confirm testlist" testlist-join: "|/usr/lib/mailman/mail/mailman join testlist" testlist-leave: "|/usr/lib/mailman/mail/mailman leave testlist" testlist-owner: "|/usr/lib/mailman/mail/mailman owner testlist" testlist-request: "|/usr/lib/mailman/mail/mailman request testlist" testlist-subscribe: "|/usr/lib/mailman/mail/mailman subscribe testlist" testlist-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe testlist" # STANZA END: testlist
But still, when I send a message to testlist@valnet.net a bounce is generated as:
<testlist@valnet.net>: unknown user: "testlist@valnet.net"
with an associated postfix log entry of:
Oct 12 13:17:22 mail postfix/virtual[30579]: 7B1FC416DB: to=<testlist@valnet.net>, relay=virtual, delay=0.06, delays=0.03/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "testlist@valnet.net")
Identical behavior was observed when changing VIRTUAL_MAILMAN_LOCAL_DOMAIN to 'localhost'.
The problem seems, to me, to be that the mail isn't making it to the "local" delivery agent; but I am new to postfix and mailman so I'm not really certain of how to make that happen.
Thanks in advance for any further advice,
- Nick

On 10/12/2011 11:29 AM, Nick Bright wrote:
You are correct about the problem. virtual-mailman maps testlist@valnet.net to testlist and postfix qualifies that with a domain which is the value of myorigin which defaults to the value of myhostname and that appears to be valnet.net which is not a local domain. So, if that is what you want in Postfix, this is one of the cases where you do need to specify VIRTUAL_MAILMAN_LOCAL_DOMAIN, and it needs to be one of the domains in Postfix's mydestination. Normally (at least by default) localhost is one of the domains in mydestination, but if you ran bin/genaliases after setting
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
and still had the problem, it must not be in your case. Try setting VIRTUAL_MAILMAN_LOCAL_DOMAIN to one of the domains in mydestination and run bin/genaliases.
If you are still stuck, please post the output from 'postconf -n'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/12/2011 7:53 PM, Syafril Hermansyah wrote:
Except the OP's requirement was that valnet.net be a virtual mailbox domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/13/2011 01:43 PM, Mark Sapiro wrote:
That's not wise IMHO, better to separate domain for list server and virtual mailbox domain. Suppose valnet.net already use as virtual mailbox domain, create new subdomain list.valve.net for mailing list.
At first I set my postfix also as virtual mailbox domain because I need mail forwarding but at the end I change my mind by setting up mailbox redirecting in postfix, that way I don't need to install dovecot etc :-)
-- syafril
Syafril Hermansyah

On Thu, 13 Oct 2011, Syafril Hermansyah wrote:
That's not wise IMHO, better to separate domain for list server and virtual mailbox domain.
I've *never* had to do this and believe it just creates unecesary complexity where it's not needed.
Geoff.

On 10/13/2011 11:54 PM, Geoff Shang wrote:
This recommendation for public mailing list, not for internal use only. When we used same domain for virtual mailbox domain and mailing list sometimes sender/poster confused which address for mailing list or mailbox, unless we made special name/arrangement such Listname-L@domain.tld.
Making separate domains just to make simple/clear from sender/poster point of view also making the configuration on postfix/mailman quite simple. Just in case in the future the traffic of mailing list growing up which can make mail for ordinary (corporate) affected, we can move all of mailing list to other host. If you run your own DNS server, creation of subdomain is no cost (no need to buy/pay to domain registrar/registrant).
-- syafril
Syafril Hermansyah

On 10/10/2011 5:40 PM, Nick Bright wrote:
The above line is wrong. Normally you shouldn't need to specify VIRTUAL_MAILMAN_LOCAL_DOMAIN at all, but if it is specified, it should be something like 'localhost' or 'some.other.postfix.local.domain'. It must not be the list domain because if it is it will result in virtual-mailman mappings like
testlist@valnet.net testlist@valnet.net
which tell Postfix to map the virtual domain address testlist@valnet.net to the address testlist@valnet.net which is the same address and doesn't tell Postfix what real address to actually deliver to.
[...]
Because you are mapping testlist@valnet.net to testlist@valnet.net instead of to testlist or testlist@localhost
This is the puzzling part as it says that the mapping in virtual-mailman is to testlist and not to testlist@valnet.net, so it should be working ???
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/11/2011 6:07 PM, Mark Sapiro wrote:
[...]
Thank you for your reply, I appreciate you taking the time to look at my question.
I've commented out VIRTUAL_MAILMAN_LOCAL_DOMAIN completely from mm_cfg.py, and reran genaliases.
It's created a /etc/mailman/virtual-mailman contents of:
# STANZA START: testlist # CREATED: Wed Oct 12 13:16:32 2011 testlist@valnet.net testlist testlist-admin@valnet.net testlist-admin testlist-bounces@valnet.net testlist-bounces testlist-confirm@valnet.net testlist-confirm testlist-join@valnet.net testlist-join testlist-leave@valnet.net testlist-leave testlist-owner@valnet.net testlist-owner testlist-request@valnet.net testlist-request testlist-subscribe@valnet.net testlist-subscribe testlist-unsubscribe@valnet.net testlist-unsubscribe # STANZA END: testlist
and /etc/mailman/aliases contents of:
# STANZA START: testlist # CREATED: Wed Oct 12 13:16:32 2011 testlist: "|/usr/lib/mailman/mail/mailman post testlist" testlist-admin: "|/usr/lib/mailman/mail/mailman admin testlist" testlist-bounces: "|/usr/lib/mailman/mail/mailman bounces testlist" testlist-confirm: "|/usr/lib/mailman/mail/mailman confirm testlist" testlist-join: "|/usr/lib/mailman/mail/mailman join testlist" testlist-leave: "|/usr/lib/mailman/mail/mailman leave testlist" testlist-owner: "|/usr/lib/mailman/mail/mailman owner testlist" testlist-request: "|/usr/lib/mailman/mail/mailman request testlist" testlist-subscribe: "|/usr/lib/mailman/mail/mailman subscribe testlist" testlist-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe testlist" # STANZA END: testlist
But still, when I send a message to testlist@valnet.net a bounce is generated as:
<testlist@valnet.net>: unknown user: "testlist@valnet.net"
with an associated postfix log entry of:
Oct 12 13:17:22 mail postfix/virtual[30579]: 7B1FC416DB: to=<testlist@valnet.net>, relay=virtual, delay=0.06, delays=0.03/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "testlist@valnet.net")
Identical behavior was observed when changing VIRTUAL_MAILMAN_LOCAL_DOMAIN to 'localhost'.
The problem seems, to me, to be that the mail isn't making it to the "local" delivery agent; but I am new to postfix and mailman so I'm not really certain of how to make that happen.
Thanks in advance for any further advice,
- Nick

On 10/12/2011 11:29 AM, Nick Bright wrote:
You are correct about the problem. virtual-mailman maps testlist@valnet.net to testlist and postfix qualifies that with a domain which is the value of myorigin which defaults to the value of myhostname and that appears to be valnet.net which is not a local domain. So, if that is what you want in Postfix, this is one of the cases where you do need to specify VIRTUAL_MAILMAN_LOCAL_DOMAIN, and it needs to be one of the domains in Postfix's mydestination. Normally (at least by default) localhost is one of the domains in mydestination, but if you ran bin/genaliases after setting
VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'localhost'
and still had the problem, it must not be in your case. Try setting VIRTUAL_MAILMAN_LOCAL_DOMAIN to one of the domains in mydestination and run bin/genaliases.
If you are still stuck, please post the output from 'postconf -n'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/12/2011 7:53 PM, Syafril Hermansyah wrote:
Except the OP's requirement was that valnet.net be a virtual mailbox domain.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 10/13/2011 01:43 PM, Mark Sapiro wrote:
That's not wise IMHO, better to separate domain for list server and virtual mailbox domain. Suppose valnet.net already use as virtual mailbox domain, create new subdomain list.valve.net for mailing list.
At first I set my postfix also as virtual mailbox domain because I need mail forwarding but at the end I change my mind by setting up mailbox redirecting in postfix, that way I don't need to install dovecot etc :-)
-- syafril
Syafril Hermansyah

On Thu, 13 Oct 2011, Syafril Hermansyah wrote:
That's not wise IMHO, better to separate domain for list server and virtual mailbox domain.
I've *never* had to do this and believe it just creates unecesary complexity where it's not needed.
Geoff.

On 10/13/2011 11:54 PM, Geoff Shang wrote:
This recommendation for public mailing list, not for internal use only. When we used same domain for virtual mailbox domain and mailing list sometimes sender/poster confused which address for mailing list or mailbox, unless we made special name/arrangement such Listname-L@domain.tld.
Making separate domains just to make simple/clear from sender/poster point of view also making the configuration on postfix/mailman quite simple. Just in case in the future the traffic of mailing list growing up which can make mail for ordinary (corporate) affected, we can move all of mailing list to other host. If you run your own DNS server, creation of subdomain is no cost (no need to buy/pay to domain registrar/registrant).
-- syafril
Syafril Hermansyah
participants (4)
-
Geoff Shang
-
Mark Sapiro
-
Nick Bright
-
Syafril Hermansyah