[Dovecot] mbox2mdir... what about UIDs/etc? (was: how to best import Evolution/Thunderbird mail into dovecot?)

Christoph Anton Mitterer calestyo at scientia.net
Tue Oct 30 02:42:25 EET 2012


Hi again :)

In the meantime I made some checks[0] on how much storage one looses by
using maildir (compared to mbox)... and decided that it's much but I can
live with it.

This of course doesn't solve my problems that I have a possibly a mix of
different mbox subformats, a mix of different mail status formats
(Thunderbird and Evolution)... and some 17k mails that suffered from
From_ line corruption (due to Evolution, getmail and postfix either
incorrectly quoting them or even intentionally using mboxo)... so I'll
still need some scripting in the end.

Which I'll base upon mb2md[1] respectively it's Dovecot-izsed
version[2].
I diffed the two, and it seems the only differences are that the later
handles the following in addition:
1) keywords (via X-IMAP, X-IMAPbase and X-Keywords)
2) UIDs, UIDVALITIDYs and UIDLASTs (via the X-IMAP, X-IMAPbase and X-UID
mail headers of the mboxes
3) ,S= and ,W= tags

(Guess that's it right?)


Now I have some questions:
to 1) I never used keywords on mails myself so far,... so if any
X-Keywords headers exist, these were sent from remote.
So I guess I _really want_ to ignore them (and not let remote people set
my local keywords), right?


to 2) I haven't had time yet to read into the IMAP4 RFC (though I'll
need to do so soon),... but AFAIU the UIDs, UIDVALITIDYs and UIDLASTs
are used for the server/clients to identify which message they talk
about and avoid unnecessary reloading and to assure statuses are set on
the right message, etc.

All mails that I migrate were only used locally by one client.
So I guess I can fully ignore any UID/UIDVALITIDY/UIDLAST preservation,
right?

So in principle I can use plain mb2md (without the dovecot mods)... and
simply convert all my mboxes to maildir, put them in the dovecot mail
(having the mails in the ../new dirs) location and start dovecot, right?

Now will dovecot itself assign fresh consecutive UIDs to all maildir
files? Or will I get into troubles?


to 3) If dovecot can make use of these,.. I'm happy with having them
set, but analogous to (2):
If I use plain mb2md (without the dovecot mods)... and simply convert
all my mboxes to maildir, put them in the dovecot mail (having the mails
in the ../new dirs) location and start dovecot....

Can I make dovecot to calculate these fields by itself when it loads?



Thanks,
Chris.


[0] http://dovecot.org/pipermail/dovecot/2012-October/069130.html
[1] http://batleth.sapienti-sat.org/projects/mb2md/
[2] http://dovecot.org/tools/mb2md.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5450 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20121030/4d70743b/attachment.bin>


More information about the dovecot mailing list