The virtual_alias_maps
command is designed to redirect an incoming message by recipient, not by sender, so yours would suggest user@recipient as a catchall address for mails directed to *@sender. Note that the file name must be the same as specified in main.cf, so /etc/postfix/_virtual
in your case and you need to call postmap
after every update.
If you want to reroute an incoming mail based on the sender address, you could try the following:
In main.cf
modify the option smtpd_recipient_restrictions
so that it contains check_sender_access hash:/etc/postfix/sender_access
Then create /etc/postfix/sender_access
with a content like
sender.org REDIRECT user@receiver.org
(See the postfix manual entry of Access(5) for details on the file syntax.)
After that, run postmap /etc/postfix/sender_access
, reload/restart your postfix and from now on, all incoming mail from the domain sender.org should be delivered to user@receiver.org, regardless of the TO, CC and BCC field.