[Mailman-Users] Mailman 2 + Postfix + virtual domains + lists subdomain
Jérôme
jerome at jolimont.fr
Tue Jul 5 19:47:23 EDT 2016
Hi.
I'm trying to configure mailman/postfix with virtual domains.
Both postfix and mailman are installed using Debian packages.
Postfix works with virtual domains domain1.tld and domain2.tld.
I would like Mailman to serve mailing lists on lists.domain1.tld and
lists.domain2.tld.
I've been reading these, of course:
http://www.gnu.org/software/mailman/mailman-install/postfix-integration.html
http://www.gnu.org/software/mailman/mailman-install/postfix-virtual.html
AFAIU, postfix_to_mailman.py is not needed and not recommended, so I'd
avoid it if possible:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718284
It appears in the configuration, but I tried both with and without.
Here are (hopefully comprehensive) config files excerpts :
------------------------------------------------------------
mailman mm_cfg.py
------------------------------------------------------------
DEFAULT_EMAIL_HOST = 'lists.domain1.tld'
DEFAULT_URL_HOST = 'domain1.tld'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
add_virtualhost ('domain2.tld', 'lists.domain2.tld')
MTA = 'Postfix'
POSTFIX_STYLE_VIRTUAL_DOMAINS = [
'lists.domain1.tld',
'lists.domain2.tld',
]
------------------------------------------------------------
------------------------------------------------------------
postfix main.cf
------------------------------------------------------------
myorigin = domain1.tld
mydomain = domain1.tld
myhostname = domain1.tld
# System users
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# Virtual users
virtual_mailbox_base = /var/mail/vmail/
virtual_mailbox_domains = proxy:pgsql:/etc/postfix/virtual-domains.cf
virtual_mailbox_maps = proxy:pgsql:/etc/postfix/virtual-mailbox-maps.cf
virtual_uid_maps = static:113
virtual_gid_maps = static:121
virtual_alias_maps = proxy:pgsql:/etc/postfix/virtual-alias-maps.cf,
hash:/var/lib/mailman/data/virtual-mailman
# Dovecot
dovecot_destination_recipient_limit = 1
virtual_transport = dovecot
# Mailman
# cf. /etc/mailman/postfix-to-mailman.py
# relay_domains = lists.domain1.tld, lists.domain2.tld
# relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman
# transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1
------------------------------------------------------------
postfix master.cf
------------------------------------------------------------
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
------------------------------------------------------------
------------------------------------------------------------
postfix transport
------------------------------------------------------------
lists.domain1.tld mailman:
lists.domain2.tld mailman:
------------------------------------------------------------
------------------------------------------------------------
DNS for domain1
------------------------------------------------------------
@ 3600 IN A xxx.xxx.xxx.xxx
lists 3600 IN A xxx.xxx.xxx.xxx
@ 3600 IN MX 10 domain1.tld.
@ 3600 IN TXT "v=spf1 a mx -all"
------------------------------------------------------------
I created a test list 'test at lists.domain1.tld' using mailman's
bin/newlist.
------------------------------------------------------------
mailman aliases
------------------------------------------------------------
mailman: "|/var/lib/mailman/mail/mailman post mailman"
mailman-admin: "|/var/lib/mailman/mail/mailman admin mailman"
mailman-bounces: "|/var/lib/mailman/mail/mailman bounces mailman"
mailman-confirm: "|/var/lib/mailman/mail/mailman confirm mailman"
mailman-join: "|/var/lib/mailman/mail/mailman join mailman"
mailman-leave: "|/var/lib/mailman/mail/mailman leave mailman"
mailman-owner: "|/var/lib/mailman/mail/mailman owner mailman"
mailman-request: "|/var/lib/mailman/mail/mailman request mailman"
mailman-subscribe: "|/var/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe
mailman"
test: "|/var/lib/mailman/mail/mailman post test"
test-admin: "|/var/lib/mailman/mail/mailman admin test"
test-bounces: "|/var/lib/mailman/mail/mailman bounces test"
test-confirm: "|/var/lib/mailman/mail/mailman confirm test"
test-join: "|/var/lib/mailman/mail/mailman join test"
test-leave: "|/var/lib/mailman/mail/mailman leave test"
test-owner: "|/var/lib/mailman/mail/mailman owner test"
test-request: "|/var/lib/mailman/mail/mailman request test"
test-subscribe: "|/var/lib/mailman/mail/mailman subscribe test"
test-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe test"
------------------------------------------------------------
------------------------------------------------------------
mailman virtual-mailman
------------------------------------------------------------
mailman at lists.domain1.tld mailman
mailman-admin at lists.domain1.tld mailman-admin
mailman-bounces at lists.domain1.tld mailman-bounces
mailman-confirm at lists.domain1.tld mailman-confirm
mailman-join at lists.domain1.tld mailman-join
mailman-leave at lists.domain1.tld mailman-leave
mailman-owner at lists.domain1.tld mailman-owner
mailman-request at lists.domain1.tld mailman-request
mailman-subscribe at lists.domain1.tld mailman-subscribe
mailman-unsubscribe at lists.domain1.tld mailman-unsubscribe
test at lists.domain1.tld test
test-admin at lists.domain1.tld test-admin
test-bounces at lists.domain1.tld test-bounces
test-confirm at lists.domain1.tld test-confirm
test-join at lists.domain1.tld test-join
test-leave at lists.domain1.tld test-leave
test-owner at lists.domain1.tld test-owner
test-request at lists.domain1.tld test-request
test-subscribe at lists.domain1.tld test-subscribe
test-unsubscribe at lists.domain1.tld test-unsubscribe
------------------------------------------------------------
Test 1:
Connecting to the server's webmail and sending a mail to the test list.
I get this error:
<test at domain1.tld> (expanded from
<test at lists.domain1.tld>): user unknown
I read the FAQ (http://wiki.list.org/x/uYA9) and double checked I do
have a A record for lists.domain1.tld.
Test 2:
Sending a mail to the test list using my mail client, the SMTP being
the server itself (postfix/dovecot).
The message does not even leave the mail client. I get this error:
554 5.7.1 <test at lists.domain1.tld>: Relay access denied
Since both methods use the same SMTP, I wonder why I get this
difference between both tests.
I tried both commenting / uncommenting the 'transport_maps' line
transport_maps = hash:/etc/postfix/transport
in main.cf, which, IIUC, should activate/deactivate
postfix_to_mailman.py, and it didn't make any difference.
I'd appreciate any hint. I obviously lack postfix expertise and my
config is likely to contain blatant issues.
Unfortunately, I didn't find any step-by-step guide. The tutorials I
found either have virtual domains but no subdomain, or a dedicated
'lists' subdomain but for only one domain, no multiple virtuals. And
most of them use postfix_to_mailman.py which I understand should be
avoided.
(Also, please redirect me if this is not the right place to ask.)
Thanks.
--
Jérôme
More information about the Mailman-Users
mailing list