[Dovecot] making Dovecot match Courier POP3 UID's
Hi, guys.
I've read the information in the Wiki about making dovecot's UID's match Courier's UID's in the POP3 server, so that a UIDL command on either server will return the same UID's for the same group of messages. However, what I've read doesn't match what I'm seeing in Courier.
Courier appears to keep the UID numbers for messages that it uses for the POP3 server separate from the UID numbers for the IMAP server. Courier has a file: courierpop3dsizelist which has a line for every message, like:
1129610881.6075832619.blade4:2,S 2361 1478:1065670602 1129727025.1168007000.blade1:2,S 14718 1479:1065670602 1130005953.3295720403.blade5:2,S 1554 1481:1065670602 1130108068.0849623942.blade5:2,S 8246 1482:1065670602
The first column is the maildir filename, the last column is the UID that the POP3 server uses and the UID validity. Both are used to create the UID number returned by UIDL.
The IMAP server uses a completely different UID number that's stored in courierimapuiddb.
So, it seems to me that dovecot can't ever match Courier's UID numbers for the POP3 server unless it reads and interprets this courierpop3dsizelist file.
My Courier-IMAP installation is Courier-IMAP 4.0.6.
Any ideas? This is a real hassle because it means I can't switch the POP3 server from Courier to Dovecot or, if I do, lots of my users will download every message again which is just unacceptable.
Thanks Jeff
On Sun, 2006-04-16 at 20:01 -0400, Jeff Tucker wrote:
Hi, guys.
I've read the information in the Wiki about making dovecot's UID's match Courier's UID's in the POP3 server, so that a UIDL command on either server will return the same UID's for the same group of messages. However, what I've read doesn't match what I'm seeing in Courier.
Courier appears to keep the UID numbers for messages that it uses for the POP3 server separate from the UID numbers for the IMAP server. Courier has a file: courierpop3dsizelist which has a line for every message, like:
1129610881.6075832619.blade4:2,S 2361 1478:1065670602 1129727025.1168007000.blade1:2,S 14718 1479:1065670602 1130005953.3295720403.blade5:2,S 1554 1481:1065670602 1130108068.0849623942.blade5:2,S 8246 1482:1065670602
Oh. For some reason I had thought it used the same IMAP uidlist file. Perhaps earlier versions did?
So, it seems to me that dovecot can't ever match Courier's UID numbers for the POP3 server unless it reads and interprets this courierpop3dsizelist file.
Right. You could maybe try building a script which builds dovecot-uidlist based on those UIDL values. Or alternatively you'll have to patch Dovecot's code..
Timo Sirainen wrote:
Courier appears to keep the UID numbers for messages that it uses for the POP3 server separate from the UID numbers for the IMAP server. Courier has a file: courierpop3dsizelist which has a line for every message, like:
1129610881.6075832619.blade4:2,S 2361 1478:1065670602 1129727025.1168007000.blade1:2,S 14718 1479:1065670602 1130005953.3295720403.blade5:2,S 1554 1481:1065670602 1130108068.0849623942.blade5:2,S 8246 1482:1065670602
Oh. For some reason I had thought it used the same IMAP uidlist file. Perhaps earlier versions did?
I have the same issue, and a workaround (courier 4.0.2 vs dovecot-1.0.rc2).
In the user's Maildir/ directory, I run the following commands:
rm dovecot* head -2 courierpop3dsizelist | tail -1 | awk '{print(1,$3)}' | sed 's/:/ /' | awk '{print($1,$3,$2)}' > dovecot-uidlist
And in dovecot.conf I have the following:
protocol pop3 { pop3_uidl_format = UID%u-%v }
This has been tested and works for at least three mailboxes here with
3000 mails (why these people still use pop3 is beyond me).
By the way, another server running courier 3.0.7 seems to simply use the filename.
Robin Elfrink
Robin Elfrink wrote:
head -2 courierpop3dsizelist | tail -1 | awk '{print(1,$3)}' | sed 's/:/ /' | awk '{print($1,$3,$2)}' > dovecot-uidlist
That didn't end up very well.
Perhaps this is better:
head -2 courierpop3dsizelist |
tail -1 |
awk '{print(1,$3)}' |
sed 's/:/ /' |
awk '{print($1,$3,$2)}' > dovecot-uidlist
Robin Elfrink
participants (4)
-
Jeff Tucker
-
Robin Elfrink
-
Robin Elfrink
-
Timo Sirainen