Chapter 15. Server-Side Mail Filtering

Why Filter on the Server?

An old saying that rings true to email is “less is more.” If you subscribe to mailing lists, post to Usenet, or frequent web sites that require your email address as part of the registration process, the character and volume of your incoming email can easily become unmanageable. You may wish to eliminate certain kinds of mail, such as SPAM (unsolicited commercial email), before you ever see it. In the case of quasi-unsolicited mail, or some mailing list traffic, you may wish to file it in a specific mailbox to keep it organized.

Many users manage their email using client-side filters. With client-side filtering, filtering can only take place while the client is running on your workstation. The mail must be downloaded before it can be filtered. Server-side filtering, however, makes downloading the mail unnecessary. The filtering occurs on the server, leaving scarce client resources free for other tasks. If you turn your workstation off and go on vacation for a week, filtering continues. All your incoming mail is organized for your return.

Procmail and Sieve are a couple of popular approaches to user-initiated server-side filtering. Procmail is the granddaddy of mail filtering software. It’s the more powerful of the two, probably the most difficult to use, and is the best supported by ISPs, and it has the largest following. Procmail has a larger following primarily because it’s been around longer. It’s ...

Get Managing IMAP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.