[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with Exchange and message size


From "John Allberg" <john_allberg at hotmail dot com>
Subject Problems with Exchange and message size
Date Tue, 14 Oct 2008 15:52:24 +0200

Hi!

 

We’re going to migrate from Exchange to hMailserver and of course want to keep the old emails. We’re trying to copy the old emails using imapsync and we’re getting empty emails at the destination and when running imapsync next time we’re getting duplicates of the empty messages.

 

I used wireshark to look at the traffic and it seems Microsoft Exchange reports to low message sizes for some messages, especially old ones. For example, one message is reported with 451 bytes and when retrieved it’s 1437 bytes long.

 

Here is an extract of the imap traffic, where “>” means traffic to the server and “<” means traffic to the client:

> 64 UID FETCH 7 (RFC822.SIZE)

< * 7 FETCH (RFC822.SIZE 451 UID 7)

< 64 OK FETCH completed.

> 65 CAPABILITY

< * CAPABILITY IMAP4 IMAP4rev1 IDLE LOGIN-REFERRALS MAILBOX-REFERRALS NAMESPACE LITERAL+ UIDPLUS CHILDREN AUTH=NTLM

< 65 OK CAPABILITY completed.

> 66 UID FETCH 7 BODY.PEEK[]

< * 7 FETCH (BODY[]

< {1437}

< Received: by xxxxxx

< ---- cutting away email headers and content, totally 1437 bytes ----

< UID 7)

< 66 OK FETCH completed.

 

To the new server

> 16 APPEND "Some.Folder.Name" (\Seen) "21-Nov-2003 10:43:40 +0200" {451}

< + Ready for literal data

> ---- cutting away email headers, only 451 bytes ----

< 16 OK APPEND completed

 

So the email has been cut at 451 bytes in the middle of the headers, leaving an empty and crippled email. Since the cut was done in the headers running the sync later will not notice that the email has already been synced since the email headers isn’t the same and will try to sync the mail again, creating a duplicate of an empty mail.

 

So my question is, is there a way to bypass the message size when moving the message by simply reading the real message size from what we got from the source server instead of trusting the source server to supply the correct size?

 

Best regards,

 

John