Miscellanious



- 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 "bob@bozoland.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.



- When you use the save, or savecopy commands, they save to whatever the "base_dir" location is, unless you specify a relative or full path as the folder name. Since most people's mail is in the directory "Mail" or "mail", you will need to say "savecopy mail/foldername" or "savecopy Mail/foldername" if you don't change the base_dir.


- CAVEAT!
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".



SIGALRMAbort file-locking attempt. Follow failed-to-open-file procedures.
SIGQUIT, SIGHUP, SIGINT, SIGTERMRemove existing file locks, try to save
the message in memory to "dead_letter.####" (where #### is the process ID).
SIGABRTRemove existing file locks. Vaporize message in memory.
SIGKILLDie a nasty, miserable death. No chance to remove file locks.
They must be deleted later manually.

- ZFilter takes the following actions based on incoming signals:

- 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


empty. You could test the message like this:
if( ! ip ) save Mail/spam;
if( ip = "UUCP" ) save Mail/uucp;
if( ip = "LOCAL" ) canned getbacktoya; savecopy Mail/localmail





Go back to my Home Page
Go back to Table of Contents
Send me e-mail!