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:
"|/usr/local/bin/filter -vo /tmp/joe.filter_errors"
Suffice it to say, you can get pretty tricky with all this!!