[CentOS] dovecot/procmail w/maildir format?

Fri Feb 22 17:03:24 UTC 2008
Paul Heinlein <heinlein at madboa.com>

On Fri, 22 Feb 2008, Les Mikesell wrote:

> Does anyone have a handy example or howto pointer for the matching 
> config changes needed to make sendmail/procmail deliver in maildir 
> format in home directories and for dovecot to access it there?

The key is ensuring that there's a trailing forward-slash on all 
directory paths. :-)

We deliver all mail to $HOME/maildir; /etc/procmailrc reads

   #
   # /etc/procmailrc
   #
   # unless otherwise specified by a user's ~/.procmailrc, all inbound
   # messages are delivered to a users ~/maildir folder. the trailing
   # slash is important: it indicates Maildir (not mbox) format.
   DEFAULT=$HOME/maildir/

User procmailrc files run in the same vein, e.g.,

   # user .procmailrc
   MAILDIR=$HOME/maildir

   :0
   * ^List-Id:.*<centos\.centos\.org>
   .mailinglists.centos/

For Dovecot, the key directive is mail_location:

   mail_location = maildir:%h/maildir

The dovecot.conf file also has some maildir-specific directives; I 
make sure maildir files are copied with hard links (which won't work 
over NFS):

   maildir_copy_with_hardlinks = yes

Does that help?

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/