On Thu, 2006-04-06 at 10:40 +1000, adcx@server101.com wrote:
Is there some way that message uids can be preserved when converting uw-pop3 mbox mail to dovecot maildir format? We've tried perfect_maildir, mb2md and the convert-tool that comes with dovecot but so far have been unable to preserve the message uids, which for example go from 44333a8500000003 before the conversion to 4434621500000003 afterwards. The quantity of mailboxes involved means forcing users to re-pop old emails left on the server isn't an option. Any help appreciated.
If you can preserve the messages' UID values (ie. X-UID header needs to be moved to correct entry in dovecot-uidlist file), then it's easy. Besides UID you'll have to preserve UIDVALIDITY (in X-IMAPbase or X-IMAP header, move to first line in dovecot-uidlist).
After this, you can use pop3_uidl_format = %08Xv%08Xu
Unfortunately I don't know of any conversion tool that preserves the UIDs. I thought for a while about doing it in convert-tool, but it'd require pretty large changes to Dovecot.
And as Grant said, another way would be X-UIDL headers, but you'd need to also create them properly to the mbox files (so the mails really have "X-UIDL: 44333a8500000003" header), so that they get moved into the maildir files as well.