When looking at various tutorials on configuring postfix, it’s quite easy to configure a catch all for a certain domain. So any username at the said domain gets forwarded so a said maibox. However, I haven’t been able to find any article describing to do the reverse, catch a said username on any domain.
The reason for this is to catch abuse@, postmaster@, webmaster@ etc. any domain on my servers. When going through the postfix documentation another time I realised it support regular expressions. Using regular expressions this can be fixed
put a file /etc/postfix/regexp-aliases
^webmaster@/i destination@email.address ^postmaster@/i destination@email.address ^abuse@/i destination@email.address
Then open /etc/postfix/main.cf
and add
regexp:/etc/postfix/regexp-aliases
to virtual_alias_maps =
.
Edit 05-03-2016: added the /i
to the example. Email user names are supposed to be case insensitive.
« Restoring wireless communication on HP EliteBook 8530w on Linux kernel 3.13+ Kernel without IPv6 support causes postgrey to fail in default (Ubuntu 14.04LTS) configuration »