[Mailman-Users] Postfix with MySQL

Mark Sapiro mark at msapiro.net
Sun Aug 16 16:54:09 CEST 2015


On 08/15/2015 11:35 PM, Martin Skjöldebrand wrote:
> On Sat, 2015-08-15 at 09:29 -0700, Mark Sapiro wrote:
>>
>> Also, what's in data/virtual-mailman?
> 
> I don't have one, maybe that's the problem =)


Yes, that is the problem. You posted that you had in mm_cfg.py


POSTFIX_STYLE_VIRTUAL_DOMAINS = ['dom2.ain', 'dom3.ain']

I assumed that 'dom2.ain' and 'dom3.ain' were just generic replacements
for what you actually had, but perhaps not.

What you need is

POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.skjoldebrand.eu']

or possibly a longer list including the host_name attributes other than
'mail.skjoldebrand.eu' of all your lists.


...
> Anyway; output of postconf -n is:

It would have been more helpful if you had posted this in a way that
didn't strip the line breaks.


> alias_database = hash:/etc/aliasesalias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases

alias_maps is good.

append_dot_mydomain = nobiff = nobroken_sasl_auth_clients =
yesconfig_directory = /etc/postfixcontent_filter =
smtp-amavis:[127.0.0.1]:10024delay_warning_time = 4hhtml_directory =
/usr/share/doc/postfix/htmlinet_interfaces = allmailbox_size_limit =
0mailman_destination_recipient_limit = 1

mailman_destination_recipient_limit is unnecessary. It is for the highly
discouraged postfix_to_mailman.py delivery method.

mydestination = mail.skjoldebrand.eu, localhost,
localhost.localdomainmyhostname = mail.skjoldebramd.eumynetworks =
127.0.0.0/8myorigin = /etc/mailnameproxy_read_maps =
$local_recipient_maps $mydestination $virtual_alias_maps
$virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains
$relay_recipient_maps $relay_domains $canonical_maps
$sender_canonical_maps $recipient_canonical_maps $relocated_maps
$transport_maps $mynetworks $virtual_mailbox_limit_mapsreadme_directory
= /usr/share/doc/postfixrecipient_delimiter = +relay_domains =
lists.skjoldebrand.eu

relay_domains is probably unnecessary.

relayhost =smtp_tls_ciphers = mediumsmt
>  p_tls_exclude_ciphers = MD5, SRP, PSK, aDSS, kECDH, kDH, SEED, IDEA, RC2, RC5smtp_tls_protocols = !SSLv2, !SSLv3smtp_tls_session_cache_database = btree:${data_directory}/smtp_scachesmtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_invalid_hostname, permitsmtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_pipelining, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rbl_client cbl.abuseat.org, reject_rbl_client dnsbl.sorbs.net, permitsmtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destinationsmtpd_sasl_auth_enable = yessmtpd_sasl_authenticated_header = yessmtpd_sender_restrictions = permit_sasl_authenticated, per
 m
i
>  t_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, permitsmtpd_tls_auth_only = yessmtpd_tls_cert_file = /etc/postfix/smtpd.certsmtpd_tls_ciphers = mediumsmtpd_tls_key_file = /etc/postfix/smtpd.keysmtpd_tls_protocols = !SSLv2, !SSLv3smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scachesmtpd_use_tls = yestransport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf hash:/var/lib/mailman/data/transport-mailman

remove hash:/var/lib/mailman/data/transport-mailman from transport_maps

unknown_local_recipient_reject_code = 550virtual_alias_domains
=virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,
mysql:/etc/postfix/mysql-virtual_email2email.cf

add lists.skjoldebrand.eu to virtual_alias_domains and add
hash:/var/lib/mailman/data/virtual-mailman to virtual_alias_maps

virtual_gid_maps = static:5000virtual_mailbox_base =
/home/vmailvirtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql-virtual_domains.cfvirtual_mailbox_limit_maps
=
proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cfvirtual_mailbox_maps
= proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cfvirtual_uid_maps =
static:5000


Make the above changes to main.cf, fix POSTFIX_STYLE_VIRTUAL_DOMAINS in
mm_cfg.py and remove "POSTFIX_MAP_CMD =
'/path/to/data/virtual_to_transport'" from mm_cfg.py.

Then run Mailman's bin/genaliases and see if it now works.

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