IMAP Synchronization Issues

I’m evaluating eM Client as a replacement for Outlook. I’ve encountered a couple issues. Before proceeding, I should note the following:

* I’ve using eM Client version 5.0.17595.0.
* I’m connecting to SmarterMail Enterprise 11.0.4821.
* I transferred my mail from Outlook to the server using IMAP. At which point, I configured eM to connect to the server using IMAP. I have not attempted to import anything directly from Outlook into eM Client.

First, eM Client encountered a problem parsing a message’s headers. This caused the client to stop downloading messages in the folder. In other words, it didn’t simply skip the problematic message. I enabled logging [Great feature, BTW] to determine which message was causing problems. I then removed the message. At which point, eM Client successfully downloaded all the messages in the folder (over 50,000).

I mention this because the failure was pretty severe and because other clients did not seem to have this problem. That is to say, if they had a problem parsing the message, I was not aware. They seemed to successfully download all the mail. However, I didn’t specifically check for that message. It’s possible they simply skipped it.

I believe this is the relevant portion of the log file:

* 33546 FETCH (UID 33546 RFC822.SIZE 6083 FLAGS (\SEEN) INTERNALDATE “2-May-2011 11:35:30 -0400” BODYSTRUCTURE ((“text” “plain” (“charset” “us-ascii”) NIL NIL “7bit” 93 8 NIL NIL NIL)(“text” “html” (“boundary” “----=_NextPart_000_654B_01CC08BD.0AF2B0A0” “charset” “us-ascii”) NIL NIL “quoted-printable” 4874 103 NIL NIL NIL) “alternative” (“boundary” “----=_NextPart_000_2D1F4_01CE2C9E.0B7EFE50”) NIL NIL) ENVELOPE (“Mon, 2 May 2011 11:35:31 -0400” “example subject?”" (({12}
Parse error here -" (({12}
Parse error here -" (({12}
User Name NIL “username” “example.com”)) (({12}
Exception:
Protocol violation
Line User Name NIL “username” “example.com”)) (({12}
Greetings * OK IMAP4rev1 SmarterMail

Note that the subject starts with a double quote and ends with the following character sequence:

?""

Deleting the last double quote at the end seemed to fix the issue. After changing the subject (by manually editing the message file on the server), I moved the message back into the folder. At which point, eM Client was able to parse it successfully. I looked at the message in a hex editor and did not see any other unusual characters (bare LFs, null bytes, etc.).

Second, with the exception of the Inbox, eM Client does not appear to be caching the contents of any folder. When I click the Inbox folder, I see the list of messages immediately. This list appears to be cached. It may update after a second or two, but otherwise, the message list appears persistent. When clicking any other folder (Sent, Junk E-mail, etc.), I may see the messages for an instant. Then, they disappear. At which point, eM Client starts rebuilding the list from scratch.

I do not see any errors in the eM client logs. I’ve tried enabling the “Download messages for offline use” option, both at the folder and account level. I’ve run the Repair operation on various folders. Nothing seems to correct the problem. I’m not sure how to proceed at this point. As noted above, I’ve tried a few other clients. They do not exhibit this behavior.

Otherwise, eM Client seems really nice. The only feature that I’m missing is integration with the native Windows search.

I am sorry but I cannot provide you any solution at the moment because the problem does not lie on our side. We recommend you to contact your server administrator and report them the problem.

I reported two problems. The first had to do with poor error handling (one problematic message aborts the synchronization). The second has to do with caching (or the lack there of). It’s not clear if you’re responding to the first or the second. As I said, I was able to get past the first error by editing the message by hand. At which point, eM Client was able to download all the mail. So, I’m going to assume you’re responding to the second problem, the fact that eM Client keeps downloading the mail, over and over again.

As it stands, I can’t take this to our mail server vendor. I don’t have an error message. All I have is the errant behavior of one email client. As far as I can tell, at no point does eM Client throw or log an error, nor are there any errors in the server logs. And, on top of it, other email clients seem to work fine. Just to be clear, I’m not disputing that there’s a server issue. I would gladly report it to our mail server vendor. But I can’t go to them empty handed.

If you’re interested in getting this fixed, let me know. I can produce client and server logs. I can set up test accounts. If it is a bug with the mail server, I can take it to our mail server vendor. We have a support contract, and they’ve been very responsive. In the latest release alone, they addressed several issues that we reported. I have little doubt that they’d fix whatever issue may be preventing eM Client from caching messages locally–provided we identify the problem.

OK, my mistake. My previous answer is related to the second mentioned error. To be exact, the problem is caused by incorrect handling of quotation marks (e.g. here: " “example subject?”").
As regards the first problem - I discussed it with our developers and they told me that it is not possible to handle the errors in any other way.

In regards to the parsing issue, I set up a simple test. I sent a test message with a problematic subject. I used telnet to retrieve the message and saved a transcript of the session. I reviewed RFC 3501 and reported a possible bug to our mail server vendor. I included the relevant grammar from the RFC.

In regards to the improving eM Client’s error handling, I’m surprised that there’s no way to handle the parsing error more gracefully. As noted, other email clients behave much better in this respect. But, maybe they are making a trade off, sacrificing RFC compliance for a better user experience, for example. I’ll defer.

I still don’t understand why eM Client isn’t caching messages. The parsing error isn’t relevant to the caching issue. eM Client doesn’t log any errors, much less a parsing error. To review, this is the behavior I’m seeing:

Second, with the exception of the Inbox, eM Client does not appear to be caching the contents of any folder. When I click the Inbox folder, I see the list of messages immediately. This list appears to be cached. It may update after a second or two, but otherwise, the message list appears persistent. When clicking any other folder (Sent, Junk E-mail, etc.), I may see the messages for an instant. Then, they disappear. At which point, eM Client starts rebuilding the list from scratch.

I do not see any errors in the eM client logs. I’ve tried enabling the “Download messages for offline use” option, both at the folder and account level. I’ve run the Repair operation on various folders. Nothing seems to correct the problem. I’m not sure how to proceed at this point. As noted above, I’ve tried a few other clients. They do not exhibit this behavior.

I don’t know how to troubleshoot that issue. I only see this behavior from eM Client. eM Client doesn’t log an error. Is this normal behavior? If not, what should I do to find the cause?

Have the same problem. eM Client is exactly what I need, but I can’t download my messages either. I don’t know why eM Client can’t just skip errors or replace the message subject where it’s problematic.

Been stuck on Thunderbird for this reason, which has terrible message composing features. Just horrible. My outgoing emails never look the same.

Send us your IMAP logs and I will be able tell you more.

What functions should I enable logging for? Where should I send the log?

So I enabled logging for all things and here is what I get in eM Client:

21:43:55 email@email [IMAP] MailExceptions.ConnectionException:
21:43:55 (Connection terminated)
21:43:55 at MailClient.Imap.Synchronizer.ImapCommand.ThrowIfConnectionBroken(BasicResponse response)
21:43:55 at MailClient.Imap.Synchronizer.SynchronizeMessagesCommand.FetchNewMessages(ConnectionContext context, String selectPath, UInt32 idLow, UInt32 idHigh, String idList, Boolean useUid, UInt32 messageCountEstimate)
21:44:40 at MailClient.Imap.Synchronizer.SynchronizeMessagesCommand.Execute(WorkerStatus status)
21:44:40 at MailClient.Commands.Command.Process(WorkerStatus status)

And in the log file:

System.Net.Sockets Verbose: 0 : [5560] Exiting Socket#36462650::Receive() -> 4096#4096
* 664 FETCH (UID 11612 RFC822.SIZE 69869 FLAGS (\SEEN) INTERNALDATE “12-Mar-2013 22:24:51 +0300” BODYSTRUCTURE (((“text” “plain” (“charset” “us-ascii”) NIL NIL “7bit” 3847 190 NIL NIL NIL)(“text” “html” (“charset” “us-ascii”) NIL NIL “quoted-printable” 7211 129 NIL NIL NIL) “alternative” (“boundary” “----=_NextPart_001_0005_01CE1F70.2CA45B10”) NIL NIL)(“application” “vnd.ms-excel” (“name” “Borderou 306_08.03.xls” “filename” “Borderou 306_08.03.xls”) NIL NIL “base64” 26812 NIL NIL NIL)(“application” “vnd.ms-excel” (“name” “Borderou 304_08.03.xls” “filename” “Borderou 304_08.03.xls”) NIL NIL “base64” 30244 NIL NIL NIL) “mixed” (“boundary” “----=_NextPart_000_0004_01CE1F70.2C9D2F20”) NIL NIL) ENVELOPE (“Tue, 12 Mar 2013 22:23:00 +0200” “OTTO 08.03.2013” (({14}
* 665 FETCH (UID 11616 RFC822.SIZE 11545 FLAGS (\SEEN) INTERNALDATE “13-Mar-2013 01:24:49 +0300” BODYSTRUCTURE (((“text” “plain” (“charset” “iso-8859-2”) NIL NIL “quoted-printable” 582 24 NIL NIL NIL)(“text” “html” (“charset” “iso-8859-2”) NIL NIL “quoted-printable” 2191 51 NIL NIL NIL) “alternative” (“boundary” “----=_NextPart_001_006F_01CE1F89.8670E7D0”) NIL NIL)(“image” “png” (“name” “logo.png”) NIL NIL “base64” 5728 NIL NIL NIL) “related” (“boundary” “----=_NextPart_000_006E_01CE1F89.8670E7D0”) NIL NIL) ENVELOPE (“Wed, 13 Mar 2013 01:24:36 +0200” “Convocare sedinta saptamanala PNR- Sibiu” (({12}
Parse error here -:dan.anton"" “cona.ro”) (NIL NIL “office” “starsibian.ro”)) NIL NIL NIL “”) BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {17}
Parse error here -:dan.anton"" “cona.ro”) (NIL NIL “office” “starsibian.ro”)) NIL NIL NIL “”) BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {17}
Parse error here -:dan.anton"" “cona.ro”) (NIL NIL “office” “starsibian.ro”)) NIL NIL NIL “”) BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {17}
Parse error here -:dan.anton"" “cona.ro”) (NIL NIL “office” “starsibian.ro”)) NIL NIL NIL “”) BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {17}
X-Priority: 3
Exception:
Protocol violation
Line X-Priority: 3
Greetings * OK IMAP4rev1 SmarterMail

