[Dovecot] preserving pop3 mail uids
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.
On Thu, Apr 06, 2006 at 10:40:58AM +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.
what clients directly use the UIDs? I thought ~all client used the X-UIDL header for this purpose, and there is a dovecot feature `pop3_reuse_xuidl' which will read X-UIDL headers from message bodies and store them in the indexes.
grant.
Enabling pop3_reuse_xuidl has gotten us somewhat closer to our goal, but the output of uidl when running a manual pop session is still different:
result when running dovecot against mbox file:
telnet server 110 user user1 pass pass1 uidl 1 44333a8500000001 2 44333a8500000002 3 44333a8500000003
After running mb2md conversion, and with pop3_reuse_xuidl enabled, result when running dovecot against maildir: telnet server 110 user user1 pass pass1 uidl 1 3 2 1 3 2
It's obvious it's keeping the value from the X-UIDL header, but rest is lost, which results in the client sucking down all the emails again.
Thanks for your interest.
On 06/04/2006, at 10:46 AM, grant beattie wrote:
On Thu, Apr 06, 2006 at 10:40:58AM +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.
what clients directly use the UIDs? I thought ~all client used the X-UIDL header for this purpose, and there is a dovecot feature `pop3_reuse_xuidl' which will read X-UIDL headers from message bodies and store them in the indexes.
grant.
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.
participants (3)
-
adcx@server101.com
-
grant beattie
-
Timo Sirainen