Ticket #44 (closed defect: fixed)

Opened 22 months ago

Last modified 21 months ago

[PATCH] Parsing repeated UID correctly

Reported by: nya Owned by: menno
Priority: major Milestone: 0.6
Version: Keywords:
Cc:

Description

On FETCH, some servers repeat UID for multiple lines on its response. Current version of IMAPClient does not handle this correctly and some part of the response can be overwritten.

I'm attaching a small patch to resolve this issue.

Attachments

IMAPClient-0.5.2-repeated-uid.patch Download (0.6 KB) - added by nya 22 months ago.

Change History

Changed 22 months ago by nya

Changed 22 months ago by menno

  • owner set to menno
  • status changed from new to accepted
  • milestone set to 0.6

Thanks very much. I hadn't seen this behaviour before. I'll get this into 0.6.

Would you mind telling me which IMAP server exhibits this behaviour?

Changed 22 months ago by nya

I encountered this problem on a Courier-IMAP server 4.4.0-2 which comes with Debian lenny installation. Actually I'm not familier to IMAP protocol itself, so it may be a bug of the server...

I have used IMAPClient to migrate my emails. It worked very well, thank you for a cool library :)

Changed 22 months ago by menno

Glad you like IMAPClient!

The response parser code has changed a lot since 0.5.2 and the current trunk seems to do the right thing when UIDs are repeated. I've added a unit test for this anyway (r145).

I also installed Courier on Debian to try and get it to emit duplicate UIDs but wasn't able to get it to do it. Could you give an example fetch that causes the problem?

It would be even more helpful if you gave me the output of a fetch with your_imapclient_instance._imap.debug set to 5 before doing the fetch so I can see the protocol traffic.

Changed 21 months ago by menno

  • status changed from accepted to closed
  • resolution set to fixed

Closing as I believe this has been dealt with. Re-open if it turns out there's still a problem.

Note: See TracTickets for help on using tickets.