How to Whitelist and Blacklist People

Introduction

procmail enables you to whitelist and blacklist people. If you whitelist someone, you will always receive the email that they send you. If you blacklist someone, you filter their mail into a special folder or drop it altogether. Edit and add these rules to your .procmailrc file. Remember that procmail processes rules in .procmailrc from top to bottom.

How to Whitelist Someone

This example filters mail from 'girlfriend' to your VIP folder:


:0
* ^From:.*<girlfriend@gmail\.com>?$
VIP

How to Blacklist Someone

This example filters mail from 'exboyfriend' to your Go_Away folder. To automatically delete them, replace target location Go_Away with /dev/null.


:0
* ^From:.*<exboyfriend@gmail\.com>?$
Go_Away