imap4 doesn't cope when FLAGS are returned with RFC822.TEXT
|Reported by:||jc44||Owned by:|
Description (last modified by exarkun)
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 in self._2_RESPONSES: if isinstance(names, list) and len(names) >= 1 and names == '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)