Skip to Content

Making Spam Whitelists and Blacklists

A document describing how to write simple procmail rules that will allow you to either avoid the spam filter for email with certain characteristics (whitelist) or automatically discard email with other characteristics (blacklist). The most common tasks are acceptance and rejection of email with specific sender addresses.


The program that makes decisions about how to deliver (or not deliver) email that has made it through the highest level blacklists is called procmail. Thus we will need to write some procmail rules in its peculiar language to implement our whitelists and blacklists.

A typical procmail rule has 3 lines with a structure that looks very similar to the following.
line 01: :0: (opening of new rule)
line 02: * [matching-rule]
line 03: destination-folder

User accounts and Email  spam