Procmail, Dovecot and Maildir

If you’re using Dovecot as your POP3/IMAP server and want to use Procmail to filter your mail into different Maildir folders, unless you set up your .procmailrc variables exactly right, Dovecot will have problems with it. For an explanation, see this page in the Dovecot Wiki and search for “Procmail Problems”.

This is my .procmailrc which you might find useful if you’re trying to create your own:

MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
# Do not change the above variables - doing so will cause problems with Dovecot
LOGFILE=$MAILDIR/procmaillog

:0:
* ^To.*@trinitynet.co.nz
.INBOX.Trinity\ Net/

# If the spam flag is set, put the mail in the junk folder
:0:
* ^X-Spam-Flag: YES
.INBOX.Junk/

This entry was posted in Mail. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">