Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

user1@example.com user2@example.com user3@example.com

All other Mails should not sended, for Exaple

user4@example.com user5@example.com

etc.

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

2 Answers 2

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

 
discard

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.