Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have Postfix configured with a few domains, delivering to Dovecot locally.

I’ve noticed some interesting spam that comes in, purporting to be from an address at one of those domains, but that address does not exist.

How can I configure Postfix to drop those emails? Real email from this domain a. originates from the same server it is being delivered to, and b. is DKIM signed.

share|improve this question — ? – poige Oct 31 '12 at 18:49
...or better setup SPF in your postfix configuration – Kamil Šrot Oct 31 '12 at 19:14

1 Answer 1

You can prevent people using your own domains in MAIL FROM commands by putting them in a check_sender_access map after you accept mail from mynetworks and submission (SASL):

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_sender_access hash:/etc/postfix/my_domains, reject_unauth_destination

And in /etc/postfix/my_domains: REJECT REJECT you're not me! REJECT go away!

As you see, you can provide custom errors too.

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.