Multiple comments ...
I just want Spamassassin to check if there is a MX Record in DNS for the sender.
I have no sense of how productive this would be. Have you looked up a good sample of sender domains and found that spammers are significantly less likely to have an MX? That would make it interesting to check.
It would also be cool if Spamassassin could compare senderdomain and helo name.
Helo should match the hostname, but that's all. There are many instances where the sender address is a different domain. Vanity domains, third-party mailings, and merged companies lead the list. Much of it is legitimate mail. Check any online bank or credit statements you might have, for example.
reject_unknown_sender_domain Reject the request when Postfix is not final destination for the sender address, and the MAIL FROM address has no DNS A or MX record,
I assume that, like Sendmail, it has already converted CNAMEs when it does this test. Sendmail rejects for having none of MX, A, or AAAA. That hits 3% of mail thrown at our system.
The problem, is that a MX record is NOT required for a sending host.
Who proposed checking that? The question was about checking for an MX record for the sender address, not the host. Joseph Brennan Columbia University Information Technology