MessageHeaderCommand should use BODY.PEEK


I had an issue with Gmail recently where all messages I was receiving had the \Seen flag set. It seems sometime in August they changed their IMAP implementation to implicitly set the \Seen flag when the FETCH (FLAGS BODY[HEADER]) command is sent. I changed my code to FETCH (FLAGS BODY.PEEK[HEADER]) and this fixed the issue. According to the IMAP spec this is the correct way to do this:
                 An alternate form of BODY[<section>] that does not
                 implicitly set the \Seen flag.
http://james.apache.org/server/rfclist/imap4/rfc2060.txt (Search for "[Page 43]")
Closed Apr 5, 2010 at 12:24 PM by JasonMiesionczek
MessageHeaderCommand has been updated to reflect this. Thanks for your contribution.