[Dovecot] Problems with POP3 UIDL when migrating from MBOX to Maildir

Timo Sirainen tss at iki.fi
Sun Feb 12 22:44:54 EET 2006


On Sun, 2006-02-12 at 16:20 +0100, Jonas Olsson wrote:
> Questions:
> ----------------
> 
> How does Dovecot generate the POP3 UIDL?

Using pop3_uidl_format. %v means UIDVALIDITY and %u means message UID.
With maildir those are taken from dovecot-uidlist file.

> Is there any workaround that I could use to make Dovecot generate a
> consistent POP3 UIDL output, enabling a migration from MBOX to
> Maildir, or am I stuck with using MBOX?

You can convert your mails in a way that preserves the UIDVALIDITY and
UIDs. In mboxes the UIDVALIDITY is stored in X-IMAPbase or X-IMAP header
in the first mail in the mailbox. UIDs are stored in X-UID header for
each mail.

So what you'd need to do is create some script to build the
dovecot-uidlist file properly. As far as I know no-one's done this yet,
but it shouldn't be too difficult.

dovecot-uidlist file format is:

<uidvalidity> <next-unused-uid>
<uid> <filename>
<next uid> <next filename>
..

You should also set next-unused-uid value properly. It's also in
X-IMAPbase/X-IMAP header as the next number after UIDVALIDITY.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20060212/0f2d6acc/attachment-0001.pgp


More information about the dovecot mailing list