E-mail gives us the ability to send free messages to nearly everyone in the world. Unfortunately, some people decided to abuse this system and send unsolicited mass mail (spam) in hopes of making money through advertising or fraud. So many people were tempted by this possibility that, at some point, spam made up over 95 percent of e-mail traffic. This would make e-mail practically unusable, but thankfully, anti-spam filters make this problem more manageable.
Spam fighting is a large and complex topic. In this recipe, we will demonstrate an effective yet basic technique based on the programs Procmail and SpamAssassin. If your site handles a large volume of e-mail, you will probably need a more efficient solution.