From: SourceForge.net <no...@so...> - 2010-10-24 17:46:07
|
Bugs item #3090802, was opened at 2010-10-19 22:16 Message generated for change (Comment added) made by nikosch You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=3090802&group_id=49630 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nikolaus Schulz (nikosch) Summary: Empty response from FETCH not handled gracefully Initial Comment: When attempting to FETCH defatils for a particular message number, OpenText FirstClass IMAP may return an "empty" response. It seems the current code does not handle that very well. Example IMAP session with OpenText FirstClass: . EXAMINE "INBOX/foobar" * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) * OK [PERMANENTFLAGS ()] Read-only mailbox. * 3 EXISTS * 0 RECENT * OK [UIDVALIDITY 1100080522] UIDs valid * OK [UIDNEXT 3] Predicted next UID . OK [READ-ONLY] Select completed. . FETCH 1:* (RFC822.SIZE) * 1 FETCH (RFC822.SIZE 5120) * 3 FETCH (RFC822.SIZE 2048) . FETCH 2 (RFC822) . OK FETCH Completed When trying to archive such as mailbox using the current git version of archivemail, it fails like this: 34:57.74 > KKFK128 FETCH 2 (FLAGS) 34:57.77 < KKFK128 OK FETCH Completed 34:57.77 matched r'(?P<tag>KKFK\d+) (?P<type>[A-Z]+) (?P<data>.*)' => ('KKFK128', 'OK', 'FETCH Completed') cleaning up ... removing stale temporary mbox '/tmp/tmpwh4hnzarchivemail/tmp9HUS2s' removing stale tempfile directory '/tmp/tmpwh4hnzarchivemail' Traceback (most recent call last): File "archivemail", line 1822, in <module> main() File "archivemail", line 697, in main archive(mailbox_path) File "archivemail", line 1118, in archive _archive_imap(mailbox_name) File "archivemail", line 1379, in _archive_imap msg_flags = imaplib.ParseFlags(response[0]) File "/usr/lib/python2.6/imaplib.py", line 1374, in ParseFlags mo = Flags.match(resp) TypeError: expected string or buffer ---------------------------------------------------------------------- >Comment By: Nikolaus Schulz (nikosch) Date: 2010-10-24 19:46 Message: I have discussed this issue with the submitter by email, and it turned out that this IMAP server returns no untagged FETCH responses for certain email messages that are corrupted. This means that the server is in an error state which it fails to report it to the client. Since archivemail generally refrains from continuing after any error on the server side, and it turned out this particular error can be fixed by deleting the messages in question, I'm closing this bug as `Wont Fix'. For the record, I have attached a patch from the email exchange with the submitter which lets archivemail skip such messages; however, this patch is not going to be applied. ---------------------------------------------------------------------- Comment By: Nikolaus Schulz (nikosch) Date: 2010-10-20 22:51 Message: Thanks for reporting. Please test the attached patch, it should fix an empty reply to "FETCH (FLAGS)". Your example IMAP session looks interesting. Did you send the "FETCH (RFC822)" before the server completed your first FETCH command? And, which FETCH command was completed there by the "OK FETCH Completed"? I hope it wasn't a "FETCH (RFC822*)" command? Because I would expect that data not to be empty... By the way, feel free to contact me by email about this, microschulz at web.de. This web bug tracker thingy is horrible for serious communication. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=456910&aid=3090802&group_id=49630 |