Recently SmarterMail released some updates that mentioned some parsing errors. I updated, but things remained the same.

Furthermore, I use this email account, and others, on Thunderbird, Outlook and Apple Mail on my iPhone and never had a problem.

Thanks,

Samuel

You can’t just throw this issue off by saying it’s a server fault, while Thunderbird, Outlook, Zimbra, Live Mail, Apple Mail show no error while synchronizing all folders. It doesn’t make sense.

The only conclusion to draw, is that you don’t want to adapt your system to SmarterMail, just like any of the above mentioned email clients have done.

Just wanted to follow up on this issue. SmarterMail version 11.2.4870 fixes the encoding issue that I reported. Specifically:

FIXED: The IMAP Envelope command now properly encodes a subject that includes a quote at the start and end of the text and one or more in the inner text.

It’s also worth noting that a day later, SmarterTools released another fix (11.2.4871) for IMAP encoding:

FIXED: Responses to the IMAP Body command are now encoded properly.

Neither of these addresses the way eM handles errors or the synchronization issue (my IMAP logs do not have any errors).

OK, thank you for the info.

Hello

Same problem, eM stops downloading and synchronizing for a specific message that I can’t find (I have too much mails). Windows Live mail, Thunderbird, The CAT, Outlook, Opera mail and others do not have this problem. I can’t really use eM because of this problem. It is a pity because otherwise, it is a nice emailer.

HI… I found the messages causing the problems and deleted them thanks to the log. It works fine now. Yes, I suggest a better handling of errors if possible.

Regards, Larent

Hello,

thank you for this information.

with regards
Jan

i have the exact caching and sync problem … using smartermail also … i can not believe emclient has ignored this error for so long …