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

We have some domains that send commercial mailings despite us asking to be removed from their listings.

I want to configure Postfix to reject all email from certain email domains.

How do I configure this in postfix?

share|improve this question

Use smtpd_sender_restrictions as follows:

smtpd_sender_restrictions =
        # Reject some domains because they send annoying spam
        check_sender_access hash:/etc/postfix/sender_access
        # Other useful things to do:
        warn_if_reject reject_non_fqdn_sender
        # Default PERMIT


# annoying spammer domains     REJECT                    REJECT                    REJECT                     REJECT

Don't forget to postmap your new access database!

share|improve this answer

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.