A friend of mine using (I believe) qmail has it configured to reject, as SPAM, any incoming Email with a Date: header that is too far from real time. I can't figure out how to do this with sendmail. How do you do this?

3 Answers 3


Sendmail is evil ;) One solution could be to install SpamAssassin and integrate it with spamass-milter into your mail services. This has the advantage that you could activate lot of other Anti-Spam rules. Or just write your own plugins which is really easy.

  • 1
    I already have ClamAV integrated with sendmail with its milter, but I didn't realize that Spam Assassin also had a milter. I'll look into that. Thanks.
    – Eddie
    May 4, 2009 at 22:22

Sendmail isn't good at filtering messages on its own.

In theory it wouldn't take much to write a simple milter (sendmail mail filter) plugin to do just that job.

However if spam prevention is the primary requirement, then why not go the whole hog and plugin a full anti-spam system?


Consider integrating something like MailScanner which can utilize SpamAssassin, ClamAV, and other external tools for detecting spam, viruses, and other nasties.

Also, you probably only want to use a date too far in the future or past as part of a spam score rather than rejecting it outright. You risk catching legitimate senders with misconfigured systems or mail clients in this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.