ZFilter takes all it's cues from a "rules" file. The rules file is made up of statements that follow this general format:
If (something is true) some action to take.
Each of those statements is called a "Rule". There are two acceptable formats for each rule-
if (*some expression*) *some action*
if *some expression* then *some action*
One requires parentheses, one requires the word "then". Choose whatever form most appeals to you, but this author prefers the parenthesized form. If you use the second format, if you have the word "then" somewhere in the expression or as an action, the statement may not work correctly. With the parenthesized format, the spaces are optional between parts, with the second, the spaces are required. The second format is really for programmers who came from a BASIC environment and can't handle the real world of C++ and Unix.
An expression is (for our purposes) the statement that is being evaluated for "truthfulness". It represents the situation that you want in order for the actions you want to be performed. For example, in the real-life statement
"If it's not raining and the car will start, go to the store."
The "expression" part is "... not raining and the car will start ..." and of course "... go to the store." is the "action" part of the statement because it represents what you want to do if the expresion is true.
An expression can be in several parts. A multi-part expression would look like this:
sub-expression AND/OR sub-expression AND/OR sub-expression .....
The real world example above has two sub-expressions: "not raining" and "the car will start". It might have three or more, like this:
"If it's not raining and the car will start or you can take a bus, go to the store."
With ZFilter, you separate the sub-expressions with "|" and "&". (or "||" and "&&" if you come from a programming background and it makes you feel better. ZFilter doesn't do bitwise comparisons, so "|" and "||" mean the same thing, ditto for "&" and "&&"). "|" means "OR" and "&" means (you guessed it!) "AND". SO... if you want to tell ZFilter the same expression above (assuming it knows english), you would tell it:
if ( ! raining & car will start | can take bus ) go to the store
The "!" means "not", and will be covered later on.
Each actual expression can follow one of two formats:
[ ! ] VARIABLE RELATIONSHIP VALUE
[ ! ] VARIABLE
and two special cases:
[ ! ] always
[ ! ] never
DON'T use the square brackets. They are there to remind you that the "!" is optional. You may place an exclamation point at the beginning of an expression to reverse the sense of it. SO...
! bob = 3
which normally means "When the variable 'bob' is equal to 3", with the exclamation mark means "Whenever the variable 'bob' is NOT 3". and the statement
which means (without the exclamation mark) "When the variable 'foo' exists", now means "When the variable 'foo' does NOT exist." "always" is always true. ! always means "never", not "sometimes". "never" is never true. ! never means "always".
Without parentheses, an expression evaluates like this:
if (((sub-expression1) & sub-expression2) & sub-expression3) then... essentially, sub-expressions that come later or last are more "important" than ones that come before. If you have trouble with the idea of using parentheses to make yourself clear, just put the most important parts of your rules last and you should do OK.
SO... Our statement before,
if ( ! raining & car will start | can take bus ) go to the store
works out like this, assuming it's raining and the car won't start, but the bus is available:
|! raining ...||is False. It is raining.|
|... car will start ...||Also false. It won't.|
|... bus is available||True! The bus is available.|
|((( false ) & false ) | true)||representing the three sub-expressions.|
|(( false & false ) | true)||not raining and car will start (both false)|
|(( false ) | true)||neither is true, so that sub-expression|
|( false | true )||combination of previous two and "bus |
|True.||End result is true.|
|something & something||is true ONLY if both "somethings" are true.|
|something | something||is true if either or both somethings are true.|
Will be true if you can get one vehicle to work and it is not raining. With parentheses we can use the old expression, just changed a bit:
if ( !raining & (car will start | bus is available) ) go to store.
If you honestly don't know how to use parentheses to separate parts of a statement you want evaluated first, then I'm sorry, but I don't have time or space to explain them to you. Consult a high-school kid who's at least in trig or so. They should have it down by now.
A variable (for our purposes) is a name attached to an unknown value. The name can be decided arbitrarily, but usually is intended to help the programmer or reader remember why they are using it. For example we can create a variable called "bob" and someone else can assign it the value "3". Later, we can test to see what it is with a statement like this:
if ( bob = 3 ) do this...
if ( bob = 2 ) do this...
if ( bob < 2 ) do this...
if ( bob > 3 ) do this...
So we don't really know what bob is, but we can do different things depending on what it is.
The variables used in ZFilter don't usually have just numbers in them. "sender" is usually a variable that is the e-mail address of the person who just sent you a letter (like email@example.com). "date" usually has the date the letter was sent to you (like Tue 13 Jul 1996).
ZFilter reads it's variables from the header of the message. For a complete list of all the stuff that should be in a message header, go read the RFC's. If you look at a header, you'll see lots of lines that look like this:
From: Jane Schmoe (firstname.lastname@example.org)
Date: Tue 18 Jul 1996 12:22:03 +1 GMT
and ZFilter will take everything _before_ the ":" and call it the variable name, and everything after the ":" and call it the variable's value. The above two lines would create two variables-
'from' would contain the value 'Jane Schmoe....' and 'date' would contain 'Tue 18 ... GMT'
In general, you're likely to have these variables from every e-mail message:
|from||who the sender would like you to think the message came |
|to||hopefully your e-mail address, but can be the address|
originally used before a cc: or Bcc:
|subject||what the sender thought the message was about|
|date||(special case) usually the date the message was sent.|
|reply-to||where to direct replies to|
|precedence||the class of message (like 'bulk' for large mailings)|
|errors-to||where to report errors|
|x-mailer||sometimes the program used to send the message|
|date||Normally, a full date: "Tue 18 Jul 1996 11:23:02 +1 GMT"|
indicating date, time and relation to GMT. ZFilter
breaks the date down into two variables:
'date' (Tue 18 Jul 1996) and 'time' (11:23:02).
|when||The original, unbroken date|
|name||The personal name of the sender (if defined)|
|The sender's preferred e-mail address|
|content||The entire contents of the letter|
|header||The entire header of the message|
|real_sender||ZFilter's "best guess" as to where the message came from.|
|sender||Equivalent to 'real_sender' when the variable 'sender'|
is not explicitly stated in the message.
|lines||The number of lines in the letter contents|
|words||The number of words in the letter contents|
|chars||The number of characters in the letter contents|
|size||The size (in kilobytes, rounded up) of the letter|
|signature||your ".signature" file.|
|chain||A special one, Zfilter tries to guess if the incoming|
message might be a chain letter. It counts the number
of times it appears to have been forwarded, and if
it has been forwarded more than a user-defined number
of times, it sets the "chain" variable. Otherwise the
variable doesn't exist.
See the Zfilter Setup part of the manual for more info
on setting the threshold for chain letter alarms.
|unique||Another special one. This variable is set if the content|
of the message is unique to your inbox. If the message
is something you have in your inbox already, even if
the headers of the message are different, this variable
will not exist. Also see the UNIQUE command.
|empty||This variable is set if the content of the message is|
made up only of whitespace (i.e. if there is nothing in
the message but spaces)
|ip||This variable is set if the hostname of the sender's|
address can be resolved to it's IP address. See the
miscellanious section for more on how this is done and
|inbox||Where the mailer thinks your in-box is.|
|base_dir||A "reference point" for all your files.|
|log_file||The file ZFilter writes it's logs to.|
|mail_subj||The subject ZFilter uses when sending mail.|
|fwd_mail_subj||The subject ZFilter uses when forwarding mail.|
All these variables are 'temporary' variables; that is, they change every time a letter comes in. Even variables created with 'set' are temporary, and are reset every letter. ZFilter also supports permanent variables that don't change or lose their values between letters. These are ideal for counters to count the number of messages that meet criteria and referring to them in form letters (ie "This is your 10th letter to me...") You can create permanent variables with 'create', 'pinc' and 'pdec'. In addition, there are a number of permanent variables that are kept by ZFilter: sec, min, hour, day, mon, year. Representing the number of messages received as of the current second, minute, hour, day, month and year respectively. To perform xxxx action for the first message of the year, you can say:
if ( year = 1 ) xxxx
Operators test for a relationship between a variable and a value. This is an expression straight out of algebra 101:
x > 5
there you're asking whether x is greater than 5. If you didn't know that you probably shouldn't be reading this. Go back to high school. In that expression, though, the ">" is the operator.
ZFilter supports the standard math operators for testing values: = (equal to)
< (less than)
> (greater than)
<= (less than or equal to)
>= (greater than or equal to)
as well as:
!= (not equal to)
and the two word-search functions:
? (case insensitive search)
# (case sensitive search)
The last two may need some explanation. An example should suffice: from ? "bozoland"
means "is the word 'bozoland' found anywhere in the variable 'from'? This would be true if from was "email@example.com" or "BOZOland@foo.com". from # "bozoland"
would only work if "bozoland" (all in lowercase letters) was in the 'from'.
Now we can look at expressions again. An expression has one of two forms:
(!) variable relationship value
It's "value" that we need to spend a little bit of time on. Value can be one of three things. Text, a number, or another variable. This is how ZFilter differentiates them all:
If it's "text" (like when you're using ? or # to search for something in a text-variable, or when you want to see if a text-variable is or isn't a certain word or phrase) the text needs to be _quoted_. That is, it needs to have quotes (") around it. For example, if I want to see if the phrase "have a nice day" appears anywhere in the letter I'm looking at, I would use:
if( content ? "have a nice day" ) do_some_action
It MUST have quotes. Trust me.
If the "value" part is a number, just type it in. Don't use quotes unless you want it treated as text. That's usually a bad idea. So, to see if the message has more than 50 lines, you would use:
if( lines > 50 ) do_some_action
Lastly, if the value is another variable, type it in without quotes again. So, if you want to see if the variable "lines" is smaller than the variable "words", (assuming there is a variable called "words"), you would use:
if( lines < words ) do_some_action
Or to see if the text in the "from" variable is contained anywhere else in the message body, you could use:
if( content ? from ) do_some_action
I think figuring this part out will probably be the only tricky part for new Unix users. Pros should get this one in no time. ;)
Actions are evaluated when the expression has been determined to be true. So, for the statement
if ( from ? "bozoland" ) canned bozoland_acknowledgement
if the expression "from ? bozoland" turns out to be true for the message currently being evaluated, (that is, if the message you just received had the word "bozoland" somewhere in the from field) then the action "canned bozoland_acknowledgement" would be taken.
Multiple actions on the same line are possible, but must be separated by semi-colons (;). Actions may also be placed on the next lines before the next "if" statement. Therefore, these are all different ways to do the same set of actions:
if ( from ? "bozoland" ) canned ack; forward firstname.lastname@example.org; stop
if ( from ? "bozoland" ) canned ack
if ( from ? "bozoland" ) canned ack
forward email@example.com; stop
And so on...
NOTE: Some commands take several arguments. To have several words (separated by spaces) considered as one argument, you must put them in quotation marks. For example, the "replace" command replaces one set of text with another set of text. To replace every occurence of
TIP: Whenever ZFilter sees a word beginning with "?" that isn't inside
a pair of quotes (for example ?what, but not "?what" or "now ?what"),
it replaces the word with the variable that comes after the "?". So...
if you say "page Message from ?sender", you would get a page that looked
something like this; "Message from firstname.lastname@example.org". This even
works on commands; if the subject was, for some reason, "page", you
could say "?subject Incoming Mail", and ZFilter would act as if you'd
said "page Incoming Mail".
There are currently three so-called "Meta-actions". These actions modify the behavior of other actions. The two commands "AT" and "AFTER" can delay the execution of their action until a certain, specified time. Each of these meta-actions only modify the action they precede. For example, if you say:
after 12:00 canned hi_noon; canned time_now;
the action "canned hi_noon" will take place after 12:00pm. The action "canned time_now" will take effect immediately, possibly taking effect before the "canned hi_noon" action. Only the action specified in the "AFTER" or "AT" meta-action will be delayed. The rest of the rules file and the other actions will all take effect normally. The "DURING" meta- action will only execute the action specified if the time is currently between the two times given. If you said:
during 12:00 14:00 canned good_timing
the action "good_timing" would only be taken if the time was currently between 12:00pm and 2:00pm. If the time was 5:00pm or 11:55am, the command would be ignored. Here are the ways you can specify the time for the AT, AFTER and DURING meta-actions:
|zz||at zz seconds past the current hour and minute|
|xx:yy||at the time xx:yy:00 |
|xx:yy:zz||at the time xx:yy:zz|
|+zz||zz seconds after the message is received|
|+xx:yy||xx hours and yy minutes after the message is received|
|+xx:yy:zz||xx hours, yy minutes and zz seconds after the message is rec'd.|
As an action, this is a synonym for "comment".
|Example:||# T-I-M-B-E-R !!|
Adds the variable and value to the header of the message you have
just received. This can be used prior to forwarding or saving.
It is not reccomended that you use Addheader for common variables
like Sender or From... It acts as it's name suggests: it _Adds_
the header line. If there was a prior variable with the same name,
now you will have two. Use Setheader instead.
|Usage:||addheader variable value|
|Example:||addheader X-Came-From Bob's House O' Email|
Adds the sender of the message to the given list.
Read the section on lists for more info. Addresses can be removed
from the command line, or with the action "remlist"
Runs a action any time after a certain, specified time. For example,
if you said "after 12:00 page You have mail!", you would receive the
page at 12:00 if it was earlier than 12:00 when you received the message,
or immediately if it was later than 12:00 when you received the message.
For valid ways to specify the time, see the section on Meta-Actions
|Usage:||after time action|
|Example:||after +1:00:00 canned leave_me_alone|
A synonym for "page".
|Example:||annoy You have spam!|
Runs a specified command at the time given. If the time given has already
passed, wait till the next day. For valid ways to specify the time, see
the section on Meta-Actions. NOTE: if you specify a relative time (a time
preceded by a '+'), this command will be functionally equivalent to the AFTER
|Usage:||at time action|
|Example:||at 12:00 bounce email@example.com|
A synonym for "page".
|Example:||biff Incoming spam!|
Forwards the message to another e-mail address, or multiple e-mail
addresses (separated by commas, no spaces). The message is then
marked to be deleted. Using Bounce and Leave is the equivalent of the
Canned sends a "canned" response (i.e. a form letter) to the sender of
the current message. For more on preparing a canned response and how to
use them, see a later section.
Make a comment in the log file (and to wherever you have redirected logs
if you're doing that). Useful only for making comments to yourself.
|Example:||comment Hope this works...|
Create explicitly makes a permanent variable. See the discussion on
variables for more information. Variables created with "Create", "Pinc"
and "Pdec" maintain their values through different mail messages. Specify
a value for the new variable. "Create"d variables can be made non-permanent
|Usage:||create variable_name value|
|Example:||create bob 1|
Decrement a variable by 1. (i.e. subtract 1). Obviously, this only makes
sense for variables that are numbers. If a variable is set to "2" it will
become "1". If it's "1" it will become "0" and so on. The opposite of DEC
is "inc". DECing a variable that does not exist will create one and give
it the value "-1". Like INC, "dec" won't create permanent variables, pdec
Delete removes the message, preventing it from appearing in your inbox.
A delete command will be negated if it is followed by a "leave" or "ignore"
command. If "delete" follows a "leave" or "ignore" command, it will cancel
THEM and the message will be deleted.
Checks all of the hosts the message has passed through against a DNS-based
black-hole list. Sites are typically placed in such a list after they
been shown to send spam, or to support spammers. Since this checks all
hosts in the 'Received' lines, you should be able to trap messages even if
they come to your site indirectly. Specify the host names of the black holes
you wish to check separated by commas, followed by the action you want to
take if the mail has come through a black-holed site. If no action is
specified, the default action is to delete the message.
|Usage:||dnsbl hostname,hostname... action|
|Example:||dnsbl blackholes.mail-abuse.org,relays.mail-abuse.org delete|
Run an internal perl routine with the arguments specified. You may
either run a ZFilter routine (not reccomended. All the routines you
can safely use are accessible via other commands. Only use one if you
know what you're doing) or you may run a routine previously loaded by
|Usage:||do routine arguments...|
|Example:||do secret_routine aaa bbb ccc|
Run a command only if the current time is between the two specified times
If the time is outside them, either earlier than the first time or later
than the second time, the command will be ignored.
|Usage:||during start-time end-time action|
|Example:||during 12:00 14:00 canned good_timing|
Runs another program. The output of the program is captured by the
variable "result" and can be used in later expressions.
A synonym for "xmessage".
|Usage:||feed program program_arguments...|
Forwards the mail to the given addresses and the message is left in
your inbox (unless there was a prior command to delete it). Using
Forward and Leave after each other sets the message to be sent to your
inbox. Using Forward and Delete is the equivalent to using the Bounce
A synonym for "load".
Save the message to your inbox. This command is usually used for clarity,
since the message is saved to your inbox by default anyway. If you follow
a "delete" command with an "ignore" or "leave" command, the delete command
will be canceled, and the message will be left in your inbox. If you
follow an "Ignore" command or "Leave" command with "delete", the message
will be deleted anyway.
Increment a variable by 1. Obviously, this only makes sense for variables
that are numbers. If the variable is "1" it will go to "2". If it's "2"
it will go to "3" and so on. The opposite of "inc" is "dec". INCing a
variable that does not exist will create one and give it the value "1".
"Inc" won't create permanent variables (but "Pinc" will).
A synonym for "keepheader" (below)
|Usage:||keep variable1 variable2 ...|
|Example:||keep subject from|
Strips the message header of everything but the variables you
specify. Good for saving space in your inbox, or for trimming the
headers before you "post" the message. A "keepheader" with no
arguments at all will zap the entire header. Keepheader doesn't
affect existing variables.
|Usage:||keepheader variable1 variable2|
|Example:||keep subject from|
A synonym for "Ignore"
Load in a perl library. This can be a standard one, like cgi-lib.pl
or you may load in any of your own. ZFilter uses "require" to load
the library. There are no consistency checks performed on your library
before doing this. If there is any problem loading the library, require
will cause the program to immediately abort, without saving whatever
message it is currently processing. Use extreme caution with this
Like "canned", lets you mail a canned response file to a user (a
combination of forward & canned in a sense). Note that it mails the
same canned response file to the same user every time.
|Usage:||mail canned_file email_address|
|Example:||mail acknowledgement firstname.lastname@example.org|
Mails the message to everyone on the list given. Senders can be
added to a list with "addlist" and deleted with "remlist" or via
the command line for both adding and deleting.
Mails the output of the last program that was run to the eMail address
The mode to leave files in when you're done saving to them. (this
is modified by the umask, which defaults to 0). Mode is by default
0700. Prefix the mode with 0 to make it octal, 0x to make it hex.
"Tags" the message as coming from a name you specify. This is for
people who send you a message, but haven't specified their full name
so that all you see is their e-mail address. This command has purely
aesthetic effects. It only affects mail readers that look to see
if a real name is on the "From" line, like PINE and ELM. It will
change an e-mail entry that looks like this:
N 3 email@example.com 12 Bingobob's subject
N 3 Dr. Bingobob 12 Bingobob's subject
It will also change the existing name if there is one to whatever you
specify. It doesn't affect anything else. Even the "Name" variable,
which contains the real name of the sender (if there is one) isn't
changed, so if you want it to be changed, you'll have to set it with
the "set" command.
|Example:||name Dr. Bingobob|
Assembler-speak for "No-Operation". This command does nothing, and
ignores any arguments that come after it.
Tries to send a message to you if you're logged on to the same system
that is getting mail. If you are on multiple times, it will try to
send the page to all of the sessions. Like any command, you may refer
to variables by putting a "?" in front of them.
|Example:||page Mail from ?sender about ?subject|
A synonym for "xcontent".
|Usage:||pass program program_arguments...|
Like "dec", but creates a permanent variable if one doesn't exist.
Like "inc", but creates a permanent variable if one doesn't exist.
Runs another program (like Execute) and "pipes" the current message to
it. This is wonderful for running the message to other programs that are
expecting e-mail, like "mail", the old "filter", "vacation", etc..
despite the fact that you can usually do what you want with ZFilter.
Runs another program and "pipes" the current message to it (like Pipe)
but only sends the content of the message, not the message headers.
This is good for text-filters, unix commands expecting standard text and
other programs along those lines. Like execute and pipe, whatever the
command prints to the screen is stored in the variable "result".
Tries to post the message to the newsgroup specified. It removes
extraneous header information, adds Keyword and Summary lines (it
tries to make the Keyword line by stripping prepositions, pronouns and
articles from the subject line) if they aren't in the message and posts
it via Inews. If Inews isn't configured correctly or you have specified
it as being in the wrong place, the posting will fail and whatever you
tried to post will disappear into the great void. Separate multiple
newsgroups you wish to post to with commas, no spaces.
Reads another rules file and takes actions from it if they apply to the
current message. When done reading the other rules file, processing
returns to the command immediately following the "process" command. You
could theoretically have two rules file each set to process each other.
That would lock up ZFilter until the combined internal pressures of
stack overflow and out-of-control demands on swap space would explode
with enough force to knock the earth out of it's orbit and send it
hurtling into the sun. If we're lucky. We might just as easily knock
the earth the _other_ way out of orbit so we'd get farther away from the
sun until we all slowly froze to death. Either way, don't try it.
A synonym for "mode".
A synonym for "xheader".
|Usage:||purify program program_arguments...|
Adds "> " to the beginning of every line of the variable given. For
example, if the variable "foo" looked like this:
Greetings from the world of foo.
Have a nice day.
doing "quote foo" would turn it into:
> Greetings from the world of foo.
> Have a nice day.
A synonym for "dnsbl".
|Usage:||rbl hostname,hostname... action|
|Example:||rbl dialups.mail-abuse.org save junkmail|
Removes the variable from the header of the message received. This
can be used prior to a forward or save if you want to remove private or
extraneous information. Use Keep for better stripping of everything
except what you want.
|Usage:||remheader variable1 variable2 variable3 ....|
|Example:||remheader from sender to cc|
Removes the sender from the mailing list given. Senders can be added
via the command line, or with the command "addlist". More information
is available under the section about "lists"
Replace every occurence of the first element with the second one in
the given variable. For example, if you said
"replace var aaa bbb", every time "aaa" appeared in the variable "var",
it would be replaced with "bbb". This differs from "xlate" which will
only replace one letter or character, but works with ranges of letters.
Saying "xlate var aaa bbb" will replace every letter "a" with the letter
"b". You may only have one-word text for now.
|Usage:||replace variable_name text1 text2|
|Example:||replace var fred bob|
A synonym for "load".
A synonym for "mailresult".
A synonym for "mailresult".
Resync re-synchronizes the message headers and content with the
variables in memory. Useful if you've modified the header for
some reason (especially through a command like xheader) and need
to re-set the variables. Variables are re-read from the message
headers as if this were a new message.
Save appends the message to a file just as the "savecopy" command does.
It then removes it from your inbox. This is used as a way to keep your
inbox clear of potential junk mail, but allows you to review it later.
Savecopy appends the message to a file, usually a message folder such
as those used by PINE and ELM.
Saveover clears the message folder before saving the current message to
it. Good for keeping the latest status update in it's own folder and
deleting the old one when a new one comes in.
Set a variable to the value specified. If you "set" a variable that
doesn't exist, a new one will be created with the value specified. You
may only create one-word variables, although you may separate multiple
words with an underscore (_) for readability. So don't use "new mail",
use "new_mail" instead.
PROGRAMMER TYPES: Don't use quotes around the arguments to set unless you
want them in the actual value.
|Usage:||set variable value|
|Example:||set mail_subj HamsterMan's new mail system|
Sets the header variable of the message received to the value specified.
If one doesn't exist, it will be created. This can be used prior to a
forward or save. If the variable exists already it will be replaced, so
if you simply want your header to appear as well (like Received-by lines)
you must use Addheader instead
|Usage:||setheader variable value|
|Example:||set From The Incredible Dr. Bozo|
Stop processing the rule file. Normally, ZFilter will continue reading the
rule file to see if other expressions are true, and taking actions on the
ones that are. Stop will immediately stop processing with whatever has been
done so far. Note that it stops *immediately* and other commands, even ones
on the same line, are ignored.
A synonym for "xlate". See below.
|Usage:||tr variable range1 range2|
A synonym for "xlate". See below.
|Usage:||translate variable range1 range2|
Set the process umask for people who know what umasks are. To specify
an octal number, prefix the number with "0", to specify a hex number,
prefix the number with "0x". 0700 is octal, 0x700 is hex.
Save the message to the folder only if the message content is not
already in the folder. In all other respects, this command acts like
the "savecopy" command. This is useful if someone is mail-bombing you
with the same message over and over. This command ignores message
headers, and only looks to see if the incoming message content is unique
to the folder specified (because some mail-bomb programs have header that
changes with time). As a shortcut, the variable "unique" is set if the
incoming message is unique to your inbox so you do not need to check it.
Examples: unique Mail/incoming|
A synonym for "saveover".
Passes the contents of the message to the program you specify. Takes
the output of the program as the new message body.
|Usage:||xcontent program program_arguments...|
|Example:||xcontent /bin/cat new.msg.body|
Passes the header to the program you specify. Takes the output of
the program as the new header. NOTE: variables are NOT changed after this
action. You must use "resync" to re-synchronize the variables and the
|Usage:||xheader program program_arguments...|
|Example:||xheader /bin/cat replace.msg|
Translates all occurences of one set of characters in a variable to a
different set. Xlate takes two sets of characters. Each is a list.
If Xlate sees, for example, the sixth letter in set 1, it will be replaced
by the sixth letter in set 2. For example, you may say
"xlate var 1234 5678". Xlate would look through the variable "var", and
replace all 1s with 5s, all 2s with 6s and so on. You may specify a
range of characters with "-". This would be another way to do the same
thing as above: "xlate var 1-4 5-8". This turns all uppercase letters
into lowercase ones: "xlate var A-Z a-z". Alternatively, you may separate
the two ranges with a "/".
|Usage:||xlate var range1 range2
xlate var range1/range2|
|Example:||xlate var A-Z a-z
xlate var A-Z/a-z |
Passes the message to the program you specify. Takes the output of
the program as the new message. As with Xheader, variables are NOT
changed after this action. You must use "resync" to re-synchronize the
variables and the header.
|Usage:||xmessage program program_arguments...|
|Example:||xmessage /bin/cat replace.mesg|
Make a variable non-permanent. The variable will still retain it's value
for the duration of the message being processed, but will not be defined as
anything for the next message. Use "set variable 0" to delete the variable
for the present.