[BlueOnyx:03803] Re: Changing procmail from mbox to Maildir

Tobias Gablunsky t.gablunsky at cbxnet.de
Thu Mar 4 05:47:50 -05 2010


> 
> You'd need to update the Dovecot and the Squirrelmail config. 

I don't know of Squirrelmail but the dovecot changes are easy done:

For the conversion of mboxes to the maildir format it is best to use the
dovecot plugin "convert" to convert your existing 
boxes, whenever an existing user is fetching emails:

Edit your /etc/dovecot.conf as follows:
Changed Location of your mailboxes (I assume you use "~/Maildir" as 
directory to store your new mailboxes):
old: mail_location = mbox:~/mail/:INBOX=mbox
new: mail_location = maildir:~/Maildir

Use the convert plugin:
new (once in section "protocol imap {}", once in section "protocol pop3 
{}"):
  mail_plugins = convert

new (at the end of the file):
plugin {
#  convert_mail = <mailbox format>:<where dovecot puts its
indexes>:INBOX=<path to inbox file>
    convert_mail = mbox:~/mail:INBOX=%h/mbox
}


To get your MDA (procmail) deliver emails to maildir-format directly, 
edit /etc/procmailrc:

old:
ORGMAIL=$HOME/mbox
DEFAULT=$ORGMAIL

new:
MAILDIR=$HOME/Maildir # directory must already exist!
DEFAULT=$MAILDIR/ # MTA uses maildir-format (the trailing slash "/")


ATTENTION:
1) You have to protect your changed /etc/procmail somehow - this file is

changed by some rpm-updates without notice.
2) The directory ~Maildir has to already exist to deliver new emails to 
it - procmail won't create it!

To get this done for newly created users, you simply have to create the 
"Maildir" directory in the /etc/skel directory tree:

  for i in `ls /etc/skel/user/`
    do mkdir -m 2700 /etc/skel/user/$i/Maildir
  done

> Additionally 
> third party software may expect mbox instead of maildir and 
> will then also 
> either require changes, or won't work. Like the Solarspeed 
> OpenWebmail, 
> RoundCube and the AV-SPAM, which all expect mbox instead of maildir.

RoundCube uses IMAP to connect to mailboxes, so there is no problem.
Well, I don't know if maybe the Solarspeed package is patched there..
Is it, Michael?


Tobias




More information about the Blueonyx mailing list