Opened 5 years ago

Closed 5 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:
Author: Launchpad Bug:

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[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)

Change History (3)

comment:1 Changed 5 years ago by exarkun

  • Description modified (diff)

Fixing description markup

comment:2 Changed 5 years ago by exarkun

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1105.

comment:3 Changed 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.