On Tue, September 29, 2015 10:46 am, Viktor Dukhovni wrote:

> I don't think this meets the OP's needs.  He seems to want only some
> of the addresses in the target domain aliased.  For that, those and only
> those addresses should be listed in the virtual alias table (whether file
> based or SQL):
>
> virtual:
> user1@alias.example   user1@target.example user2@alias.example
> user2@target.example

I think I didn't fully explain:

the server runs mail server for several (unrelated) domains,
one of domains, mydomain.com.au has now registered mydomain.com, and,
wishes to have 'dual' emails, so like (existing) us...@mydomain.com.au can
accept emails as his current us...@mydomain.com.au as well as
us...@mydomain.com

> Plus an appropriate setting of virtual_alias_maps.

currently have like

# grep virtual_alias_maps main.cf

proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps
$mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps
$relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps
$sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps
$transport_maps $virtual_alias_domains $virtual_alias_maps
$virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf,
proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf,
proxy:mysql:/etc/postfix/mysql/catchall_maps.cf,
proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf


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


Reply via email to