From 41d771e78031f41ee5aaf9b535d82ccaeee7ea73 Mon Sep 17 00:00:00 2001 From: andryyy Date: Wed, 1 Mar 2017 17:59:46 +0100 Subject: [PATCH] Aliases do not match alias domains --- data/conf/postfix/main.cf | 2 +- .../postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf | 5 ----- data/conf/postfix/sql/mysql_virtual_alias_domain_maps.cf | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 data/conf/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf diff --git a/data/conf/postfix/main.cf b/data/conf/postfix/main.cf index 1a96eff2..cbfc4e0c 100644 --- a/data/conf/postfix/main.cf +++ b/data/conf/postfix/main.cf @@ -83,7 +83,7 @@ virtual_alias_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_maps. virtual_gid_maps = static:5000 virtual_mailbox_base = /var/vmail/ virtual_mailbox_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_domains_maps.cf -virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_mailbox_maps.cf +virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 104 virtual_transport = lmtp:inet:dovecot:24 virtual_uid_maps = static:5000 diff --git a/data/conf/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf b/data/conf/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf deleted file mode 100644 index 03061109..00000000 --- a/data/conf/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf +++ /dev/null @@ -1,5 +0,0 @@ -user = mailcow -password = mysafepasswd -hosts = mysql -dbname = mailcow -query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1' diff --git a/data/conf/postfix/sql/mysql_virtual_alias_domain_maps.cf b/data/conf/postfix/sql/mysql_virtual_alias_domain_maps.cf index 2718bb00..0ead5905 100644 --- a/data/conf/postfix/sql/mysql_virtual_alias_domain_maps.cf +++ b/data/conf/postfix/sql/mysql_virtual_alias_domain_maps.cf @@ -2,4 +2,4 @@ user = mailcow password = mysafepasswd hosts = mysql dbname = mailcow -query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1' +query = SELECT username FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'