Your message dated Sun, 29 Apr 2012 19:48:01 +0100
with message-id <[email protected]>
and subject line [offlineimap] TypeError: NoneType due to expunge removing all 
messages marked "delete", causing offlineimap to lose track of which UIDs exist
has caused the Debian Bug report #501581,
regarding [offlineimap] TypeError: NoneType due to expunge removing all 
messages marked "delete", causing offlineimap to lose track of which UIDs exist
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
501581: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=501581
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: offlineimap
Version: 6.0.3
Severity: normal

I know that his bug has been reported before, but I couldn't locate it.
Under certain still not completely reproducible conditions
(but which generally involve accessing the folders on the IMAP server
with additional clients, but not at the same time!).
See below for an explanation of what I believe is happening.

The exact TypeError:
---
Thread 'Copy message 1302 from .' terminated with exception:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/offlineimap/threadutil.py", line 149, 
in run
    Thread.run(self)
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/var/lib/python-support/python2.5/offlineimap/folder/Base.py", line 
277, in copymessageto
    message = self.getmessage(uid)
  File "/var/lib/python-support/python2.5/offlineimap/folder/IMAP.py", line 
167, in getmessage
    return initialresult[1][0][1].replace("\r\n", "\n")
TypeError: 'NoneType' object is unsubscriptable
---

IMAP server is Courier from stable btw.

Here are some excerpts from the debug output:
---
DEBUG[imap]:   39:54.06 > PMOM6 FETCH 1:80 (FLAGS UID INTERNALDATE)
[...]
DEBUG[imap]:   39:54.30 < * 74 FETCH (FLAGS (\Seen \Deleted receipt-handled) 
UID 1302 INTERNALDATE "08-Oct-2008 10:27:28 +0200")
DEBUG[imap]:   39:54.30         matched r'\* (?P<data>\d+) (?P<type>[A-Z-]+)( 
(?P<data2>.*))?' => ('74', 'FETCH', ' (FLAGS (\\Seen \\Deleted receipt-handled) 
UID 1302 INTERNALDATE "08-Oct-2008 10:27:28 +0200")', '(FLAGS (\\Seen \\Deleted 
receipt-handled) UID 1302 INTERNALDATE "08-Oct-2008 10:27:28 +0200")')
[... Note that the flags include "\Delete" ...]
DEBUG[imap]:   39:54.31 < PMOM6 OK FETCH completed.
[...]
DEBUG[imap]: imapsplit() called with input: FLAGS (\Seen \Deleted 
receipt-handled) UID 1302 INTERNALDATE "08-Oct-2008 10:27:28 +0200"
DEBUG[imap]: imapsplit() returning: ['FLAGS', '(\\Seen \\Deleted 
receipt-handled)', 'UID', '1302', 'INTERNALDATE', '"08-Oct-2008 10:27:28 
+0200"']
DEBUG[imap]: options2hash called with input: ['FLAGS', '(\\Seen \\Deleted 
receipt-handled)', 'UID', '1302', 'INTERNALDATE', '"08-Oct-2008 10:27:28 
+0200"']
DEBUG[imap]: options2hash returning: {'INTERNALDATE': '"08-Oct-2008 10:27:28 
+0200"', 'FLAGS': '(\\Seen \\Deleted receipt-handled)', 'UID': '1302'}
[...]
Deleting 23 messages (1280, 1283, 1285, 1286, 1281, 1288, 1289, 1290, 1291, 
1292, 1294, 1295, 1296, 1297, 1298, 1299, 1287, 1293, 1284, 1282, 1279, 1276, 
1277) in IMAP[INBOX], LocalStatus[.]
DEBUG[imap]:   39:54.35 > PMOM7 SELECT INBOX
[...]
DEBUG[imap]:   39:54.43 < PMOM7 OK [READ-WRITE] Ok
[...]
DEBUG[imap]:   39:54.43 > PMOM8 UID STORE 
1280,1283,1285:1286,1281,1288:1292,1294:1299,1287,1293,1284,1282,1279,1276:1277 
+FLAGS (\Deleted)
[... various flag updates ...]
DEBUG[imap]:   39:54.60 < PMOM8 OK STORE completed.
[... flag hashs being updates ...]
DEBUG[imap]:   39:54.61 > PMOM9 EXPUNGE
DEBUG[imap]:   39:55.38 < * 48 EXPUNGE  [2 times]
DEBUG[imap]:   39:55.38 < * 49 EXPUNGE  [25 times]
DEBUG[imap]:   39:55.38 < * 50 EXPUNGE  [3 times]
DEBUG[imap]:   39:55.39 < * 50 EXISTS
DEBUG[imap]:   39:55.39 < * 0 RECENT
DEBUG[imap]:   39:55.39 < PMOM9 OK EXPUNGE completed
[... note that this means 30 messages were expunged. 48/49/50 being offsets in 
the folder? ...]
Copy message 1302 IMAP[INBOX] -> Maildir[.], LocalStatus[.]
DEBUG[imap]:   39:55.71 > PMOM10 EXAMINE INBOX
[... various meta data such as uidvalidity, 50 exists, etc. ...]
DEBUG[imap]:   39:55.78 > PMOM11 UID FETCH 1302 (BODY.PEEK[])
DEBUG[imap]:   39:55.85 < PMOM11 OK FETCH completed.
---

So in order to reproduce the bug, I'd try the following:
- sync with offlineimap
- delete a message on the client (so offlineimap will call expunge later)
- create a new (!) message on the server
- mark the new message for deletion on the server
- sync with offlineimap

Since above log suggests that offlineimap tries to retrieve a message that was 
deleted
during expunge, since it was already marked as "delete".

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.26-1-686

Debian Release: lenny/sid
  500 unstable        www.debian-multimedia.org 
  500 unstable        ftp.de.debian.org 
    1 experimental    ftp.de.debian.org 

--- Package information. ---
Depends             (Version) | Installed
=============================-+-===========
python               (>= 2.3) | 2.5.2-2
python-support     (>= 0.7.1) | 0.8.6





--- End Message ---
--- Begin Message ---
Version: 6.5.3.1-1

This bug-fix has now landed in a Debian upload.

-- 
Regards,
Dmitrijs.

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to