[imp] Re: filtering on new/recent IMAP messages
Michael M Slusarz
slusarz at mail.curecanti.org
Tue Apr 19 09:19:05 PDT 2005
Quoting liam hoekenga <liamr at umich.edu>:
>
>>> I'm trying to set up a filter (ingo) which will get applied whenever
>>> I log in. This filter looks for an user-defined X-DSPAM-Result header
>>> and moves a message to the Spam folder.
>>>
>>> The filter works as specified but has one undesireable property:
>>>
>>> If I move a message from the Spam folder to the Inbox (due to false
>>> positive spam detection), the filter will move it back to Spam the next
>>> time I log in.
>>>
>>> A little research into IMAP flags yielded a possible fix: the RECENT
>>> and NEW flags seem to tell an IMAP client that the message is new or
>>> has not been previously received. Some php code allowed me to add the
>>> flags to the pull down of standard headers and a little integration
>>> with ingo sets the appropriate fields in the IMAP search object.
>>> Unfortunately, this doesn't seem to have any effect. Could IMP be
>>> caching the IMAP flags; or (more likely) I am doing something wrong.
>
> What Ingo backend are you using?
>
> Sieve and Procmail only run during delivery. But, for the IMAP backend,
> anything in your INBOX is fair game for filtering - filters can get applied
> everytime you access the inbox / hit the "run filters" icon / etc
> (depending on
> how IMP is configured).
>
> This the behavior you've described sounds like you're using the IMAP backend.
And to finish Liam's point, there is nothing we can do about this
behavior. sieve/procmail are "run once" filters, triggered only when a
message is delivered to a user's INBOX. The 'imap' driver is somewhat
of a hack to mimic the behavior of sieve/procmail - however, run once
just happens to be one of the behaviors of sieve/procmail that the imap
filter just can not accurately replicate.
michael
_______________________________________
Michael Slusarz [slusarz at curecanti.org]
More information about the imp
mailing list