docker-offlineimap/offlineimap
Mike Dawson cde94e5047 Patch for maxage and maxsize options
Dear All,
Attached is the patch that I have developed to provide maxage and
maxsize options.  You can thus sync only the last x days of messages and
exclude large messages.  All details in the attached git file.

Regards,

-Mike

-- Attached file included as plaintext by Ecartis --
-- File: submit

From 04fead2b46a79675a5b29de6f2b4088b9c9448e5 Mon Sep 17 00:00:00 2001
From: mike <mike@mikelaptop.(none)>
Date: Sun, 16 Aug 2009 17:00:49 +0430
Subject: [PATCH] Patch to provide maxage and maxsize account options to exclude old/large messages

This is designed to make offlineimap even better for low bandwidth connections.

maxage allows you to specify a number of days and only messages within
that range will be considered by offlineimap for the sync.  This can be
useful if you would like to start using offlineimap with a large
existing account and do not want to import large archives of mail.

maxsize allows you to specify the maximum size of a message to consider so
that you can exclude messages with large attachments etc.

In both cases the cachemessagelist function of the folder was modified to ignore
messages that do not meet the criteria.  If the criteria are not specified
then the existing code will be executed the same as before.  If a message
does not meet the criteria it will be as though this message does not exist
- offlineimap will completely ignore it.  It will not have flags updated,
it will not be deleted, it will not be considered at all.

When operating against an IMAP repository a server side search function
is used.  This of course requires support for server side search.

I have tested this with either option, no options etc. against IMAP, Maildir
and Gmail.  I have run variations of this patch here for the last 3 weeks or
so syncing about 4 accounts normally.
2009-08-16 09:27:49 -05:00
..
folder Patch for maxage and maxsize options 2009-08-16 09:27:49 -05:00
repository Allow keepalive to be overridden by user if imapfolders is set 2009-02-10 15:57:03 +11:00
ui Patch for signal handling to start a sync by Jim Pryor 2008-12-01 16:13:16 -06:00
__init__.py Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00
accounts.py Patch for maxage and maxsize options 2009-08-16 09:27:49 -05:00
CustomConfig.py Update FSF address 2006-08-12 05:15:55 +01:00
imaplib2.py use latest version of imaplib2 2009-07-12 08:52:29 -05:00
imaplibutil.py Added patch for Python 2.6 ssl 2009-07-01 20:49:20 -05:00
imapserver.py set gssapi to false on kerberos error 2009-06-29 00:05:00 -05:00
imaputil.py Update FSF address 2006-08-12 05:15:55 +01:00
init.py Bug#502779: Sync accounts in order of general.accounts option 2009-05-05 15:16:25 -05:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py Update FSF address 2006-08-12 05:15:55 +01:00
syncmaster.py Implementation of IMAP IDLE 2009-02-10 11:27:48 +11:00
threadutil.py Patch to make exit on Ctrl-C cleaner 2008-12-01 16:10:49 -06:00
version.py Prepping 6.1.2 2009-07-16 00:03:23 -05:00