Shared folders using mbox format

Sven Hartge sven at svenhartge.de
Sat Sep 26 01:27:49 EEST 2020


On 25.09.20 23:04, Alex wrote:
> Hi,
> 
>>> I'd like to create a shared folder to be used with an Outlook client
>>> and a Thunderbird client. We're currently using mboxes.
>>>
>>> I've read the documentation here about creating a shared folder:
>>> https://wiki.dovecot.org/SharedMailboxes/Shared
>>>
>>> It doesn't make reference to how to do this using mbox format. Is it
>>> possible? Should we convert to Maildir? Perhaps there's a way to
>>> provide both formats?
>>
>> You should never use mbox for anything other than maybe read-only
>> archival storage.
>>
>> Use Maildir++ if you need to be compatible with anything accessing the
>> mail other than Dovecot or better yet, use Dovecots own sdbox format.
> 
> I think the reason we're still using mbox is for historical reasons -
> these mailboxes are decades old.
> 
> Should I investigate an mbox2maildir conversion? Can I be sure it will
> do it properly?

Dovecot can do the conversion itself, there is documentation in the Wiki
about this, for example https://wiki.dovecot.org/Migration/MailFormat

In the end, it boils down to something like this:

$ doveadm -D -v -o backup -u sven sdbox:~/sdbox

You can do this conversion in the background and restart at will, as it
will work incrementally. Then, once satisfied, you can change the
Dovecot configuration and switch over fully.

Or if you provide the mail_location via userdb do it on a user-per-user
basis. The possibilities are nearly endless here.

But I would not migrate to Maildir, if you can avoid it.

While Maildir seems to be an obvious choice, it has some hidden
performance impacts, namely it relies heavily on information encoded in
the filename, which results in a big overhead in meta-operations,
because Dovecot needs to stat() every file in a directory to gather
those information.

(I see this in my NetApp NFS-Filer, 95% of NFS Ops are for "other" which
cDOT classes any operation that is not "read" or "write".)

Also once a mail has been read or replied or marked for deletion, the
file name changes which will trigger an additional backup of the mail.

"mdbox" would be another good choice, but this needs more tuning to your
local usage patterns and your backup regime. Using mdbox without
precisely thinking about its implications can make matters worse.

This is why I advocate for the usage of "sdbox". It has a single file
per mail, as has Maildir, but does not change the filename once the
state of a mail changes, reducing unnecessary additional copies in your
backup.

Grüße,
Sven.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://dovecot.org/pipermail/dovecot/attachments/20200926/b55a5325/attachment.sig>


More information about the dovecot mailing list