rulururu

post Using procmail to apply filter mail into Maildir folders

December 16th, 2007

Filed under: Linux, Operating Systems — Brenton Alker @ 11:24

This topic wasn’t on my “to do” list, but it came up. So here it is.

Use of procmail to filter emails is definitely not a new thing, that is what it does after all. But in my attempt to configure it, I found very little clear information about support for "Maildir" style delivery amongst the wealth of documentation on the subject.

The 2 main differences in a .procmailrc that works with Maildir, is the trailing slash on the MAILDIR value and the way target folders are specified.

eg. The start of my .procmailrc looks like this:

MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR

:0
* ^To:.*(@lists\.danga\.com)
.List/new

So, the 2 points to note, as I said are. The maildir path ends in "/" and the destination is a folder within the Maildir, which is a hidden directory with its own set of cur/new emails in it.

Thanks to procmail, I now only have one location to maintain my filtering rules. My email can then be accessed through IMAP from work, home, laptop and webmail without them being moved into the wrong folders.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

ruldrurd
Powered by WordPress, Web Design by Laurentiu Piron Monitored by SiteUpTime
Entries (RSS) and Comments (RSS)