ZhangHuangbin wrote:Questions:
- Did you add alias domain with iRedAdmin-Pro or other tools/commands?
Absolutely iRedAdmin-Pro
ZhangHuangbin wrote:- Please show us output of SQL command:
# mysql -uroot -p vmail
mysql> SELECT alias_domain, target_domain, created, active FROM alias_domain;
+------------------------+-----------------+---------------------+--------+
| alias_domain | target_domain | created | active |
+------------------------+-----------------+---------------------+--------+
| aliasdomain.it | domain.it | 2012-06-25 10:54:39 | 1 |
+------------------------+-----------------+---------------------+--------+
ZhangHuangbin wrote:- Show me output of below command:
# cd /etc/postfix/mysql/
# grep 'query' *.cf
catchall_maps.cf:query = SELECT alias.goto FROM alias,domain WHERE alias.address='%d' AND alias.address=domain.domain AND alias.active=1 AND domain.active=1 AND domain.backupmx=0
domain_alias_catchall_maps.cf:query = SELECT alias.goto FROM alias,alias_domain,domain WHERE alias_domain.alias_domain='%d' AND alias.address=alias_domain.target_domain AND alias_domain.target_domain=domain.domain AND alias.active=1 AND alias_domain.active=1
domain_alias_maps.cf:query = SELECT alias.goto FROM alias,alias_domain,domain WHERE alias_domain.alias_domain='%d' AND alias.address=CONCAT('%u', '@', alias_domain.target_domain) AND alias_domain.target_domain=domain.domain AND alias.active=1 AND alias_domain.active=1 AND domain.backupmx=0
recipient_bcc_maps_domain.cf:query = SELECT bcc_address FROM recipient_bcc_domain WHERE domain='%d' AND active=1
recipient_bcc_maps_user.cf:query = SELECT recipient_bcc_user.bcc_address FROM recipient_bcc_user,domain WHERE recipient_bcc_user.username='%s' AND recipient_bcc_user.domain='%d' AND recipient_bcc_user.domain=domain.domain AND domain.backupmx=0 AND domain.active=1 AND recipient_bcc_user.active=1
relay_domains.cf:query = SELECT domain FROM domain WHERE domain='%s' AND backupmx=1 AND active=1
sender_bcc_maps_domain.cf:query = SELECT bcc_address FROM sender_bcc_domain WHERE domain='%d' AND active=1
sender_bcc_maps_user.cf:query = SELECT sender_bcc_user.bcc_address FROM sender_bcc_user,domain WHERE sender_bcc_user.username='%s' AND sender_bcc_user.domain='%d' AND sender_bcc_user.domain=domain.domain AND domain.backupmx=0 AND domain.active=1 AND sender_bcc_user.active=1
sender_login_maps.cf:query = SELECT mailbox.username FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.domain='%d' AND mailbox.domain=domain.domain AND mailbox.enablesmtp=1 AND mailbox.active=1 AND domain.backupmx=0 AND domain.active=1
transport_maps_domain.cf:query = SELECT transport FROM domain WHERE domain='%s' AND active=1
transport_maps_user.cf:query = SELECT mailbox.transport FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.domain='%d' AND mailbox.domain=domain.domain AND mailbox.transport<>'' AND mailbox.active=1 AND mailbox.enabledeliver=1 AND domain.backupmx=0 AND domain.active=1
virtual_alias_maps.cf:query = SELECT alias.goto FROM alias,domain WHERE alias.address='%s' AND alias.domain='%d' AND alias.domain=domain.domain AND alias.active=1 AND domain.backupmx=0 AND domain.active=1
virtual_mailbox_domains.cf:query = SELECT domain FROM domain WHERE domain='%s' AND backupmx=0 AND active=1 UNION SELECT alias_domain.alias_domain FROM alias_domain,domain WHERE alias_domain.alias_domain='%s' AND alias_domain.active=1 AND alias_domain.target_domain=domain.domain AND domain.active=1 AND domain.backupmx=0
virtual_mailbox_maps.cf:query = SELECT CONCAT(mailbox.storagenode, '/', mailbox.maildir, '/Maildir/') FROM mailbox,domain WHERE mailbox.username='%s' AND mailbox.active=1 AND mailbox.enabledeliver=1 AND domain.domain = mailbox.domain AND domain.active=1
ZhangHuangbin wrote:- Show me output of below command. Please replace 'aliasdomain.com' below with the real alias domain name.
# cd /etc/postfix/mysql/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'aliasdomain.com' mysql:./$cf; done
catchall_maps.cf
domain_alias_catchall_maps.cf
domain_alias_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_mailbox_domains.cf
aliasdomain.it
virtual_mailbox_maps.cf