How to set Postfix configuration to cach-all emails in domain but excluding some addresses?
migrated from stackoverflow.com Apr 11 '11 at 12:41
This question came from our site for professional and enthusiast programmers.
If you simply add the addresses you want to exclude from the catchall, they exist, are more specific and are used. Only if the envelope recipient is unknown, the catchall address is used.
If you want to block (reject) certain addresses without processing them at all, I can think of a smtpd_recipient_restriction (Postfix-Documentation).
You would add something like
And in the file rcp_access (run
And there is the not optimal way of adding a line like
to your /etc/postfix/header_checks file.
I had to configure one of my postfix installation to do just that: