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.

Is there a reliable way to reject incoming mails with a spoofed e-mail address?

What kind of checks does postfix run normally on incoming mails?

  • does postfix check the reverse dns by default?
  • does postfix have any other checks built-in and activated by default?
  • what kind of filters / milters are useful to prevent accepting spoofed mails?

Thank you for your help.

share|improve this question
1  
Take a look at Postfix's configuration variable smtpd_recipient_restrictions. –  André Daniel Aug 21 at 14:50

1 Answer 1

up vote 9 down vote accepted

Basically email was run over Simple Mail Transfer Protocol. It's very simple so there are no spoofing prevention mechanism in its earlier specs. Take a look on these two excellent answers about email spoofing on security.SE

Is there a reliable way to reject incoming mails with a spoofed e-mail address?

Over the years, there are some techniques implemented to identify spoofed email address, for example:

  • SPF: This DNS records detail which servers are allowed to send mail for your domain. See this canonical question for SPF.
  • Sender ID: Fork of SPF
  • DKIM: is a method of embedding digital signatures in mail headers. It can be verified using public keys published in the DNS.
  • DMARC

See also our canonical question about this topic: Fighting Spam - What can I do as an: Email Administrator, Domain Owner, or User?

What kind of checks does postfix run normally on incoming mails?

To find out what default config shipped with postfix, please run postconf -d. And then take a look on smtpd_*_restriction. As default, postfix just run two checks,

permit_mynetworks, reject_unauth_destination

does postfix check the reverse dns by default?

Yes, but postfix only gave warning when reverse dns check fail. Here the sample warning from maillog.

Aug 22 10:37:17 mx postfix/smtpd[54487]: warning: hostname st.example.com does not resolve to address 192.168.231.235

If you consider to reject client based on their rDNS, see the discussion over here: Is it good practice or too draconian to reject mails from mailservers with no RDNS

does postfix have any other checks built-in and activated by default?

Check this page, and look for entry smtpd_*_restriction (e.g smtpd_client_restriction, smtpd_helo_restriction and so on). There are many check on postfix for example but as I said above, by default only two checks enabled.

what kind of filters / milters are useful to prevent accepting spoofed mails?

There are some milter/third apps to provide assists postfix battle spoofed email by applying four techniques I said above. For example tumgreyspf, opendkim, opendmarc and many others.

share|improve this answer

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.