[imapfilter-devel] Filter groupings

Lefteris Chatzibarbas lefcha at hellug.gr
Fri Apr 2 17:25:59 EEST 2004


On Thu, Apr 01, 2004 at 08:25:54PM -0600, Ryan Hayle wrote:
> I'm trying to get the equivalent of:
> if new and (from or header or to)
> using:
> 
> filter ryan
>   new
>   from xx
>   or header received xx
>   or to xx
> action move Spam
> 
> This doesn't seem to work, however.  The command it runs is:
> 
> C: 1005 SEARCH ALL NEW OR (FROM "xx") OR (HEADER "received" "xx") (TO "xx")
> 
> Which I would guess implies:
> if (new or from or header) and to

No, this has already been covered previously.  IMAP servers understand prefix
notation:

 OR ( .. ) ( .. )

... not:

  ( .. ) OR ( .. )

Imapfilter converts the infix notation (what you wrote) to prefix (what gets
sent).

> 
> What is the proper way to do this?  Is the new mask even necessary?  I 
> figured it would be faster, since I don't need to filter all ~800 emails 
> in my inbox, but merely those which are unread.

Yes, this is more resources friendly for the server and overall faster.

> 
> Also, with all the pseudocode examples used to explain your syntax, why 
> not actually USE the pseudocode?  I think if/then/else statements are 
> pretty simple for most people to understand, but at the very lease allow 
> parentheses or brackets in the config file to be more clear.  Just a 
> suggestion...

The format of the configuration changes quite soon.  I think that is much
simpler than the existing one (yet the program gets much more powerful).  I
already did the coding, I am currently doing testing and ironing of the bugs.

> 
> Thanks,
> Ryan
> 
> Please CC me.
> 

> _______________________________________________
> Imapfilter-devel mailing list
> Imapfilter-devel at lists.hellug.gr
> http://lists.hellug.gr/mailman/listinfo/imapfilter-devel




More information about the Imapfilter-devel mailing list