SPAM Filtering

I get a lot of SPAM, so I filter it heavily using:

Here are the steps involved:

  1. Greylisting in my mail server causes the sender of all messages with a new combination of source-IP, sender address and recipient address to be told to `try again'. Many spammers won't try again, because they're not running standards-compliant mail servers. Some genuine mail servers are broken or are badly configured, so they don't try again. :-(
  2. My mail server rejects mail from certain domains and IP addresses, as well as mail to certain recipients.
  3. I pass nearly all messages through SpamAssassin. I make extensive use of SpamAssassin's whitelisting and I also do some blacklisting. This allows me to use a very low threshold to decide which messages are SPAM.
  4. I use Sieve rules to determine which messages From me and certain other senders are fakes. This is largely based on Message-Id headers but I could make it more robust if SPAM starts slipping through.
  5. I use some custom scripts to process a Sent folder to automatically whitelist recipients who I send email to and who are not already whitelisted.