[vox] Sieve (was procmail)
Bill Broadley
bill at broadley.org
Tue Oct 6 19:19:49 PDT 2009
I used to manage a rather large procmail file. It has some problems (IMO):
* Rather user unfriendly syntax
* Is a bit too expressive (i.e. not ideal for exposing to users, procmail
basically can expose as much as a shell)
* Runs either on client side (so poor for vacation like messages) or server
side with the security issues (so it's okay for an admin).
* no mail client support that I know of.
I found a nice replacement called SIEVE:
* Has an RFC standard (RFC 5228)
* Has a rather nice syntax (think more python than sendmail.cf)
* Is designed to be exposed to users securely
* Has multiple email client support (thunderbird, round cube, squirrel mail)
* Is implemented in various mail delivery clients like dovecot's deliver
Some examples:
if size :over 100K {
reject "I'm sorry, I do not accept mail over 100kb in size.
Please upload larger files to a server and send me a link.
Thanks.";
}
elsif address :is ["From", "To"] "mailinglist at blafasel.invalid" {
fileinto "INBOX.mailinglist";
}
elsif address :contains "sender" "vox-tech-bounces at lists.lugod.org" {
fileinto "vox-tech";
}
I prefer using sender (when it works) over to:, cc:, or related because of
various issues and you often can't really depend on them.
For mailing lists I often use something like:
if header :contains "X-BeenThere" "dkim-milter-discuss at lists.sourceforge.net" {
fileinto "dkim-milter";
}
It's a nice way to handle spam as well:
elsif header :contains "X-MAGICSPAMFLAG-Spam-Status" "Yes" {
fileinto "Junk";
}
Since switching from procmail I spend much less time debugging, and as an
admin for a mail server I appreciate it because I don't have to edit them on
behalf of my users.
I'm also rather interested in the XMPP extension for SIEVE (currently a
proposed standard).
More information about the vox
mailing list