Re: What would you like in a filter?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, Jul 25, 2002 at 09:00:53AM -0500, John Goerzen wrote:
> Here are some design considerations to think of:
>
> * Regarding making decisions about whether or not to download messages:
> Currently, OfflineIMAP gets only the UID and flags for each message
> in order to decide whether or not to download it. This is almost
> certainly insufficient for any filter. Yet getting more information
> will add, sometimes substantially, to the bandwidth and resource
> requirements for folder scanning. With things like Spamassassin,
> you could even go so far as downloading every message in order to
> decide whether to download it :-) Messages can have long headers
> these days, and downloading headers for each message may not make
> sense either.
I am not sure if filters should be allowed to modify messages. The
spamassassin use case I was describing before would change messages locally,
not so much filter as flag mesages.
Rejecting messages from being downloaded is of course way cool, and and
interesting usecase in and of itself.
As for how this works: OfflineIMAP will download a full message anyway, once
it decides that it needs downloading. Filtering only makes sense for these
messages. So I don't see a performance hit there. Filtering can happen in a
seperate thread, with messages queued up to be filtered. For spamassassin
you need more than the headers anyway.
> * What do we do once a message has been rejected? Do we continue trying to
> download it on each sync? Maintain a cache somewhere? Just delete
> it outright from the server?
I'd say cache the UID as rejected by a filter. Optionally add a tool to
clear the filter flags.
> * How exactly should filtering rules be specified in the config file?
lambdas? :) "import myfilter; myfilter.dofilter" should work, maybe?
--
Martijn Pieters
| Software Engineer mailto:mj@xxxxxxxx
| Zope Corporation http://www.zope.com/
| Creators of Zope http://www.zope.org/
---------------------------------------------
|
|