Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange server 2013 #53

Closed
carlomp opened this issue Jun 3, 2014 · 5 comments
Closed

Exchange server 2013 #53

carlomp opened this issue Jun 3, 2014 · 5 comments

Comments

@carlomp
Copy link

carlomp commented Jun 3, 2014

Hello,

I'm a newbie so be kind :-)

When I'm downloading emails from my Exchange 2013 server, when I reach a chain emails (replies to replies...) the GetMessage returns null.
I have data in fetch envelope command but no fetch body or attachements.

And the same for accessing Tasks or Activities folder where I receive the "Retrieval using the IMAP4 protocol failed for the following message: 2" message.

Thank's

@jstedfast
Copy link
Owner

The only reason it should return null is if the IMAP server failed to return the BODY[] component of the response.

To make sure that this isn't a bug in MailKit's response parser, could you use the ImapClient constructor that takes a IProtocolLogger argument?

var client = new ImapClient (new ProtocolLogger ("imap.log"));

Once you get the log, if you could copy&paste the "FETCH ... BODY.PEEK[]" command and response, that would be really helpful.

And the same for accessing Tasks or Activities folder where I receive the "Retrieval using the IMAP4 protocol failed for the following message: 2" message.

Where does this error message come from? That doesn't look like it's coming from MailKit... is that an exception? Or do you get a MimeMessage object with that error message as the contents?

@carlomp
Copy link
Author

carlomp commented Jun 3, 2014

When I'am accessing Activites folder I receive an incomplete Message from the GetMessage command.

Then I use the Fetch Envelope command and this is the Subject, "Retrieval using the IMAP4 protocol failed for the following message: 2". The Date is also null...

@jstedfast
Copy link
Owner

Ah, that error message is coming from the Exchange server. It's probably some sort of "dummy" message that Exchange adds to the folder as a way of reporting errors. That would also explain why the Date is null.

Any luck getting the protocol log?

@carlomp
Copy link
Author

carlomp commented Jun 3, 2014

Hello again,

I tested with imap.log file. https://dl.dropboxusercontent.com/u/62785429/MailKit/imap.log

I tried to "getMessage" for Activities, Calendar, Contacts folder (one message each) and from Sent folder.

Last message was a chained reply's messages that is null when I use getMessage on his MessageID.

I realised that these chained messages are the problem in the Sent Folder. In MS Outlook 2013 this message look's like a list of messages, not a single message.

Here is my webservice code https://dl.dropboxusercontent.com/u/62785429/MailKit/Email.asmx.vb

I ussualy use getEmail method.

Activit&AQMBYw-i = Activities
Contacte = Contacts
Elemente trimise = Sent Items
Elemente &AV8-terse = Deleted Items

Thank's in advance for your help.

@jstedfast
Copy link
Owner

The relevant snippet of the log seems to be this:

C: A00000030 UID FETCH 3023 (BODY.PEEK[])
S: A00000030 OK FETCH completed.
C: A00000031 UID FETCH 3023:3023 ENVELOPE
S: * 6 FETCH (ENVELOPE (NIL "Retrieval using the IMAP4 protocol failed for the following message: 3023" (("Microsoft Exchange Server 2010" NIL NIL ".MISSING-HOST-NAME.")) NIL NIL (("Roxana Popa" NIL "Roxana.Popa" "grosu.ro")) NIL NIL NIL NIL) UID 3023 FLAGS (\Seen \Recent))
S: A00000031 OK FETCH completed.

The problem is that the A00000030 command is not returning the message data.

When you request the summary of the message, it is also showing that it can't retrieve the message data for some reason (it doesn't say why).

It may be that your Exchange server's database is corrupted or something.

If you use something like Thunderbird to connect to your Exchange IMAP server, I suspect you'll get the same results.

You might want to send an email to your Exchange admin to have him (or her) look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants