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 it possible to configure Postfix to verify the sender's MX record?

For example: if a mail comes in from some.sender@example.com it should look up the MX record(s) for example.com and verify that the sending mail server is listed in the MX records.

Is this possible and does it make sense to block spam mails? Or is there another way to stop spam mails pretending to come from trustworthy domains?

Thanks!
Oliver

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

A word of warning:

An MX record provides information about where email should be delivered. It does not necessarily provide any information about where email originates. It is entirely possible -- even likely -- that mail will be coming from a system that is not listed as an MX for the given domain.

SPF records, on the other hand, allow you to verify that email is being sent by a system that is an authoritative sender for the domain.

share|improve this answer
    
Thanks for the nice explanation. –  Baldewin Jun 24 '11 at 20:06
add comment

You could configure your spam filtering software to verify SPF records -- This does what you're asking, but in a slightly more intelligent way.


Denying mail because the sending server is not listed in the SPF record for a domain doesn't really make sense though -- Many residential ISPs block access to all but their mail server, which means that you may receive mail from domains you correspond with that came from one of those ISPs, and was forced through the ISP's mail infrastructure.

If you're looking for ways to fight spam, consider SpamAssassin and ClamAV, as well as any number of other options like Google's Postini service ($). Dealing with Spam is a specialist subset of system administration, and if you search around on SF or Google you'll find lots of different options that can help you out...

share|improve this answer
    
I have SpamAssassin running but I thought blocking mails with suspicious senders at all could be even more safe :) Thanks for your help! –  Baldewin Jun 24 '11 at 20:08
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.