I’m in the process of migrating an existing mail setup from Exim to Postfix, which involves multiple virtual domains (i.e. they’re not tied to the machine name or local system accounts).
I’ve come across a few entries in
/etc/aliases which look like this:
aliasname: :fail: Failure message
If I email
firstname.lastname@example.org I get a bounce with
550: Failure message. Effectively these aliases are addresses which are no longer used but provide a slightly more useful error message instead of just deleting the alias.
Is there equivalent functionality available for Postfix?
These can go in the Postfix
username@ REJECT Go away, we don't want any
username@domain 550 5.1.1 Are you daft? Stop mailing here. They died in a fire.
But be aware that this will match either sender or recipient addresses, depending on when you call it from
main.cf. To check the recipient address, add to
It can filter on much more than email address, so you will probably have more than that to add to it.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.