/* Example: "combined-discards" This example does the same thing as "discards," but using a single test clause. This illustrates how tests can be combined using a more complex test statement. Note that this is not necessarily more readable-- sometimes it's better to keep seperate tests in separate statements for easier reading and understanding. However, often it IS more readable to combine similar test elements in a single test statement, while separating dissimilar tests into separate statements. */ sieve { /* Open the sieve block */ /* A single test statement combining all the discards from Example 1. */ if anyof ( header :matches "subject" "*mak*money*fast*", address :is "From" "big@boss.com", allof ( address :domain :is "From" "example.com", not address :all :is "From" "fred@example.com" ) ) { discard; } /* Let "implicit keep" deal with mail not otherwise filtered. */ }