<DKIM> maxage causes loss of local email

Janna Martl janna.martl109 at gmail.com
Thu Mar 5 19:58:55 GMT 2015

On Thu, Mar 05, 2015 at 10:16:26AM +0100, Nicolas Sebrecht wrote:
>On Thu, Mar 05, 2015 at 01:54:11AM -0500, Janna Martl wrote:
>> times seem to be gotten by parsing messagestr, but my messagestr's
>> look like (UID 45437 FLAGS ()) and don't contain anything resembling a
>> date.
>Ok. So, could you provide a sample of what you get at this point?

I'm using gmail, and this is actually documented in folders/Gmail.py,
where there is a comment in cachemessagelist() that the messagestr
"looks like: '1 (FLAGS (\\Seen Old) X-GM-LABELS (\\Inbox \\Favorites)
UID 4807)' or None if no msg". That's if synclabels = True. Otherwise,
as I said, it looks like 'UID 45437 FLAGS ()'. Is there other
information you wanted?

Given that, I'm confused by this
    rtime = imaplibutil.Internaldate2epoch(messagestr)
in that function: Internaldate2epoch() tries to parse the messagestr
for things that look like dates.

>So, we also have to understand why this rtime get ignored.

I think this whole business about rtime is a distraction from the
original problem I brought up, namely

>>             But if offlineimap is run again later, it uses
>> _scanfolder() to reconstruct the local messagelist, and the only
>> maxage-related exclusion is done via _iswithinmaxage(), which only
>> looks at filenames.

and the fact that filenames are set using

    def new_message_filename(self, uid, flags=set()):    ...

which doesn't have anything to do with rtime. That's why I proposed
changing this function to take rtime into account too.

-- J.M.

More information about the OfflineIMAP-project mailing list