Opened 10 years ago

Closed 10 years ago

#3793 defect closed duplicate (duplicate)

imap4 doesn't cope when FLAGS are returned with RFC822.TEXT

Reported by: jc44 Owned by:
Priority: normal Milestone:
Component: mail Keywords:
Cc: Branch:

Description (last modified by Jean-Paul Calderone)

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:

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)

Change History (3)

comment:1 Changed 10 years ago by Jean-Paul Calderone

Description: modified (diff)

Fixing description markup

comment:2 Changed 10 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

Duplicate of #1105.

comment:3 Changed 8 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.