[Dovecot] Problems with POP3 UIDL when migrating from MBOX to
Maildir
Timo Sirainen
tss at iki.fi
Tue Feb 14 10:43:10 EET 2006
On Mon, 2006-02-13 at 09:02 +0100, Jonas Olsson wrote:
> > You should also set next-unused-uid value properly. It's also in
> > X-IMAPbase/X-IMAP header as the next number after UIDVALIDITY.
>
> A quick lock through the current mailboxes reveals that 28 of them
> contain messages but lack an X-IMAPbase/X-IMAP header. A large
> majority of the mailboxes also lack any X-UID headers.
If they don't have the headers, then it most likely means that POP3
client has downloaded and deleted all the mails, and the mails without
X-UID headers are new ones that the client has never seen yet.
> I can get the UIDVALIDITY base of the the mailboxes missing an X-IMAP
> header by connecting to the Dovecot POP3 service, I guess, but how
> about all the mailboxes lacking X-UID headers? Is there a way I can
> determine, in a scriptable way, which message has which UID or should
> I assume that the UIDs are assigned in chronological order based on
> the next-UID value in the X-IMAP header? That is, the last message in
> the MBOX file has UID = next-UID - 1, the next to last = next-UID - 2,
> and so on?
No. If a message doesn't have X-UID header, then it should be given
next-uid UID. The next message should then be given next-uid+1, etc. And
this should be done even if the message contains already X-UID header,
since it might have been sent remotely and it would be broken in that
case.
But anyway, those messages without X-UID shouldn't have been seen by
POP3 clients yet, so you wouldn't necessarily have to put them into
dovecot-uidlist at all, just let Dovecot give them new UIDs.
More information about the dovecot
mailing list