Complete.Org: Mailing Lists: Archives: offlineimap: August 2002:
Re: OfflineIMAP gives DELETE warnings for filtered-out folders.
Home

Re: OfflineIMAP gives DELETE warnings for filtered-out folders.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jeff Squyres <jsquyres@xxxxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: OfflineIMAP gives DELETE warnings for filtered-out folders.
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Tue, 13 Aug 2002 22:34:08 -0500

On Tue, Aug 13, 2002 at 07:34:14PM -0500, Jeff Squyres wrote:


> Hear hear -- (btw, thanks for all the great work on offlineimap!). 

Thanks :-)

> Additionally, I have a *large* number of folders (400+ -- spread across a
> directory tree structure, so there's actually a good number of
> directories, each containing a fairly small number of mail folders).  
> Would there be any way to have an explicit list of folders rather than
> have offlineimap try to scan for all available folders every time?  This

The scan for available folders should happen virtually instantaneously, even
with that many.  Figure about 30 characters per folder, that's 12K in
result, which should take 3 seconds to transfer even over a 56K dialup.

Probably the larger problem is downloading the list of messages in each
folder.  You could confirm this by running with
-1 -o -u Noninteractive.Basic and noting which areas require the longest
time.

I'd like to propose a solution for both you and MJ to test.  I haven't tried
this before, so if it doesn't work feel free to file a bug report, but try
this idea:

The folderfilter config file option is a Python function.  Why not make it
automatically exclude the big folders most of the time and include them
periodically?  Combined with tv's recent patch, it's more practical to use
larger Python code.

For instance, maybe you'd only want those folders included between 3 and 7
am.

Consider this example:

in offlineimaprc:

pythonfile = ~/.offlineimap.py

folderfilter = myfolderfilter

in ~/.offlineimap.py:

import time
def myfolderfilter(foldername):
    hour = time.localtime()[3]
    if hour < 3 or hour > 6:
        return 1
    if not foldername.startswith('Archive/'):
        return 1
    return 0

-- John

-- 
John Goerzen <jgoerzen@xxxxxxxxxxxx>    GPG: 0x8A1D9A1F    www.complete.org


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