Hi everybody,
Using the following postfix configuration file, email messages and mailing lists works fine with mailman3. But if I send an email to an alias, the message is not received.
My main.cf alias_maps = hash:/etc/aliases compatibility_level = 2 content_filter = amavis:[127.0.0.1]:10024 inet_protocols = ipv4 local_recipient_maps = proxy:unix:passwd.byname $alias_maps hash:/var/lib/mailman3/data/postfix_lmtp mailbox_size_limit = 0 message_size_limit = 20480000 milter_default_action = accept milter_protocol = 2 myhostname = glugct.catania.linux.it non_smtpd_milters = inet:localhost:12301 owner_request_special = no recipient_delimiter = + relay_domains = smtp_header_checks = regexp:/etc/postfix/header_checks smtp_mime_header_checks = regexp:/etc/postfix/header_checks smtp_tls_CApath = /etc/ssl/certs smtp_tls_cert_file = $smtpd_tls_cert_file smtp_tls_key_file = $smtpd_tls_key_file smtp_tls_security_level = may smtp_use_tls = yes smtpd_banner = $myhostname ESMTP smtpd_milters = inet:localhost:12301 smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service inet:[127.0.0.1]:10023, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client cbl.abuseat.org, permit smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_tls_CApath = /etc/ssl/certs smtpd_tls_cert_file = /etc/letsencrypt/live/mail.catania.linux.it/fullchain.pem smtpd_tls_eecdh_grade = strong smtpd_tls_key_file = /etc/letsencrypt/live/mail.catania.linux.it/privkey.pem smtpd_tls_security_level = may tls_preempt_cipherlist = yes transport_maps = hash:/var/lib/mailman3/data/postfix_lmtp virtual_gid_maps = static:5000 virtual_mailbox_base = /var/vmail virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf virtual_transport = lmtp:unix:private/dovecot-lmtp virtual_uid_maps = static:5000 #virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_emails.cf, mysql:/etc/postfix/mysql_virtual_alias_maps.cf #virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
My /etc/postfix/mysql_virtual_alias_emails.cf user = postfix password = postfixpass hosts = 127.0.0.1 dbname = postfix query = SELECT email FROM users WHERE email='%s'
My /etc/postfix/mysql_virtual_alias_maps.cf user = postfix password = postfixpass hosts = 127.0.0.1 dbname = postfix query = SELECT destination FROM aliases WHERE source='%s'
My /etc/postfix/mysql_virtual_mailbox_domains.cf user = postfix password = postfixpass hosts = 127.0.0.1 dbname = postfix query = SELECT 1 FROM domains WHERE domain='%s'
My /etc/postfix/mysql_virtual_mailbox_maps.cf user = postfix password = postfixpass hosts = 127.0.0.1 dbname = postfix query = SELECT 1 FROM users WHERE email='%s'
If I try to uncomment the last two rows in main.cf virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_emails.cf, mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf The aliases and email messeges works fine but the mailman3's mailinglist don't work.
How can I solve this? Thank You in advance.
On 10/9/20 3:37 PM, Massimo Zappalà wrote:
If I try to uncomment the last two rows in main.cf virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_emails.cf, mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf The aliases and email messeges works fine but the mailman3's mailinglist don't work.
How can I solve this?
I'm not certain about this. The Postfix log entries for the failed delivery to Mailman may help, but I think you deed to configure an alias domain or domains for your list domain(s).
The alias domain is not a real domain and is not in DNS. it is any unused domain name and will be known only to Postfix. I typically use x.example.com where example.com is the real list domain. You can set the alias domain for the real domain in the domains view in Postorius.
Then you need to add hash:/var/lib/mailman3/data/postfix_vmap
to your
main.cf virtual_alias_maps setting and run Mailman's mailman aliases
command to generate the proper /var/lib/mailman3/data/postfix_* files.
See <https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht...>.
You may also need to set
relay_domains = hash:/var/lib/mailman3/data/postfix_domains
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi everybody, I solved my problem by editing two lines of the main.cf file
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_emails.cf, mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_alias_emails.cf, hash:/var/lib/mailman3/data/postfix_lmtp
Thanks Max
participants (2)
-
Mark Sapiro
-
Massimo Zappalà