How do I handle lists?



ZFilter can act as a simple listerver with the appropriate commands and rules in the rules file. For those unfamiliar with mailing lists and listservers, a list is simply a list of eMail addresses. Whenever someone on a list sends a message to whoever maintains the list, everyone on the list gets a copy of it. A simple example should suffice...


bob@wherever.org is keeping a list with five people on it. They are: dude@somewhere.org
mr.big@chicago.mafia.org
crack.dealer@aol.com
bozo_the_clown@shelter5.homeless.net
satan@underworld.mil

Whenever _any_one_ of those five people send a message to bob and indicate that they want to use the mailing list, all the other people get a copy of the message (except the person who sent it).


ZFilter let's you maintain multiple lists. Each list will have it's own name to separate it from the others. There are three "rules" actions to work with, and four command-line options that you can use to maintain your lists. The three actions are


addlist (to add the sender of the message to the list you specify) remlist (to delete the sender of the message from the specified list) maillist (to remail the message to the specified list)


Examples are given under the entry for the command in the action-list. The (CASE SENSITIVE!) command-line options to zfilter are:

-A list address : add the eMail address given to the list specified -D list address : remove the eMail address from the list specified -P list : prints out all the people who are on the list specified -W address : prints all the lists that contain the address specified
So, for example, to add "bob@somewhere.org" to the list "boating", you would type (on the command line)


zfilter -A boating bob@somewhere.org


And to remove him from the list "boating", you would type:
zfilter -D boating bob@somewhere.org


To see who else is on the boating list, you would type:

zfilter -P boating


And to see all the lists bob is on, you would type:

zfilter -W bob@somewhere.org


eMail addresses are NOT case sensitive, but the names of lists are. So, "boating", "Boating" and "bOAtIng" are three different lists.


For the actions, you can only add or remove the current sender from a list. That is, people can't put other people on lists, only themselves. Using the action:

if ( ... ) addlist boating


is the equivalent of typing


zfilter -A boating (address or person who sent the letter)


and the same goes for remlist and -D.


To be helpful, whenever ZFilter gets mail, it checks the various lists to see which ones (if any) the sender is on. It sets a variable called "list.name_of_list" for each one it finds. For example, if the sender was on the lists boating, cars and dachsunds, the variables "list.boating", "list.cars" and "list.dachsunds" would be created. You could check for this, and take an action like this:

if ( list.boating ) maillist boating


Mostly for unix techies:
With these commands, you can emulate several of the functions of a full listerver like majordomo. If you created a mail alias for a user, say- boating@yourhost.domain you could add a line like this to your rules file:
if( to = "boating@yourhost.domain" & list.boating ) maillist boating if( to = "listserv@yourhost.domain" & subject ? "join boating" ) addlist boating
if( to = "listserv@yourhost.domain" & subject ? "quit boating" ) remlist boating


Which (assuming "listserv@yourhost.domain" is also aliased) would add a user to the boating list if they have the words "join boating" in the subject of the letter, remove the user if they have the words "quit boating" in the subject of the letter, or mail the letter out to the boating list if the letter was mailed to the list.


You can easily do file-requests:

if( subject ? "send help.txt" ) canned help.txt


ZFilter was never meant to replace full-featured listservs like majordomo, but (with a lot of rules and some external programs) can be forced to act like one. Use at your own risk. ZFilter uses DBM files to maintain lists for quick checking and removal. Maybe in the future, if requested, ZFilter will have more listserver applications. The majordifference at the moment (ha ha) is that for each list, you have to add the three or so lines for it manually, and that ZFilter doesn't parse the subject line and content looking for stuff it understands.


One application of these functions is to start a list for people who junk-mail you and won't stop. You can add them from the command line with -A, and then do something like this:

if( list.junk_mailers ) maillist junk_maillers; delete


which will keep all the junk mailers mailing each other, and delete them from your inbox! As Tai-Chi teaches, use the force of your opponents against them. :)

NOTE: All folders MUST be given _single_word_ names for now.





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