Go to the previous section
The filter program can keep a log of all actions performed,
including what rules it matched against, in your .elm directory in
a file called .elm/filterlog. You can either directly
operate on this file, or, much more recommended, you can use one of the two
summarization options to filter and let it do the work
for you!
The difference between the two is best demonstrated by example:
% filter -s
Summary of Filter Activity
--------------------------
A total of 418 messages were filtered:
The default rule of putting mail into your mailbox
applied 364 times (87%)
Rule #1: (delete message)
applied 1 time (0%)
Rule #2: (save in "~/Filtered-Mail/netnews.12")
applied 8 times (2%)
Rule #3: (save in "~/Filtered-Mail/postmaster.12")
applied 14 times (3%)
Rule #5: (save in "~/Filtered-Mail/risks.12")
applied 3 times (1%)
Rule #6: (save in "~/Filtered-Mail/rays.12")
applied 28 times (7%)
versus:
% filter -S
[the output as listed above, followed by:]
Explicit log of each action;
Mail from taylor about Filter Summary
PUT in mailbox: the default action
Mail from news@hplabsz.hpl.hp.com about Newsgroup comp.editors created
PUT in mailbox: the default action
Mail from root about Log file: cleanuplog
PUT in mailbox: the default action
[etc.]
To actually use either of the summarizing options, there are two
ways that are recommended. The preferred way is to have a line
in either your crontab file (ask your administrator for help with
this) that invokes the filter program as often as you desire with
the -s option. For example, I have a summary mailed to me every
morning at 8 o'clock:
0 8 * * * "/usr/local/bin/filter -s | elm -s 'Filter Summary' taylor"
An alternative is to have your .login (or equivalent) execute the
command each time you log in.
Note that if you want to have your log files cleared out each
time the summary is generated you'll need to use the -c option
too. Also, if you want to keep a long list of actions performed
you can do this by saving it as you display it. A way to do this
would be, if you were to have the invocation in your .login (or
equivalent) script, to use:
echo "Filter Log;"
filter -c -s | tee -a PERM.filter.log
which would append a copy of all the output to the file
PERM.filter.log and would avoid you having
to read larger and larger summaries of what the program had done.
If you prefer not to have filter generate log files, use the -q
option. Messages that are written to stderr or the -o file are
still generated; only message to the log files are quashed.
Go to the next section