Go to the previous section

Actually Using the Program

Now the bad news. If you aren't running sendmail or some other Mail Transport Agent that supports delivery to a program you cannot use this program as currently written. Why? Because the filter program expects to be put in your .forward file (or equivalent concept for MTAs other than sendmail) that causes the messages to be delivered to the filter program. That is something that only sendmail and other smart MTAs look at!

The format for the entry in the .forward file (located in your home directory) is simply:

        "|/usr/local/bin/filter"
Alright, it isn't quite that simple! Since filter is invoked by processes that don't know where you are logged in, you need to have some way to trap the error messages. For ease of use, it was decided to have all the messages written to the file specified by -o (or stderr) which means that you have two main choices for the actual entry. Either:
        "|/usr/local/bin/filter -o /dev/console"
which will log all errors on the system console (each error is prefixed with "filter (username)" to distinguish it), or:
        "|/usr/local/bin/filter -o /tmp/joe.filter_errors"
if you want to have a copy saved to a file. Note that the quotes are a required part of the line. A possible strategy would be to have the errors written to a file and to then have a few lines in your .login (or equivalent) script like: if ( -f /tmp/joe.filter_errors) then echo " " echo "Filter program errors;" cat /tmp/joe.filter_errors echo " " endif You can also use the -v option in combination with the above to have a more verbose log file (including action taken with date/time stamp) saved by having in your .forward file:
        "|/usr/local/bin/filter -vo /tmp/joe.filter_errors"
Suffice it to say, you can get pretty tricky with all this!!

Go to the next section