On Wednesday, September 10 at 02:58 PM, quoth Oliver Fromme:
I've got an old dovecot installation (0.99.10.5)

Yikes! Talk about ancient! :)

Now I need to decide whether to update it to a newer version of dovecot or to switch to a different software.

My understanding is that Dovecot has changed so much since then that it's almost like switching to an entirely new piece of software. But, IMHO, it's the best IMAP server out there.

One feature that I really need is to be able to place messages and subfolders in a folder at the same time. This is with mbox format files (I can't use maildir). The old version of dovecot doesn't seem to support that, you can have either subfolders or messages in a folder, but not both.

Does the current version 1.1.3 support it?

Absolutely!

The reason that it wasn't supported before is that Dovecot used (and still does use by default) a layout technique it calls "FS" for mbox mail hierarchies. In essence a mailbox on disk could either be a file (an mbox capable of storing messages, but incapable of storing subfolders) or it could be a folder (capable of storing subfolders, but incapable of storing messages). Like I said, that's still the default for mbox mail storage. HOWEVER, you can tell it to use Maildir++-style layout.

For example, imagine you have the following IMAP mailboxes:

    INBOX
    INBOX.Archive.Family
    INBOX.Family
    Trash

Using the (old) FS layout, they would be arranged something like this:

    INBOX                  -> /var/mail/username
    INBOX.Archive.Family   -> ~/Mail/INBOX/Archive/Family
    INBOX.Family           -> ~/Mail/INBOX/Family
    Trash                  -> ~/Mail/Trash

Using the maildir++ layout, they would be arranged like this:

    INBOX                  -> /var/mail/username
    INBOX.Archive.Family   -> ~/Mail/.INBOX.Archive.Family
    INBOX.Family           -> ~/Mail/.INBOX.Family
    Trash                  -> ~/Mail/.Trash

The config line for maildir++ layout as I just described would be:

    mail_location = mbox:%h/mail:LAYOUT=maildir++:INBOX=/var/mail/%u

Now, that makes the index files hard to place (they'd look like mailboxes), so you probably want to put them someplace else explicitly, like so (all on one line):

    mail_location =
    mbox:%h/mail:LAYOUT=maildir++:INBOX=/var/mail/%u:INDEX=%h/indexes

(Pick your own locations, of course.)

The issue for you, I think, is going to be converting your current FS layout into maildir++ layout. Thankfully, that's trivial to do with Dovecot's "convert" plugin. Just use something like so (in combination with the previous mail_location line):

    protocol imap {
        mail_plugins = convert
    }
    plugin {
        convert_mail = mbox:%h/mail:LAYOUT=fs
    }

Check out http://wiki.dovecot.org/Plugins/Convert for details.

~Kyle
--
No one will ever win the battle of the sexes; there's too much fraternizing with the enemy.
                                                    -- Henry Kissinger

Attachment: pgpOViHTGoB63.pgp
Description: PGP signature

Reply via email to