Complete.Org: Mailing Lists: Archives: offlineimap: June 2009:
Sync only last x days of messages - test version IMAP-IMAP completed
Home

Sync only last x days of messages - test version IMAP-IMAP completed

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Cc: team@xxxxxxxxxxxxxxxxx
Subject: Sync only last x days of messages - test version IMAP-IMAP completed
From: Mike Dawson <mike@xxxxxxxxxxxxxxxxx>
Date: Tue, 16 Jun 2009 14:08:40 +0430

Dear All,
I have made modifications to offlineimap to support only synchronising 
the last x days of mail (e.g. last 3 days of mail).  I think this makes 
it much more practical to get up and started.  Here in Afghanistan we 
have some very slow links which makes even using offlineimap to download 
an entire mailbox impossible.

Simply add maxage = X where X is the number in days to the account 
section of configuration. Then when offlineimap asks for the lists of 
messages it will do so by doing an IMAP server side search for messages 
after the minimum date, minimizing network traffic.

This is in testing now, but seems to be more or less working (using IMAP 
to IMAP Cyrus).  I haven't written this yet for Maildir - this should be 
pretty trivial.

I am going to change this slightly to support limiting the size of 
messages to be sync'd - to avoid sending large attachments down a slow 
line.  This would only be a matter of another option in the accounts 
section and then adjusting the imap search that is performed.

One small challenge I am facing is to avoid creation of duplicate 
messages in the event that somehow the user changes the maxage ...

I was thinking to do a duplicate check - if the subject, size and date 
are exactly the same on both sides then it shouldn't be copied again, or 
possibly leaving this to an option in the config file.

I was also wondering if anyone has any opinions about the structure of 
error handling - an error on one account seems to kill off the entire 
process.  E.g. One IMAP server denies permission to create a certain 
mailbox.  This then crashes the whole process.  Any opinions on this 
would be much appreciated.

I guess when this is closer to done it should go in through GIT?

Regards,

-Mike



-- Binary/unsupported file stripped by Ecartis --
-- Type: application/x-gzip
-- File: offlineimap-wdatemod.tar.gz




[Prev in Thread] Current Thread [Next in Thread]