[Mailman-Users] Mail transport postfix with dovecot and virtual domains

Mark Sapiro mark at msapiro.net
Thu Apr 2 02:15:04 CEST 2015


On 04/01/2015 02:51 PM, Roland Miyamoto wrote:
> Dear Mailman community,
> 
> Sorry to bother you again.
> I am using postfix and dovecot with mysql style virtual users and
> aliases and one virtual domain "mydom.ain" on my Debian server.
> And it has worked fine so far.
> My local domain is localdom.ain
> I dumped my postfix configuration below.
> 
> I am now trying to set up Mailman lists with the same virtual domain
> "mydom.ain" following http://list.org/mailman-install/node12.html and
> http://list.org/mailman-install/postfix-virtual.html
> But since I have "virtual_transport=dovecot" in my /etc/postfix/main.cf,
> as Mark suggested in msg62067.html, I followed


Presumably, that reference is to
<http://www.mail-archive.com/mailman-users%40python.org/msg62067.html>.
If you are going to refer to an archived message, please give a complete
URL.


> http://wiki.list.org/DOC/Mailman%20-%20Postfix%20integration%20with%20Mailman%20generated%20transport%20or%20other%20maps
> 
> (without much understanding).
> The resulting files in /var/lib/mailman/data are dumped below.


And all look OK.


> When sending mail from me at gmx.net to mailman at mydom.ain
> I get the following delivery failure notice:
> 
> 5.1.1 <mailman at mydom.ain>: Recipient address rejected: User unknown in
> virtual mailbox table
> 
> So it seems that mapping for the mailman addresses does not take effect,
> let alone mail transport to mailman.


The transport to Mailman still requires aliases. See below. As to why
(if) the transport_maps are not effective, I'd like to see the actual
Postfix log messages, not just the DSN.


> -----------------------------------------------
> Dumps of postconf, local-users, virtual-mailman,
> virtual_to_transport and transport-mailman
> -----------------------------------------------
> 
> $ postconf -n
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases

Your transport maps will just map the list addresses to the local
transport. You still need aliases to get to Mailman. The above line
needs to include hash:/var/lib/mailman/data/aliases, i.e.

alias_maps = hash:/etc/aliases hash:/var/lib/mailman/data/aliases

I have updated the FAQ at <http://wiki.list.org/x/10715238> to hopefully
make this more clear.


> append_dot_mydomain = no
> biff = no
> broken_sasl_auth_clients = yes
> config_directory = /etc/postfix
> dovecot_destination_recipient_limit = 1
> html_directory = /usr/share/doc/postfix/html
> inet_interfaces = all
> local_recipient_maps = hash:/etc/postfix/local-users
> mail_spool_directory = /var/mail/
> mailbox_size_limit = 0
> mydomain = $myhostname
> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
> recipient_delimiter = +
> smtp_tls_CAfile = /etc/ssl/certs/mydom.ain.ca.pem
> smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
> smtpd_recipient_restrictions =
> permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_path = private/auth
> smtpd_sasl_type = dovecot
> smtpd_tls_auth_only = yes
> smtpd_tls_cert_file = /etc/ssl/certs/mydom.ain.crt
> smtpd_tls_key_file = /etc/ssl/private/mydom.ain.key
> smtpd_tls_security_level = may
> smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
> smtpd_use_tls = yes
> transport_maps = hash:/var/lib/mailman/data/transport-mailman
> virtual_alias_maps = mysql:/etc/postfix/virtual-aliases.cf
> virtual_mailbox_base = /var/vmail/
> virtual_mailbox_domains = mysql:/etc/postfix/virtual-domains.cf


And presumably mydom.ain is one of the virtual_mailbox_domains. I don't
know off hand whether or not the specific address appearing in
transport_maps takes precedence over the domain in
virtual_mailbox_domains. I think it should, but ...

Add the aliases to alias_maps and if you still have the problem, post
the Postfix log messages.

> virtual_mailbox_maps = mysql:/etc/postfix/virtual-users.cf
> virtual_transport = dovecot
> 
> $ cat /etc/postfix/local-users
> $ ll /var/lib/mailman/data
> $ cat /var/lib/mailman/data/virtual-mailman
> $ cat /var/lib/mailman/data/virtual_to_transport
> $ cat /var/lib/mailman/data/transport-mailman

These all look OK.

-- 
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