I am trying to get some simple virtual domain support into Postfix, by following the README "Postfix virtual ALIAS example: separate domains, UNIX system accounts".
This, however, leads to a forwarding-loop, in my case. I am quite unfamiliar with all the moving parts in postfix.
<[email protected]> (expanded from <[email protected]>): mail
forwarding loop for [email protected]
The relevant parts from /etc/postfix/main.cnf
are:
myhostname = li153-5.members.linode.com
mydestination = localhost li153-5.members.linode.com
#....
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl
smtpd_sender_restrictions = reject_unknown_sender_domain
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-mail-stack-delivery.conf -m "${EXTENSION}"
myorigin = /etc/mailname
virtual_alias_domains = webschuur.com berk.es
virtual_alias_maps = hash:/etc/postfix/virtual
Then, my /etc/postfix/virtual
file (before being compiled with postmap):
[email protected] ber
@berk.es ber
@webschuur.com ber
ber
is a local user-account. Before this I simply had the domains
webschuur.com and berk.es listed under mydestination and could send
mail to [email protected] and have it turn up in my unix-system accounts
Maildir. I now want to introduce catchall and want to avoid mail to
[email protected] turning up in my mailbox; when I host example.org on
this postfix too. @example.org should go to a UNIX-user exampleorg or so.
What am I doing wrong? Why does postfix find a loop when delivering to [email protected]? Is there maybe some part in main.cnf or postconf -d that I should provide here instead?
So it turned out to be a dangling ~/.forward file.