#!/bin/blog

November 24, 2011

Dovecot LDA behind Procmail

Filed under: UNIX/Linux/BSD — Tags: , — martin @ 12:17 pm

I have millions of archived mails in my ~/Maildir/ and wanted to change local delivery from a fairly extensive Procmail configuration to the Dovecot LDA, in order to keep the Maildir properly indexed.

In order to do this, I globally enabled LDA and Sieve in the Dovecot configuration, migrated my ~/.procmailrc into a Sieve ruleset (manually, because the converters don’t cut it) and then replaced my trusty old ~/.procmailrc with:

DEFAULT=$HOME/Maildir/
LOGFILE=$DEFAULT/procmail.log
DELIVER="/usr/lib/dovecot/deliver"
DROPPRIVS="YES"
:0 w
| $DELIVER

This way, the global default of using Procmail remains unharmed, maintaining compatibility with other users. On delivery, all messages to me are redirected into the Dovecot delivery system, including Sieve filters.

Blog at WordPress.com.