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: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Cc: Jeff Squyres <jsquyres@xxxxxxxxxx>, offlineimap@xxxxxxxxxxxx
Subject: Re: OfflineIMAP gives DELETE warnings for filtered-out folders.
From: Martijn Pieters <mj@xxxxxxxx>
Date: Wed, 14 Aug 2002 10:35:08 -0400

On Tue, Aug 13, 2002 at 10:34:08PM -0500, John Goerzen wrote:
> 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

This accomplishes the same thing I already have in a more roundabout way,
and has the same problem where OfflineIMAP gives me spurious warnings about
wanting to delete folders between 6 and 3 (most of the day).

-- 
Martijn Pieters
| Software Engineer  mailto:mj@xxxxxxxx
| Zope Corporation   http://www.zope.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------


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