Page 1 of 1

Procmail and the correct way to deliver to a Maildir spool

Posted: Sat Aug 20, 2011 5:20 pm
by kgc
Without getting to deep into the details a lot of people end up with procmail rules that look like the following. While it works, it is totally wrong for a Maildir mail spool.

Code: Select all

* ^X-Mailing-List: linux-nfs
First, the trailing ':' unnecessarily locks and serializes delivery to the folder. One of the main reasons for choosing Maildir based message stores is that you explicitly do not need to lock the folder when delivering mail to it and you can have several simultaneous readers and writers on a folder at any given time. (As opposed to a format like mbox which can only have a single writer.) Second, you're actually telling procmail to deliver to an MH folder called "$DEFAULT/.linux-nfs/new" and not to the Maildir folder "$DEFAULT/.linux-nfs" (This shows as linux-nfs via IMAP.)

What you actually want is

Code: Select all

* ^X-Mailing-List: linux-nfs
What a difference the trailing slash makes. ;)