On Fri, Apr 11, 2008 at 09:39:25PM -0400, Tom Grove wrote: > >>I am going to start a mass conversion but before I do I need to > >>find a workaround for the difference in UIDLs. Basically, if POP > >>users choose to leave a copy of the messages on the server and I > >>move their messages they will all get downloaded again causing > >>dupes. Dovecot has a way to mask the UIDL so that it looks like > >>IMAP-UW. Is there a way to do this in Courier or some similar > >>workaround? Thanks. > > > >Nope, there isn't. > > > > Okay, I understand that...help me out with this thought. > > I see in the source code that a comment reads something like: The > UIDL is just the file name. Now, I removed the couierpop3dsizelist > file from the Maildir directory. Then renamed the the first part of > the file (prior to the colon) to the IMAP-UW UIDL. The first time > that I connected to the server via telnet the file was recreated and > the UIDLs matched what they were under IMAP-UW. I was able to do some > quick tests and it seemed like it stopped the re-downloading of > messages. Does this make sense?
The logic you are looking at is part of a migration mechanism for when the UID format in courier-imap changed. Originally the UID was the filename. Later, it was changed to be generated from a sequence number stored in courierpop3dsizelist. It was a long time since I last looked at this, but IIRC, the argument for doing this was that maildir unique filenames are long, and some POP3 clients barf on long UID strings. The current format combines two numbers in the courierpop3dsizelist file to build a UID of the form "UIDnnn-mmm". I did suggest that it would make sense to store the full UID in the courierpop3dsizelist file, not just the numbers, so that arbitary strings could be inserted to aid in migrations. However the idea was rejected. If you can find the discussion in the archives, you may also find some details of the three different formats of the courierpop3dsizelist file, as it's not easy to decipher them from the code. Looking at the code now: it seems that for each message in the courierpop3dsizelist file where the message uid number is 0, print_uidl will print a UID based on the filename, not UIDnnn-mmm. And if courierpop3dsizelist doesn't exist, it will be assumed that this should be done for all messages in the mailbox. So yes, the trick you describe will probably work, as long as the UIDs from the old server make valid filenames (in particular they don't include '/') HTH, Brian. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Courier-imap mailing list Courier-imap@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap