2

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 [email protected] 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?

1 Answer 1

4

These can go in the Postfix access table.

For example:

username@       REJECT Go away, we don't want any

or

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.

1
  • 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, 2015 at 8:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .