[Dovecot] IMAP subfolders

Rick Johnson rjohnson at medata.com
Mon Feb 23 19:21:10 EET 2004


Manuel Moran Vaquero wrote:
> 
> Thanks Kai! Now that I understand better the Maildir need, I have another
> question:

The need for maildir w/ dovecot is not absolute. You can continue to use 
mbox within the ~/mail directory for each user, using the following line:

default_mail_env = mbox:~/:INBOX=/var/spool/mail/%u


You'll find that maildir performs better for larger mailboxes, however - 
but at the cost of slightly increased disk usage and inode usage (though 
in reality, you'll probably run out of the former far before the latter).

> Is ist possible to specify in dovecot.conf that inbox is in mbox format and
> to use Maildir for the rest of the folders? I remember having seen that
> somewhere in this same list, but I can't find the message anymore. I think
> that message said that it was not a supported feature, but the developers
> were working on it. For now, I don't see any hints in the conf file for
> configure the env to Maildir+Mbox, so I suppose it's still under
> development.

To my knowledge, this was discussed in the past and is not possible, nor 
advisable.

> I don't want to fiddle much with sendmail, so I'd like to keep the mbox
> spool as default, but using with Maildir for the other IMAP folders (so as
> to support subfolders) in dovecot, and convert users' mbox imap folders
> manually. This would even be a nice feature which would integrate perfectly
> in new Fedora releases (sendmail mbox drop comes by default) as the
> configuration would be seamless.

The transition to Maildir isn't a sendmail thing, but a procmail thing.

I simply added:

DEFAULT="$HOME/Maildir/"
MAILDIR="$HOME/Maildir/"

to my /etc/procmailrc.

I made similar changes to /etc/profile, removing (or changing) the MAIL= 
environment, and setting the MAILDIR environment for programs like 
mutt/pine/etc.

I then changed the foldernames in individual .procmailrc's from:

Folder1/Mailbox1

to:

.Folder1.Mailbox1/
(trailing slash tells Procmail it's Maildir, and the period is the 
delimiter for Dovecot)

Then, I ran some scripts on my user's mbox directories to convert them 
to maildir (I posted them earlier this month - search archives), 
including the inbox, as well as subscribing each folder dovecot style. 
Worked flawlessly up to 3 levels deep.

This was under Red Hat 9, using the Dovecot SRPM from Fedora Core 1, 
then subsequently Rawhide to bring me up to 0.99.4, rebuilt for RH9.

HTH,
-Rick
-- 
Rick Johnson, RHCE #807302311706007 - rjohnson at medata.com
Linux/Network Administrator - Medata, Inc.
PGP Public Key: https://mail.medata.com/pgp/rjohnson.asc



More information about the dovecot mailing list