"Invalid internal date"

Sebastian Spaeth Sebastian at sspaeth.de
Mon Aug 15 09:12:02 BST 2011


On Sun, 14 Aug 2011 16:59:44 +0200, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
> > error: APPEND command error: BAD ['Invalid internal date.']. Data: JEPB71 APPEND "[Gmail].All Mail" (\Seen) "09-Sep-2007 -6:33:06 -0500" {3721}\r\n

> > That date looks very much bogus to me. However, I have no idea where
> > that date is coming from, it's probably part of the email headers of
> > that message.
> 
> Why the fuck are we stopping the mail fetch on such error? Can't we
> fetch the mail if one header date looks wrong?

That is a good question. We were checking the return value of
imapobj.append(...) and if that was not "OK", we would throw an
OfflineImapError at MESSAGE level. However, I just checked the source of
imaplib2 and if it receives a "BAD" reply, it will throw an exception
itself, so the append() call raises the exception and we never get an
response that we can check.

I will whip up a patch to improve our behavior there. (note that this
code never checked for errors before either, so we have not gotten worse :-))

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20110815/89122e37/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list