Go to the previous section

Checking the rules out

The filter program has a convenient way of check out the rules you have written. Simply invoke it with the -r (rules) option: % filter -r Rule 1: if (from = "!uucp") then Delete Rule 2: if (to = "postmaster") then Save /tmp/postmaster-mail.3 Rule 3: if (to = "culture" and lines > 20) then Save ~/Mail/culture Rule 4: if (subject = "filter test") then Forward hpldat!test Rule 5: if (subject="elm") then Copy and Save ~/Mail/elm-incoming Rule 6: if (subject="display-to-console") then Execute "cat - > /dev/console"

There are a few things to notice - first off, these are the parsed and rebuilt rules, so we see them all in a consistent format. Also, notice on the filename for rule 2 that filter has correctly expanded the %d macro to be the day of the week (in this case, Wednesday, denoted by the digit '3').

It is highly recommended that you always check your ruleset before actually using it to filter your mail!

Go to the next section