id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	branch	branch_author	launchpad_bug
3793	imap4 doesn't cope when FLAGS are returned with RFC822.TEXT	jc44		"When doing a IMAP4Client.fetchBody some mail servers will return FLAGS as well as RFC822.TEXT because the /Seen flag has become set (RFC3501 says this SHOULD happen).  If this occurs then the reply is thrown away by Command.finish in the lines:

{{{
            elif N >= 3 and names[1] in self._2_RESPONSES:
                if isinstance(names[2], list) and len(names[2]) >= 1 and names[2][0] == 'FLAGS' and 'FLAGS' not in self.args:
                    unuse.append(L)
                else:
                    send.append(L)
}}}

I can find no way of getting the flags as well as the body in order to get 'FLAGS' in self.args.  This means that no unseen message can be retrieved from this server.

I'm not sure I understand why a line with FLAGS in it wants to be discarded - at most I would expect the FLAGS element to be removed rather that the whole thing (and in my case it would be useful if the FLAGS were returned)
"	defect	closed	normal		mail	duplicate					
