Server Fault is a question and answer site for system and network administrators. 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 want to restrict my postfix system. Exactly I will that my postfix allow to send mails only to allowed user, all other mails should be bounced.

For example:

This Mails should be send:

All other Mails should not sended, for Exaple


I tried, the following settings, but it doesn´t work:

smtpd_reject_unlisted_sender = yes smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/valid_recipients reject_unlisted_sender reject_unknown_recipient_domain reject

Have you any idea how to handle it?

BR Marcus

share|improve this question

You'll need to make use of either local_recipient_maps or relay_recipient_maps depending on your situation.

For a single system you'll likely use hash:. For keeping multiple systems in sync, you should use ldap: or mysql:

share|improve this answer

You can use MSH Traffic Policy milter application.

It is sophisticated email management system that allows to set server sided rules for automatic content control and flow administration.

You will define very easily actions, conditions and exceptions. In your scenario you need to use <block-message> action and <recipient> requirement.

Application can do a lot more: attachment management, content control, headers manipulation, message counting, work in specified time range, etc.

share|improve this answer
Thx for your recomandation, it is a very interesting tool, but I have to solve this problem with the postfix functions. May somebody have an idea? – user144001 Nov 4 '12 at 12:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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