Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Imapsync: Transfer only specific IMAP flags

67 views
Skip to first unread message

Andrew Hodgson

unread,
Oct 19, 2008, 9:09:27 AM10/19/08
to
Hi,

I wish to use Imapsync to transfer from one specific IMAP server which
uses several flags to an Exchange server which only supports a few
IMAP flags. My question is: If I know the IMAP flags which are
supported on the destination side, does anyone know a way in Imapsync
to only transfer those specific flags and filter out all others?

Thanks.
Andrew.

Sam

unread,
Oct 19, 2008, 10:14:14 AM10/19/08
to
Andrew Hodgson writes:

imapsync should figure it out by itself. imapsync is an ordinary IMAP
client. IMAP clients are capable of determining which flags are supported by
a given server. If imapsync -- or any other IMAP client -- sees that a given
flag is not carried by the server, it should not attempt to set it, but
rather do something intelligent about it -- offer you an option to remap it
to a different flag, or to ignore it. Check that you're using the latest
version of imapsync, just to make sure that this is something that's already
been fixed.


Fabian

unread,
Nov 5, 2008, 5:20:24 AM11/5/08
to
Hi Andrew,

Exchange supports all known flags but rejects messages without a
backslash (wich is not really an Exchange bug since those flags are
wrong when my understanding of the RFC is correct). Try to use
regexflag to delete all flags that cause problems. I know --regexflag
's/(\A[^\\]\w+\s)|(\s[^\\]\w+)//g' which should delete all buggy flags
(but you have to try it out to validate it). Alternatively you can use
something like --regexflag 's/X-ORACLE-COMMENT//g' and/or --regexflag
's/Junk//g' etc. to modify your flags. Try it with the first example
which should work for all flags without the backslash in front and if
it doesn't work, try to figure out the flags that cause problems and
add a --regexflag for every flag according to the X-Oracle-example
(just replace X-ORACLE-COMMENT with your flag).

By the way:

- Don't migrate to Exchange 2007 using imapsync - you will be in
nothing but trouble ;-( IMAP in Exchange 2007 and especially in SP1 is
not imapsync-friendly
- use --user1 domain.local/adminuser/usertomigrate to log on to
Exchange with an admin account. (The admin used must be granted Send-
As, Receive-As rights on the Store in Exchange (nothing more)) - and
this will not work in Exchange 2007 (KB937359). You can NOT log on to
Exchange 2007 with an admin account via IMAP.
- Exchange 2007 SP1 will add a Received: entry to the header as soon
as imapsync pushes the mails to Exchange via IMAP (not only imapsync
but all IMAP-related transfer actually). This will make Outlook
display the old mails as just recently arrived (...and this is not
what you want). This is a SP1 only behaviour.
- use --skipsize and --useheader 'Message-ID' to avoid duplicated
mails when you run imapsync several times for the same mailbox.

Chears,
Fabian Slupek

Niels Baggesen

unread,
Nov 8, 2008, 11:09:44 AM11/8/08
to
Fabian <slu...@gmail.com> wrote:
> - use --skipsize and --useheader 'Message-ID' to avoid duplicated
> mails when you run imapsync several times for the same mailbox.

And if you happen to have Message-IDs with a blank in them (We had some
of these when migrating from Sun One iPlanet) Exchange will change the
blank to a A so imapsyns will be confused.

/Niels

--
Niels Baggesen -- @home -- Århus -- Denmark -- ni...@baggesen.net
The purpose of computing is insight, not numbers -- R W Hamming

0 new messages