Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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
    
postfix.org/ADDRESS_VERIFICATION_README.html — ? –  poige Oct 31 '12 at 18:49
    
...or better setup SPF in your postfix configuration –  Kamil Šrot Oct 31 '12 at 19:14
add comment

1 Answer

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:

example.com REJECT
example.net REJECT you're not me!
example.org REJECT go away!

As you see, you can provide custom errors too.

share|improve this answer
add comment

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.