IMAP parse error - extra space in Subject header

I’m getting an error with IMAP.
15:57:11.973|0D4| * 18 FETCH (UID 4995 RFC822.SIZE 7684 FLAGS () INTERNALDATE “12-Dec-2013 11:58:02 -0500” MODSEQ (1) BODYSTRUCTURE (“text” “html” (“charset” “us-ascii”) NIL NIL “8bit” 6839 182 NIL (“inline” NIL) NIL NIL) ENVELOPE ("Thu, 12 Dec 2013 11:06:28 -0600 " {4294967295}
((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((NIL NIL “xxx” “xxx.com”)) NIL NIL NIL "<[email protected]> ") BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {2}
15:57:11.974|0D4| Exception:
15:57:11.974|0D4| Parse error
15:57:11.974|0D4| Input {4294967295}
((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((NIL NIL “xxx” “xxx.com”)) NIL NIL NIL "<[email protected]> ") BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {2}
15:57:11.974|0D4| Line * 18 FETCH (UID 4995 RFC822.SIZE 7684 FLAGS () INTERNALDATE “12-Dec-2013 11:58:02 -0500” MODSEQ (1) BODYSTRUCTURE (“text” “html” (“charset” “us-ascii”) NIL NIL “8bit” 6839 182 NIL (“inline” NIL) NIL NIL) ENVELOPE ("Thu, 12 Dec 2013 11:06:28 -0600 " {4294967295}
((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((“Santa Clause” NIL “assassinating” “loadingwill.org”)) ((NIL NIL “xxx” “xxx.com”)) NIL NIL NIL "<[email protected]> ") BODY[HEADER.FIELDS (IMPORTANCE X-PRIORITY REFERENCES)] {2}
I traced it down to an empty Subject header with multiple spaces.
The parse error occurs if there is more than one space after colon, for example “Subject:”

If I remove the extra space from the Subject header in the email on the mail server, I don’t get the parse error.

Hi, I will need your IMAP logs, go to tools - settings - advanced, check IMAP under your account, apply and restart eM Client.
Simulate steps that leads to your issue and after that use “send logs…” to [email protected] together with this topic’s URL in subject.

Then you can turn logging off.

Jan