First of all, let me open by saying how much I appreciate imapsync. It is well-written and well-documented, and it's been relatively easy to use.
I've accepted a consulting job to transfer mailboxes from a Courier-IMAP server to a Kerio server. Imapsync seems like the best tool for this, so I've been using this to do the transfer. I've been largely successful, with some challenges.
The main one is that Kerio does not seem to support many IMAP flags that Postfix does support. These flags are legal, from my reading of the IMAP RFC, but Kerio appears to be refusing them. (What's more, details about rejected flags do not appear in the Kerio log, so I've had to deduce which flags are rejected by process of elimination.)
The imapsync command-line I'm using is as follows:
+ NO msg #10214 [tiVQDr7n/C4WU3ggN19Hlg:5099278] in INBOX + Copying msg #10214:5099278 to folder INBOX
flags from : [\Seen Junk][] Couldn't append msg #10214 (Subject:[transcript]) to folder INBOX: 748 NO APPEND Invalid flag list
+ NO msg #10690 [sqBQkFVBXT7UG8BjvUg+nA:4409950] in INBOX + Copying msg #10690:4409950 to folder INBOX
flags from : [Junk ][] Couldn't append msg #10690 (Subject:[Doug and Valerie's cars]) to folder INBOX: 1423 NO APPEND Invalid flag list
+ NO msg #5 [RbW7ZBkYq78/lmyrzQv3vg:12080] in 20GoodYears + Copying msg #5:12080 to folder 20GoodYears
flags from : [\Answered \Seen Junk ][] Couldn't append msg #5 (Subject:[Carrie with Getty Images]) to folder 20GoodYears: 2172 NO APPEND Invalid flag list
+ NO msg #6 [SJmnfFTUn/U8erphHRRuhA:10484] in 20GoodYears
+ Copying msg #6:10484 to folder 20GoodYears flags from : [\Seen $Forwarded Junk ][] Couldn't append msg #6 (Subject:[FW: 20 Good Years]) to folder 20GoodYears: 2173 NO APPEND Invalid flag list
It's pretty clear from this and other examples that "Junk" is an invalid flag on Kerio. I tried to use the word boundry regex patterns to limit the match to "Junk" as a word. ("$Junk" is a valid flag.) It doesn't seem to be working. Suggestions? (From the other regexflag statements, you can see the other "invalid" flags I've had to get rid of.)
Here's an example of "$Junk" being valid: + NO msg #1391 [+NwXLSS2c3kqlqHwyzm1xQ:3094] in INBOX + Copying msg #1391:3094 to folder INBOX flags from : [\Seen $Junk ][] Copied msg id [1391] to folder INBOX msg id [473]
Here's some info from the initialization of imapsync: $RCSfile: imapsync,v $ $Revision: 1.241 $ $Date: 2007/12/31 13:39:02 $ Here is a [linux] system (Linux ssc-imap-mover 2.6.24-21-server #1 SMP Wed Oct 22 00:18:13 UTC 2008 i686)
with perl 5.8.8 and the module Mail::IMAPClient version used here is 2.2.9 ... will try to use CRAM-MD5 authentication on host1 will try to use CRAM-MD5 authentication on host2 ... Banner : * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc.
... From capability : QUOTA STARTTLS NAMESPACE IDLE THREAD=ORDEREDSUBJECT ACL SORT UIDPLUS CHILDREN ACL2=UNION IMAP4REV1 THREAD=REFERENCES To capability : ID QUOTA ANNOTATEMORE AUTH=DIGEST-MD5 STATUS-COUNTERS IDLE ANNOTATE UNSELECT SORT UIDPLUS IMAP4 IMAP4REV1 AUTH=CRAM-MD5 AUTH=PLAIN LISTEXT AUTH=LOGIN ACL LITERAL+
>From state Authenticated To state Authenticated