[imapfilter-devel]Filter rules are not applied in the given order (0.8.6)

Lefteris Chatzibarbas lefcha at hellug.gr
Sat Mar 29 18:11:04 EET 2003


On Sat, Mar 29, 2003 at 12:38:58PM +0100, Frank Schroeder wrote:
> All,
> 
> I'm getting a lot of mails on internal mailing lists and people usually 
> crosspost to several mailing lists. So I want to put a copy of a message 
> into a mailing list specific folder.
> 
> As a "catch all" rule I want to move all messages which don't have my 
> own address in the TO or CC header out of my INBOX.
> 
> This requires that the filter rules are applied in the same order as 
> they are in the imapfilterrc file but that doesn't seem to be the case.
>
> I can see that my catch all rule is applied before other rules although 
> it is the last one in the file.

When you run imapfilter it reports that "X messages moved to mailbox M" and
then "Y copied to mailbox N" (applying first "not-for-me" and then "name")
or you do you find out, afterwards, that messages are in the wrong mailbox.

> 
> I've tried 0.8.4 and 0.8.6.
> 
> I've defined my rules like this
> 
> filter name
> 	...
> action copy ....
> job 	name	inbox
> ...
> ...
> filter not-for-me
> 	not to ..
> 	not cc ..
> action move
> job	not-for-me	inbox
> 
> Is this the intendend behaviour? Am I missing something.

No, it should run filters in the order specified by the "job" command:

  job f1,f2 inbox

and

  job f1 inbox
  job f2 inbox

... should apply first f1 and then f2 in mailbox inbox.


Can you recompile and run imapfilter with DEBUG enabled [0]? Send relevant
parts of the output [1] (don't forget to remove passwords, etc.).


[0] ./config -o debug=yes
[1] eg. ./imapfilter > LOG 2>&1



More information about the Imapfilter-devel mailing list