Sieve

Sieve, described in a draft RFC, is a language that is used to filter RFC 822 mail messages at the time of final delivery. Sieve is not intended to filter or process content other than RFC 822 messages. Sieve is not dependent on any particular platform, protocol, or mail architecture.

Background

Current filtering schemes abound, each with its own syntax and functionality, none of which interoperate with one another. Much to the dismay of both users and system administrators, mail filters must be translated or ported when a user moves from one client or server to another. If you’ve ever moved users from a Unix mail system to a Cyrus system, chances are that you experienced problems dealing with your Procmail users. Procmail filters don’t port directly from Unix mail systems to Cyrus. There are syntax differences tied to the differences in mailbox format between the two systems. If there were a standard filtering language in place, then software developers and vendors could write filtering interfaces that could use common scripts. Sieve is intended to be just that standard.

Scope

Sieve is not a complete programming language. Not much can be done with Sieve, other than writing mail filters. Sieve was designed to make filtering simple and easy to use for the end user, while protecting the server it runs on by preventing users from doing things that could be destructive, such as making shell escapes or writing loops. Sieve is also designed to be easy to incorporate into GUI ...

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.