Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a Postfix SMTP server on my Debian server and configured it to forward emails to my main email address using the virtual_alias_maps option. Sending and receiving emails works fine and emails addressed to non-existing users are rejected.

However, there are several users on the server that should not be able to receive emails. Is it possible to configure Postfix to reject emails to any user that is not mentioned in the virtual alias list (or some separate list, if that's easier)?

I've found some information on rejecting emails to specific users, but it would be much easier if I didn't have to add every user to a blacklist.

share|improve this question
up vote 1 down vote accepted

Have a look at for an answer. (Specifically look at the Local recipient table format).

IE, create a map with local recipients you want to receive email, add/modify the local_recipient_maps configuration variable to read from that file. (There are a number of ways of doing this, depending on your requirements - I tend to store mine in a database, but for a small system, just create a text file called /etc/postfix/local_recipientlist with the contents:   exists  exists

Then run postmap /etc/postfix/local_recipientlist (And specify local_recipient_maps=hash:/etc/postfix/local_recipientlist in

share|improve this answer
Works perfectly, thank you for your help. – Feb 11 '13 at 13:13

You must log in to answer this question.

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