When migrating mailboxes via imapsync, some users' mailboxes may fail to migrate if they have IMAP flags set that are not recognized by scalix server.
Usually you will see an error like "BAD syntax error" and can have a look at the line starting with "flags from : " in front of the error to determine what flag is the problem.
In this event, you can use the parameter --regexflag to reset, match to known ones or delete unknown flags at all.
To have a look at the flags that are used by your origin-server and the flags that are supported by your target server (probably scalix) you can use the --debugimap option and search the output for lines containing PERMANENTFLAGS the first one that you'll find are probably the flags supported by your source-imap-server while the following line with that keyword lists the flags supported by your scalix-server.
Currently (as of scalix 11.2) the following flags are known to scalix:
\Answered \Flagged \Deleted \Seen \Draft $Label1 $Label2 $Label3 $Label4 $Label5 $Forwarded Junk NonJunk $MdnSent
- To replace a flag called '$NotJunk' with 'NonJunk' you would use:
- please note, that you do not need the \ in the example above if your original flag from the source does not start with a $ or other (perl-) meta-character
- To delete a flag called 'JunkRecorded' and zero or more spaces that might appear behind it you'd use:
- leave out \s* in order to ignore the space characters after the flag
In order to manipulate more than one flag you will have to add one --regexflag option for each flag that you need to change.
Known regexes for migrating specific products
- Cyrus IMAP4 v2.2.8 -> Scalix 11.2.x
- For a cyrus imap-server you'd have to add all of the the following options:
--regexflag 's/\$NotJunk/NonJunk/' --regexflag 's/\$Junk/Junk/' --regexflag 's/JunkRecorded\s*//'