Exception when copying message from local store to IMAP
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi everyone,
I have seen several times now exceptions in the method
folder.IMAP.savemessage_searchforheader. It looks to me as if
offlineimap tries to get a message UID for a message locally stored,
but not any longer on the IMAP server. It normally works if I delete
the messages manually from my maildir, but as I have seen this error
now a couple of times I think it would be better to get it fixed rather
than doing things manually all the time.
I tried to debug it by myself, but currently I unterstand not enough of
the source-code and especially threading to do a decent debugging.
I have attached a file with the exception in it and the last
debug-messages. Offlineimap ran with the option -d imap, but I cut out
most of the imap stuff, so only relevant parts are to be seen.
Perhaps somebody can assist me in debugging this error, I leave my
IMAP-folder in the state it currently is, so the error is reproducible.
Ah, one more note: The IMAP server is a Lotus Notes/Domino IMAP server
(yes, yes, I know, there are better ones, but this is my only chance to
read my eMails with a decent MUA, and not having to use the quite
annoying Notes application (and I don't have to use windows every time I
want to read my mails ;)) ) ).
I hope someone has a clue where to look and how to debug.
CU all,
Jens
--
GPG: 1024D/CF884D50 F2E8 F7FC F823 6464 4E9D EFAB 6EE9 8B9C CF88 4D50
------------------------------------------------------------------------
Jens Hoffrichter / joho@xxxxxxxxxxxx / Joho@IRC / Fon: 0172/5376989
Die Zukunft hat viele Namen. Für die Schwachen ist sie das
Unerreichbare. Für die Furchtsamen ist sie das Unbekannte. Für
die Tapferen ist sie die Chance. (Victor Hugo)
-- Attached file included as plaintext by Ecartis --
OfflineIMAP 3.99.17 (Rev 475)
Copyright (C) 2002, 2003 John Goerzen <jgoerzen@xxxxxxxxxxxx>
This software comes with ABSOLUTELY NO WARRANTY; see the file
COPYING for details. This is free software, and you are welcome
to distribute it under the conditions laid out in COPYING.
Now debugging for imap: IMAP protocol debugging
***** Processing account Starmobility
Copying folder structure from IMAP to Maildir
Establishing connection to domino:143.
DEBUG[imap]: 37:55.76 imaplib version 2.52
DEBUG[imap]: 37:55.76 new IMAP4 connection, tag=BKKA
DEBUG[imap]: 37:55.76 < * OK Domino IMAP4 Server Release 6.0.1CF1 ready Mon,
2 Jun 2003 16:35:55 +0200
DEBUG[imap]: 37:55.76 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?'
=> ('OK', ' Domino IMAP4 Server Release 6.0.1CF1 ready Mon, 2 Jun 2003 16:35:55
+0200', 'Domino IMAP4 Server Release 6.0.1CF1 ready Mon, 2 Jun 2003 16:35:55
+0200')
DEBUG[imap]: 37:55.76 untagged_responses[OK] 0 += ["Domino IMAP4 Server
Release 6.0.1CF1 ready Mon, 2 Jun 2003 16:35:55 +0200"]
DEBUG[imap]: 37:55.76 > BKKA0 CAPABILITY
DEBUG[imap]: 37:55.76 < * CAPABILITY IMAP4rev1 AUTH=PLAIN LITERAL+ NAMESPACE
QUOTA UIDPLUS
DEBUG[imap]: 37:55.76 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?'
=> ('CAPABILITY', ' IMAP4rev1 AUTH=PLAIN LITERAL+ NAMESPACE QUOTA UIDPLUS',
'IMAP4rev1 AUTH=PLAIN LITERAL+ NAMESPACE QUOTA UIDPLUS')
DEBUG[imap]: 37:55.76 untagged_responses[CAPABILITY] 0 += ["IMAP4rev1
AUTH=PLAIN LITERAL+ NAMESPACE QUOTA UIDPLUS"]
DEBUG[imap]: 37:55.76 < BKKA0 OK CAPABILITY completed
DEBUG[imap]: 37:55.76 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA0', 'OK', 'CAPABILITY completed')
DEBUG[imap]: 37:55.76 CAPABILITIES: ('IMAP4REV1', 'AUTH=PLAIN', 'LITERAL+',
'NAMESPACE', 'QUOTA', 'UIDPLUS')
DEBUG[imap]: Attempting plain authentication
DEBUG[imap]: 37:55.76 > BKKA1 LOGIN jh "xxxxx"
DEBUG[imap]: 37:55.81 < BKKA1 OK LOGIN completed
DEBUG[imap]: 37:55.81 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA1', 'OK', 'LOGIN completed')
DEBUG[imap]: 37:55.81 > BKKA2 LIST "" ""
DEBUG[imap]: 37:55.81 < * LIST (\Noselect) "\\" ""
DEBUG[imap]: 37:55.81 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?'
=> ('LIST', ' (\\Noselect) "\\\\" ""', '(\\Noselect) "\\\\" ""')
DEBUG[imap]: 37:55.81 untagged_responses[LIST] 0 += ["(\Noselect) "\\" """]
DEBUG[imap]: 37:55.81 < BKKA2 OK LIST completed
DEBUG[imap]: 37:55.81 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA2', 'OK', 'LIST completed')
DEBUG[imap]: 37:55.81 untagged_responses[LIST] => ['(\\Noselect) "\\\\" ""']
DEBUG[imap]: imapsplit() called with input: (\Noselect) "\\" ""
DEBUG[imap]: imapsplit() returning: ['(\\Noselect)', '"\\\\"', '""']
DEBUG[imap]: dequote() called with input: "\\"
DEBUG[imap]: dequote() returning: \
DEBUG[imap]: dequote() called with input: ""
DEBUG[imap]: dequote() returning:
[ .... removed a lot of imap searching stuff .... ]
DEBUG[imap]: savemessage: first attempt to get new UID
DEBUG[imap]: savemessage_searchforheader called for
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115
DEBUG[imap]: 38:08.50 > BKKA15 UID SEARCH (HEADER
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e "1054564688-0060421530115")
DEBUG[imap]: 38:08.85 < * SEARCH
DEBUG[imap]: 38:08.85 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?'
=> ('SEARCH', None, None)
DEBUG[imap]: 38:08.85 untagged_responses[SEARCH] 0 += [""]
DEBUG[imap]: 38:08.85 < BKKA15 OK SEARCH completed
DEBUG[imap]: 38:08.85 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA15', 'OK', 'SEARCH completed')
DEBUG[imap]: 38:08.85 untagged_responses[SEARCH] => ['']
DEBUG[imap]: savemessage_searchforheader got initial matchinguids: ''
DEBUG[imap]: savemessage_searchforheader: matchinguids now ['']
DEBUG[imap]: savemessage: first attempt to get new UID failed. Going to run a
NOOP and try again.
DEBUG[imap]: 38:08.85 untagged responses dump:
EXISTS: "234" "235"
PERMANENTFLAGS: "(\Flagged \Seen \Answered \Deleted \Draft \*)"
READ-WRITE: ""
UIDNEXT: "862"
FLAGS: "(\Flagged \Seen \Answered \Deleted \Draft)"
UNSEEN: "224"
APPENDUID: "16 862"
UIDVALIDITY: "16"
RECENT: "0" "0"
DEBUG[imap]: 38:08.85 > BKKA16 NOOP
DEBUG[imap]: 38:08.85 < BKKA16 OK NOOP completed
DEBUG[imap]: 38:08.85 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA16', 'OK', 'NOOP completed')
DEBUG[imap]: savemessage_searchforheader called for
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115
DEBUG[imap]: 38:08.86 > BKKA17 UID SEARCH (HEADER
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e "1054564688-0060421530115")
DEBUG[imap]: 38:08.98 < * SEARCH
DEBUG[imap]: 38:08.98 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?'
=> ('SEARCH', None, None)
DEBUG[imap]: 38:08.98 untagged_responses[SEARCH] 0 += [""]
DEBUG[imap]: 38:08.98 < BKKA17 OK SEARCH completed
DEBUG[imap]: 38:08.98 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA17', 'OK', 'SEARCH completed')
DEBUG[imap]: 38:08.98 untagged_responses[SEARCH] => ['']
DEBUG[imap]: savemessage_searchforheader got initial matchinguids: ''
DEBUG[imap]: savemessage_searchforheader: matchinguids now ['']
Copy message -12 Maildir[admin] -> IMAP[admin], LocalStatus[admin]
DEBUG[imap]: savemessage: called
Thread 'New msg sync from admin' terminated with exception:
Traceback (most recent call last):
File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 153,
in run
Thread.run(self)
File "/usr/lib/python2.2/threading.py", line 396, in run
apply(self.__target, self.__args, self.__kwargs)
File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 207,
in syncmessagesto_neguid_msg
successuid = tryappend.savemessage(uid, message, flags)
File "/usr/lib/python2.2/site-packages/offlineimap/folder/IMAP.py", line 227,
in savemessage
headervalue)
File "/usr/lib/python2.2/site-packages/offlineimap/folder/IMAP.py", line 163,
in savemessage_searchforheader
return long(matchinguids[0])
ValueError: invalid literal for long():
Last 50 debug messages logged for New msg sync from admin prior to exception:
imap: savemessage_addheader: called to add
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115
imap: savemessage_addheader: insertionpoint = 18
imap: savemessage_addheader: leader = 'Subject: DB2 Frage'
imap: savemessage_addheader: newline =
'\r\nX-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115'
imap: savemessage_addheader: trailer = '\r\nTo:
Jens_Hoffrichter/Starmobility_GmbH@xxxxxxxxxxxxxxxx\r\nX-Mailer: Lotus Notes
Release 6.0.1 February 07, 2003\r\nMessage-ID:
<OFB14B42FD.F27753BE-ONC1256CF3.006DDC41-C1256CF3.006DEFF8@xxxxxxxxxxxxxxxx>\r\nFrom:
alexander.notz@xxxxxxxxxxxxxxxx\r\nDate: Mon, 24 Mar 2003 21:00:47
+0100\r\nX-MIMETrack: Serialize by IMAP Server on domino/Starmobility
GmbH(Release 6.0.1CF1|March\r\n 04, 2003) at 29.04.2003
10:55:02\r\nMIME-Version: 1.0\r\nContent-type: text/plain;
charset=US-ASCII\r\nContent-Length:
417\r\n\r\n\r\n\r\n\r\n\r\nHi,\r\n\r\nkennst Du folgende
Fehlermeldung:\r\n\r\nState transition not allowed on table space.
SQLSTATE=55039\r\n\r\nKannst Du mir sagen, was man da machen
muss?\r\n\r\nalex\r\n\r\n\r\n--\r\nStarMobility GmbH\r\nGutenbergstrasse
19\r\nD-70771 Leinfelden-Echterdingen\r\nphone +49 (711) 34181-207\r\nfax
+49 (711) 34181-181\r\ne-mail
alexander.notz@xxxxxxxxxxxxxxxx\r\n\r\nMercedes-Benz Portal. In Zusammenarbeit
mit T-Online.\r\nwww.mercedes-benz.t-online.de\r\n\r\n'
imap: savemessage: new content is: 'Subject: DB2
Frage\r\nX-OfflineIMAP-297478930-446f6d696e6f-61646d696e:
1054564688-0060421530115\r\nTo:
Jens_Hoffrichter/Starmobility_GmbH@xxxxxxxxxxxxxxxx\r\nX-Mailer: Lotus Notes
Release 6.0.1 February 07, 2003\r\nMessage-ID:
<OFB14B42FD.F27753BE-ONC1256CF3.006DDC41-C1256CF3.006DEFF8@xxxxxxxxxxxxxxxx>\r\nFrom:
alexander.notz@xxxxxxxxxxxxxxxx\r\nDate: Mon, 24 Mar 2003 21:00:47
+0100\r\nX-MIMETrack: Serialize by IMAP Server on domino/Starmobility
GmbH(Release 6.0.1CF1|March\r\n 04, 2003) at 29.04.2003
10:55:02\r\nMIME-Version: 1.0\r\nContent-type: text/plain;
charset=US-ASCII\r\nContent-Length:
417\r\n\r\n\r\n\r\n\r\n\r\nHi,\r\n\r\nkennst Du folgende
Fehlermeldung:\r\n\r\nState transition not allowed on table space.
SQLSTATE=55039\r\n\r\nKannst Du mir sagen, was man da machen
muss?\r\n\r\nalex\r\n\r\n\r\n--\r\nStarMobility GmbH\r\nGutenbergstrasse
19\r\nD-70771 Leinfelden-Echterdingen\r\nphone +49 (711) 34181-207\r\nfax
+49 (711) 34181-181\r\ne-mail
alexander.notz@xxxxxxxxxxxxxxxx\r\n\r\nMercedes-Benz Portal. In Zusammenarbeit
mit T-Online.\r\nwww.mercedes-benz.t-online.de\r\n\r\n'
imap: savemessage: new content length is 1029
imap: 38:08.35 > BKKA13 APPEND admin (\Seen) "24-Mar-2003 21:00:47 +0100"
{1029}
imap: 38:08.35 < + go ahead
imap: 38:08.35 matched r'\+( (?P<data>.*))?' => (' go ahead', 'go
ahead')
imap: 38:08.35 write literal size 1029
imap: 38:08.49 < * 235 EXISTS
imap: 38:08.49 matched r'\* (?P<data>\d+) (?P<type>[A-Z-]+)(
(?P<data2>.*))?' => ('235', 'EXISTS', None, None)
imap: 38:08.49 untagged_responses[EXISTS] 1 += ["235"]
imap: 38:08.49 < * 0 RECENT
imap: 38:08.50 matched r'\* (?P<data>\d+) (?P<type>[A-Z-]+)(
(?P<data2>.*))?' => ('0', 'RECENT', None, None)
imap: 38:08.50 untagged_responses[RECENT] 1 += ["0"]
imap: 38:08.50 < BKKA13 OK [APPENDUID 16 862] APPEND completed
imap: 38:08.50 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA13', 'OK', '[APPENDUID 16 862] APPEND completed')
imap: 38:08.50 matched r'\[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]' =>
('APPENDUID', ' 16 862', '16 862')
imap: 38:08.50 untagged_responses[APPENDUID] 0 += ["16 862"]
imap: 38:08.50 > BKKA14 CHECK
imap: 38:08.50 < BKKA14 OK CHECK completed
imap: 38:08.50 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA14', 'OK', 'CHECK completed')
imap: savemessage: first attempt to get new UID
imap: savemessage_searchforheader called for
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115
imap: 38:08.50 > BKKA15 UID SEARCH (HEADER
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e "1054564688-0060421530115")
imap: 38:08.85 < * SEARCH
imap: 38:08.85 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?' =>
('SEARCH', None, None)
imap: 38:08.85 untagged_responses[SEARCH] 0 += [""]
imap: 38:08.85 < BKKA15 OK SEARCH completed
imap: 38:08.85 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA15', 'OK', 'SEARCH completed')
imap: 38:08.85 untagged_responses[SEARCH] => ['']
imap: savemessage_searchforheader got initial matchinguids: ''
imap: savemessage_searchforheader: matchinguids now ['']
imap: savemessage: first attempt to get new UID failed. Going to run a NOOP
and try again.
imap: 38:08.85 untagged responses dump:
EXISTS: "234" "235"
PERMANENTFLAGS: "(\Flagged \Seen \Answered \Deleted \Draft \*)"
READ-WRITE: ""
UIDNEXT: "862"
FLAGS: "(\Flagged \Seen \Answered \Deleted \Draft)"
UNSEEN: "224"
APPENDUID: "16 862"
UIDVALIDITY: "16"
RECENT: "0" "0"
imap: 38:08.85 > BKKA16 NOOP
imap: 38:08.85 < BKKA16 OK NOOP completed
imap: 38:08.85 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA16', 'OK', 'NOOP completed')
imap: savemessage_searchforheader called for
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e: 1054564688-0060421530115
imap: 38:08.86 > BKKA17 UID SEARCH (HEADER
X-OfflineIMAP-297478930-446f6d696e6f-61646d696e "1054564688-0060421530115")
imap: 38:08.98 < * SEARCH
imap: 38:08.98 matched r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?' =>
('SEARCH', None, None)
imap: 38:08.98 untagged_responses[SEARCH] 0 += [""]
imap: 38:08.98 < BKKA17 OK SEARCH completed
imap: 38:08.98 matched r'(?P<tag>BKKA\d+) (?P<type>[A-Z]+)
(?P<data>.*)' => ('BKKA17', 'OK', 'SEARCH completed')
imap: 38:08.98 untagged_responses[SEARCH] => ['']
imap: savemessage_searchforheader got initial matchinguids: ''
imap: savemessage_searchforheader: matchinguids now ['']
- Exception when copying message from local store to IMAP,
Jens Hoffrichter <=
|
|