[Mailman-Users] Mailman 2 + Postfix + virtual domains + lists subdomain
Mark Sapiro
mark at msapiro.net
Tue Jul 5 23:08:51 EDT 2016
On 7/5/16 4:47 PM, Jérôme wrote:
>
> AFAIU, postfix_to_mailman.py is not needed and not recommended, so I'd
> avoid it if possible:
That's good.
> 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',
> ]
The above is all good.
> ------------------------------------------------------------
>
>
> ------------------------------------------------------------
> postfix main.cf
> ------------------------------------------------------------
>
> myorigin = domain1.tld
> mydomain = domain1.tld
> myhostname = domain1.tld
>
> # System users
> alias_maps = hash:/etc/aliases
You need to add hash:/var/lib/mailman/data/aliases to alias_maps.
> 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
transport_maps is commented which is good.
mailman_destination_recipient_limit = 1 is for postfix_to_mailmam, but
it won't hurt as you aren't using the 'mailman' transport.
> ------------------------------------------------------------
> 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:
The 'mailman' transport in main.cf and the references to it in
postfix/transport are all unused (a good thing because it's all
postfix-to-mailman stuff) because transport_maps is commented.
> ------------------------------------------------------------
> mailman aliases
> ------------------------------------------------------------
Which is unreferenced which is the problem. Add it to alias_maps.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list