I've set up my mail server using a guide from Digital Ocean, followed by another guide. So, now if I send mail to torvin@mydomain
, it works.
Now I'm trying to set up a catch-all address for all undelivered mail. Things I've tried so far:
1) Replaced
local_recipient_maps = proxy:pgsql:/etc/postfix/pgsql-boxes.cf $alias_maps
line with this:
local_recipient_maps =
luser_relay = torvin
The result I see in the logs:
postfix/lmtp[32692]: D5AD540085: to=, relay=mail.mydomain[private/dovecot-lmtp], delay=0.21, delays=0.17/0.01/0.01/0.02, dsn=5.1.1, status=bounced (host mail.mydomain[private/dovecot-lmtp] said: 550 5.1.1 User doesn't exist: thisisjustatest@mydomain (in reply to RCPT TO command))
2) Instead replaced
alias_maps = hash:/etc/aliases proxy:pgsql:/etc/postfix/pgsql-aliases.cf
with
alias_maps = hash:/etc/aliases pcre:/etc/aliases_pcre proxy:pgsql:/etc/postfix/pgsql-aliases.cf
And created /etc/aliases_pcre
with the following content:
/.*/ torvin
Result is the endless loop of:
to=, relay=local, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail forwarding loop for torvin@mydomain)
3) Instead tried
virtual_alias_maps = pcre:/etc/aliases_pcre
Now all my mail goes to torvin
, and never gets delivered to any other existing users in the system.
Please help!