How to set Postfix configuration to cach-all emails in domain but excluding some addresses?
migration rejected from stackoverflow.com Jan 15 at 14:57
This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.
closed as off-topic by masegaloeh, Katherine Villyard, kasperd, mdpc, Ward Jan 15 at 14:57
This question appears to be off-topic. The users who voted to close gave this specific reason:
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: