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 aliasname@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 access table.

For example:

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 smtpd_recipient_restrictions:

            check_client_access hash:/etc/postfix/access,

It can filter on much more than email address, so you will probably have more than that to add to it.

  • Thanks, but that's not really what I want - apart from anything else it means splitting the list of aliases across two files. – pwaring Sep 24 '15 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.