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.

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

1 Answer 1

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
businessleadsonlinemail.com     REJECT
527media.com                    REJECT
aweberer.com                    REJECT
pathcom.com                     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.