diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf index ffdef4c4..e90de183 100644 --- a/data/conf/postfix/main.cf +++ b/data/conf/postfix/main.cf @@ -41,7 +41,7 @@ postscreen_non_smtp_command_enable = no postscreen_pipelining_enable = no proxy_read_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_out_policy.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf, $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 $smtpd_sender_login_maps queue_run_delay = 300s -relay_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mxdomain_maps.cf +relay_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf relay_recipient_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf sender_dependent_default_transport_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_out_policy.cf smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt diff --git a/data/conf/postfix/sql/mysql_virtual_mailbox_maps.cf b/data/conf/postfix/sql/mysql_virtual_mailbox_maps.cf index e370919e..bf07cdb2 100644 --- a/data/conf/postfix/sql/mysql_virtual_mailbox_maps.cf +++ b/data/conf/postfix/sql/mysql_virtual_mailbox_maps.cf @@ -2,4 +2,4 @@ user = mailcow password = mysafepasswd hosts = mysql dbname = mailcow -query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1' +query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1' diff --git a/data/conf/postfix/sql/mysql_virtual_relay_domain_maps.cf b/data/conf/postfix/sql/mysql_virtual_relay_domain_maps.cf new file mode 100644 index 00000000..6994d02d --- /dev/null +++ b/data/conf/postfix/sql/mysql_virtual_relay_domain_maps.cf @@ -0,0 +1,5 @@ +user = mailcow +password = mysafepasswd +hosts = mysql +dbname = mailcow +query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '1' AND active = '1'