Maildir

floyd

Verified User
Joined
Mar 29, 2005
Messages
6,250
I am converting a server to use Maildir format. Could someone please help out the attention challenged by stating briefly where and how mail is stored and managed?

I thought the mbox format was much simpler. It was either stored in /var/spool/mail for system users or /var/spool/virtual/domainname for virtual mail users. With Maildir I know its stored somewhere in the user's home directory. I see some folders named cur and new. I don't know what they mean.
 
The main user email is stored in a directory chain beginning at /home/USERNAME/Maildir/. The virutal users are stored in a directory chain beginng at /home/USERNAME/imap/exmple.com/

The new directory contains email you haven't read yet. The cur directory contains email you've read but haven't removed from your inbox.

If you make any manual changes to the contents of new, cur, or tmp be sure to delete the indexes; just delete all the files which begin with dovecot*. They'll be rebuilt the next time the user logs in.

Maildir was invented by qmail developer Daniel J. Bernstein; it's the one thing he's done I actually like :).

Note it will move email to /home, and for many of us that means that mail will be subject to quotas for the first time.

Note also that it uses a file for each email. When I first started using Maildir many many many years ago (before DirectAdmin) I had problems with too many ext2 files. None since I've moved to ext3, though, and mail runs a lot faster.

Jeff
 
Back
Top