I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route.

I'm trying without success to find out how IMAP organizes and stores mails. As far as I can see I can continue to use my current MTA to prefilter and store mails in maildir structure. I can configure an IMAP server to operate with that structure.

The core of my question is, does an IMAP server leave mails in the maildir folder and simply create indexes to set up virtual user folders, while the [maildir]/new/ folder expands indefinitely? Or does it move/copy mails to its own physical storage - so that e.g. they can mirror the user's folder structure better and avoid possible file system inefficiencies from having all mails in one huge folder?

  • 1
    Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one? – Stephen Kitt Mar 7 at 11:07

IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:


Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.


Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.