- Normally, ZFilter logs it's actions to a file called "filter-log". You may change this in the course of processing by changing the variable 'log_file' to reflect the new file to log to. This is useful for logging certain mail to a different file for whatever purposes you may intend it.
- The variable "base_dir" is a shortcut that refers to the default directory for files that don't start with "/". For example, if base_dir is set to "/var/home/bob" and you change the log file from "filter-log" to "myfilter.log", the full path for "myfilter.log" will be "/var/home/bob/myfilter.log". If you wanted to log to "myfilter.log" in the root directory, you would need to change it to "/myfilter.log". By default, base_dir is set to your home directory.
- To prevent "mail-loops" of two filters e-mailing each other, ZFilter adds the header "X-Filtered-By" to the message, and will not respond to any message containing an "X-Filtered-By" in the message header. Just to be paranoid, ZFilter will also not respond to any message containing the words "automated", "filter" or "server" in the subject line. You (or whoever maintains the source for ZFilter) can easily change this by editing the first few lines of the source (the part to change is clearly marked)
- Your inbox is (by default) /var/mail/YOUR_LOGIN_NAME . Don't change it in the defaults file unless you are sure what it is. Consult a Unix techie if you don't know.
- As a special shortcut, actions that appear in the rules file prior to any "if" statements are taken for every e-mail letter (as if the first line had been an "if (always)" )
- You may imbed comments in your rules file. Any line starting with the "#" character will be ignored.
- When configuring ZFilter, you may define a "local host". This is appended to all mail that arrives from your local machine. (ie mail from "bob" or "jim" NOT "email@example.com"). You will probably only need this if mail sent to just "bob" doesn't work correctly.
- When configuring ZFilter, it will ask what the "chain_threshold" should be. This is the number of times a letter should look like it has been forwarded before being flagged a "chain" letter.
- Unix Hacks: the "?" and "#" operators do a perl regex on the variable they work on. "?" does an insensitive "/whatever/i" and "#" does it without the "i". SOO... you can put any regex perl stuff in it you like, say if( bob ? ^foo$ ) to match "foo" only case-insensitive.
Using ANY of these options on ZFilter's invocation line will cause ZFilter to quit without actually processing a message:
-A -C -c -D -L -P -r -s -S -u -V -x -X
All of these options are for managing files, or setting up ZFilter. They are meant to be run by calling zfilter directly, like this:
zfilter -C -x -X
And will cause all your mail to dissapear if you use them in your .forward file.
- Whenever ZFilter opens a file that it intends to write to, it creates a file called "filename.lock" (where "filename" is the name of the file that it is trying to write to). It also locks the file using the flock(2) system call. If you create a file called "filename.lock" and do not remove it, ZFilter will never write to the file. If your system does not support the flock system call, you may disable it by editing ZFilter and setting "$USE_FLOCK" to "0".
|SIGALRM||Abort file-locking attempt. Follow failed-to-open-file procedures.|
|SIGQUIT, SIGHUP, SIGINT, SIGTERM||Remove existing file locks, try to save|
the message in memory to "dead_letter.####" (where #### is the process ID).
|SIGABRT||Remove existing file locks. Vaporize message in memory.|
|SIGKILL||Die a nasty, miserable death. No chance to remove file locks.|
They must be deleted later manually.
- ZFilter sets the "ip" variable in the following manner: If it looks like the message came from your local system, it sets "ip" to the word "LOCAL" (all in caps). If the message looks like it came from UUCP at some point (in which case it would be useless to try to resolve the host) the 'ip' variable is set to "UUCP". In all other cases, ZFilter tries to determine the IP address of the host and sets the 'ip' variable to it. If the IP address cannot be determined, then the 'ip' variable will be