[Dovecot] Dovecot 2.0.13 How to use POP3 order
I saw a few commits for 2.0.13 that added MAIL_FETCH_POP3_ORDER, but I haven't been able to find any information on how to use it.
I'm migrating from a Merak mail server into dovecot and all the email can be copied directly into a Maildir/cur directory. The filenames are just the timestamps. When I check with dovecot pop3, they seem to be randomly ordered. I'm hoping this provides a solution where it will look at the file list or stat order.
If this isn't possible, can someone tell me how I can change the order in which dovecot lists mails in a UIDL in POP3?
Thanks,
Nick Celebic
On Thu, 2011-08-25 at 15:11 -0400, Nick Celebic wrote:
I saw a few commits for 2.0.13 that added MAIL_FETCH_POP3_ORDER, but I haven't been able to find any information on how to use it.
You'll need to add "O<number>" fields to dovecot-uidlist where the numbers are sorted in the order you want the mails to show up. For example:
1 O2 Pfoo :mailfile1 2 O1 Pbar :mailfile2
Now message with IMAP UID 2 is shown first in POP3 UIDL (with POP3 UIDL "bar") and the message with IMAP UID 1 is shown second in POP3 UIDL (with POP3 UIDL "foo").
But if you're only migrating from another POP3 server, this doesn't matter. It was added only to fix the situation when IMAP UID order doesn't match POP3 UIDL order and the user has been using both IMAP and POP3.
So if you simply want POP3 UIDLs to be in wanted order, just put them in the right order to dovecot-uidlist:
1 Pbar :mailfile2 2 Pfoo :mailfile1
http://no1.wiki2.dovecot.org/MailboxFormat/Maildir explains dovecot-uidlist more, and you can also look at http://www.dovecot.org/tools/courier-dovecot-migrate.pl as an example.
participants (2)
-
Nick Celebic
-
Timo Sirainen