SMM:08-52
Sendmail Installation and Operation Guide
The $f macro is the id of the sender as originally determined; when mailing to a specific host
the $g macro is set to the address of the sender relative to the recipient. For example, if I send to
"bollard@matisse.CS.Berkeley.EDU" from the machine "vangogh.CS.Berkeley.EDU" the $f macro
will be "eric" and the $g macro will be "eric@vangogh.CS.Berkeley.EDU."
The $x macro is set to the full name of the sender. This can be determined in several ways. It
can be passed as flag to sendmail. It can be defined in the
NAME
environment variable. The third
choice is the value of the "Full-Name:" line in the header if it exists, and the fourth choice is the
comment field of a "From:" line. If all of these fail, and if the message is being originated locally,
the full name is looked up in the /etc/passwd file.
When sending, the $h, $u, and $z macros get set to the host, user, and home directory (if
local) of the recipient. The first two are set from the $@ and $: part of the rewriting rules, respec-
tively.
The $p and $t macros are used to create unique strings (e.g., for the "Message-Id:" field).
The $i macro is set to the queue id on this host; if put into the timestamp line it can be extremely
useful for tracking messages. The $v macro is set to be the version number of sendmail; this is nor-
mally put in timestamps and has been proven extremely useful for debugging.
The $c field is set to the "hop count," i.e., the number of times this message has been pro-
cessed. This can be determined by the -h flag on the command line or by counting the timestamps
in the message.
The $r and $s fields are set to the protocol used to communicate with sendmail and the send-
ing hostname. They can be set together using the -p command line flag or separately using the -M
or -oM flags.
The $_ is set to a validated sender host name. If the sender is running an RFC 1413 compli-
ant IDENT server and the receiver has the IDENT protocol turned on, it will include the user name
on that host.
The ${client_name}, ${client_addr}, and ${client_port} macros are set to the name,
address, and port number of the SMTP client who is invoking sendmail as a server. These can be
used in the check_* rulesets (using the $& deferred evaluation form, of course!).
5.3. C and F -- Define Classes
Classes of phrases may be defined to match on the left hand side of rewriting rules, where a
"phrase" is a sequence of characters that does not contain space characters. For example a class of
all local names for this site might be created so that attempts to send to oneself can be eliminated.
These can either be defined directly in the configuration file or read in from another file. Classes are
named as a single letter or a word in {braces}. Class names beginning with lower case letters and
special characters are reserved for system use. Classes defined in config files may be given names
from the set of upper case letters for short names or beginning with an upper case letter for long
names.
The syntax is:
Cc phrase1 phrase2...
Fc file
Fc |program
Fc [mapkey]@mapclass:mapspec
The first form defines the class c to match any of the named words. If phrase1 or phrase2 is another
class, e.g., $=S, the contents of class S are added to class c. It is permissible to split them among
multiple lines; for example, the two forms:
CHmonet ucbmonet
and