Evolution supports a vFolder (Virtual Folder). Basically a vFolder is a query that is ran against your real folders to select messages.
It's useful. What I do now, is have my mail broken up into a number of folders. Each mailing list gets its own folder. Mail from the CS department gets a folder, etc.
Now, I can create a vFolder Inbox that can search those folders for new mail. I can construct even more complicated queries. But here's the problem: with Evolutions GUI you cannot currently construct complicated boolean expressions. Either just a group of expressions combined with AND or combined with OR, but not nested (AND (OR ...) (OR ...) (AND ...))
Evolution does support a generalized S-Expr definition of rules. It's undocumented and I've finally figured it out.
Here is an example:
# new mail only
(match-all (and (not (system-flag "seen")) ))
# New Mail as long as it's not in one of these mailing lists
(match-all (not (or (system-flag "seen") (header-contains "x-camel-mlist" "condor" "shib-users" "nmi-developer") )))
# New Mail, not in these mailing lists nor with this subject
(match-all (not (or (system-flag "seen") (header-contains "x-camel-mlist" "condor" "shib-users" "nmi-developer") (header-contains "subject" "globus-discuss") )))
# New Mail, not in these mailing lists nor with this subject OR any Important mail
(match-all (or (not (or (system-flag "seen") (header-contains "x-camel-mlist" "condor" "shib-users" "nmi-developer") (header-contains "subject" "globus-discuss") )) (system-flag "flagged") ))
# New Mail, not in these mailing lists nor with this subject OR any Important mail OR New Mail that mentions my name in it, regardless of mailing list (I use a custom procmail rule for the tagging)
(match-all (or (not (or (system-flag "seen") (header-contains "x-camel-mlist" "condor" "shib-users" "nmi-developer") (header-contains "subject" "globus-discuss") )) (system-flag "flagged") (and (not (system-flag "seen")) (header-exists "x-zach") ) ))
# Any Grid related email, except those to discuss@globus.org but including those to discuss@globus.org that are related to SimpleCA
(match-all (or (and (body-contains "grid" "globus") (not (or (header-contains "cc" "discuss@globus.org") (header-contains "To" "discuss@globus.org"))) ) (body-contains "simple-ca" "simple ca")))
References:
evolution/filter/filtertypes.xml
evolution/camel/camel-filter-search.c

