I have configured my Postfix server to use aliases. Incoming mail sent to contact@mydomain.com
is redirected to myname@mydomain.com
.
But it looks like my alias map is also rewriting the outgoing mail recipient, because when I send an email to contact@anotherdomain.com
, I receive the following undelivered mail report:
<myname@anotherdomain.com> (expanded from <contact@anotherdomain.com>):
host mail.anotherdomain.com[x.x.x.x] said:
550 5.1.1 <myname@anotherdomain.com>:
Recipient address rejected:
User unknown in virtual mailbox table (in reply to RCPT TO command)
This is what my main.cf
looks like (only part of it):
virtual_mailbox_domains = $mydomain
virtual_mailbox_maps = mysql:/etc/postfix/mysql-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-alias-maps.cf
alias_maps =
Aliases are queried with:
SELECT CONCAT(destination, '@%d') FROM alias WHERE source = '%u';
And my master.cf
(only part of it):
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
How do I prevent Postfix from rewriting the outgoing mail recipient?