sendmail.cf
Purpose
Contains sendmail configuration file data.
Description
The configuration file contains the configuration infor-
mation for the sendmail program. The configuration
information includes such items as the host name and
domain and the sendmail rulesets.
The configuration file has three major purposes:
o To initialize the environment for sendmail by setting
the options
o To rewrite addresses in messages by first mapping the
addresses from any format into a canonical form and
then mapping the canonical form into the approriate
syntax for the receiving mailer.
o To translate the address into the set of instructions
needed to deliver the message.
The configuration file entries consist of lines, each of
which begins with a single character command. Entries
can continue onto multiple lines by placing white space
at the beginning of each subsequent line. Comments are
included on lines beginning with the # (sharp sign). The
commands and operands are:
CX word1 word2 ... Defines the class, specified
by X, of words to match on
the left hand side of
rewriting rules. Class
specifiers may be any of the
upper case letters from the
ASCII character set. Lower
case letters and special
characters are reserved for
system use.
DX value Defines the macro specified
by X and its associated
value. A macro is named
using a single character.
The character may be any
character from the ASCII
character set, but user-
defined macros can only use
the upper case letters.
Lower case letters and
special characters are
reserved for system use.
Macros can be interpolated in
most places using the escape
sequence $x. See "Special
Macros" for additional infor-
mation.
FX filename [format| Reads the elements of the
class specified by X from
filename using an optional
scanf format specifier.
H[?mflags?|hdrname: htemplate
Defines the header format the
sendmail program inserts into
a message. Continuation
lines are a part of the defi-
nition and write into the
outgoing message. The
htemplate is macro expanded
before insertion into the
message. If the mflags are
specified, at least one of
the specified flags must be
stated in the mailer defi-
nition for this header to be
automatically output. If one
of these headers is in the
input, the header writes into
the output message regardless
of these flags.
Mname, [field=value|* Defines a mailer where name
is the name of the mailer
(used internally only) and
field=value defines attri-
butes of the mailer. Allow-
able fields and values are:
P=value Defines the
pathname of the
mailer, where value
is the pathname.
SMTP internal mail
uses a value of IPC
F=value Defines the special
flags for this
mailer, where value
can be a string
composed of the
following:
C Saves the
sender
domain. For
this func-
tion only,
the sender
domain id
defined to
be every-
thing from
the first @
(at sign) to
the end of
the sender
address.
This string
is appended
to header
addresses
which
contain no @
whenever
mail is sent
to any
mailer.
This also
applies to
calculation
of the $g
macro and
everything
dependent on
it. This
flag offsets
the SMTP
mail and
rcpt com-
mands.
D Requires a
"Date"
header line.
e This mailer
is expensive
to connect
to. Avoid
normal con-
nection and
when neces-
sary connect
during a
queue run.
See the c
option on
5-216.
E Escape
"From" lines
to >"From"
in message
bodies.
f Calls the
mailer with
an -f flag
followed by
the
expression
of $g, if
the speci-
fied mailer
is legiti-
mate and the
user ID of
the sendmail
process is
on the
trusted-user
list or is
root or, if
the group ID
is system.
Else, the -f
flag on the
mailer call
is not gen-
erated.
F Requires a
"From"
header line.
h Preserves
upper case
in host
names for
this mailer.
I Uses SMTP to
communicate
with another
sendmail and
can use
special pro-
tocol fea-
tures.
l This mailer
is local;
final
delivery is
performed.
L Limits the
line length
of a text
line to less
than 1000
characters.
Any leading
dot dupli-
cated due to
the X flag
is not
included in
the count.
Only allows
7-bit data
to pass
either way
through the
mailer.
m This mailer
can send to
multiple
users on the
same host in
one trans-
action.
When a $u
macro occurs
in the A
part of the
mailer defi-
nition, that
field will
be repeated
as necessary
for all
qualifying
users.
M Requires a
"Message_ID"
header line.
n The
AIX-style
"From" line
on the front
of the
message is
not
inserted.
N Interna-
tional Char-
acter
Support.
Only has
meaning when
used with
the L flag.
Allows 8-bit
data to
pass.
p Uses the
return-path
in the SMTP
MAIL FROM:
command
rather than
just the
return
address.
P Requires a
"Return_Path"
header line.
r Same as
option f
except a -r
flag is gen-
erated.
s Strips quote
characters
off of the
address
before
calling the
mailer.
S User ID is
not reset
before
calling the
mailer.
u Preserves
upper case
in users
names for
this mailer.
U Requires
"From" lines
with
UUCP-style
remote from
host on the
end.
x Requires a
"Full_Name"
header line.
X This mailer
uses the
hidden-dot
algorithm.
(Any line
beginning
with a dot
has an extra
dot pre-
pended.
This ensures
that the
lines in the
message con-
taining a
leading dot
will not
terminate
the message
prematurely.
See the
sendmail -i
flag or the
config
option.
S=value The rewriting rule
set to be used for
sender addresses,
where value is the
rewriting rule set
number.
R=value The rewriting rule
set to be used for
recipient
addresses, where
value is the
rewriting rule set
number.
A=arg Defines the argu-
ment string arg to
exec the mailer
with. Embedded
spaces may be
included. If
embedded spaces are
used, enclose the
argument string
with " (double
quotes). For a
SMTP mailer, A=IPC.
E=string Defines the string
to use as an end-
of-line indication.
A string containing
only newline is the
default.
M=length Defines the maximum
message length to
be sent to the
mailer.
Ox[value| Sets option to x. If the
option is a valued option,
you must also specify value.
Options may also be selected
from the command using the -o
flag of the sendmail command.
The options and the possible
values are described as
follows:
Afile Uses the named file
as the alias file.
Bc Sets the blank sub-
stitution character
to the character
specified in the
parameter c. The
sendmail program
replaces unquoted
spaces in addresses
with this char-
acter. The sup-
plied configuration
file uses the .
(period) for this
character.
c If an outgoing
mailer is marked as
being expensive to
use, this option
causes sendmail to
queue messages for
that mailer program
without sending
them. The queue
can be run later
when costs are
lowest or when the
queue is large
enough to send the
message effi-
ciently.
dx Sets the delivery
mode to x. Valid
modes are:
b Deliver in
background
(asynchro-
nously). This
is the default
setting.
i Deliver inter-
actively (syn-
chronously)
q Queue the
message only
and deliver
during queue
run.
ex Sets error proc-
essing to mode x.
Valid modes are:
e Mails the
error message
to the user's
mail box, but
always exits
with a zero
exit status
(normal
return).
m Mails the
error message
to the user's
mail box.
p Displays the
error message
on the ter-
minal
(default).
q Discards the
error message
and returns
the exit
status only.
w Writes the
error message
to the ter-
minal or mails
it if the user
is not logged
in.
f Saves "From" lines
at the front of
messages. These
lines are normally
discarded. Causes
all other headers
to be regarded as
part of the message
body.
gN Sets the default
group ID to use
when calling
mailers to the
value specified by
N.
Hfile Specifies the name
of the SMTP help
file.
i Does not interpret
a . (period) on a
line by itself as a
message terminator.
Removes the excess
dot inserted by a
remote mailer at
the beginning of a
line, if mail is
received through
SMTP. In addition,
if receiving mail
through SMTP, any
dot at the front of
a line followed by
another dot is
removed. This is
the opposite of the
action performed by
the X mailer flag.
Ix Allows spaces as
well as tabs to
separate the LHS
and RHS of rewrite
rules. In both the
LHS and RHS, x must
be used in place of
embedded spaces.
The default for x
is _ (underscore).
All instances of x
are changed to
spaces after the
LHS and RHS are
separated by the
sendmail program.
This option allows
rewrite rules to be
modified using an
editor that
replaces tabs with
spaces.
Ln Specifies the log
level to be the
value supplied in
the n parameter.
Each number in the
following list
includes the activ-
ities of all
numbers of lesser
value and adds the
activity that it
represents. Valid
levels and the
activities they
represent are:
0 No
logging
1 Major
problems
only
2 Message
col-
lections
and
failed
deliv-
eries
3 Suc-
cessful
deliv-
eries
4 Messages
being
deferred
5 Placing
messages
in the
queue
6 Unusual
but
benign
incidents
9 Log
internal
queue ID
to
external
message
ID map-
pings
12 Several
messages
that are
of
interest
when
debugging
16 Verbose
informa-
tion
regarding
the
queue.
m If the sender is in
an alias
expression, also
send to the sender.
Mx value Defines macro x to
have value. This
option is normally
used only from the
sendmail command
line.
n Validates the RHS
of aliases when
performing the
newaliases func-
tion.
Nnetname Sets the name of
the host network to
netname. The
sendmail program
compares the argu-
ment of an SMTP
HELO command to
hostname.netname
(value of hostname
comes from the
kernel). If these
values do not
match, it adds the
hostname.netname
string to the
"Received:" line in
the message so that
messages can be
traced accurately.
o Indicates that this
message may have
old style headers.
Without this
option, the message
has new style
headers (commas
instead of spaces
between addresses).
If this option is
set, an adaptive
algorithm correctly
determines the
header format in
most cases.
Paddress Identifies the
person who is to
receive a copy of
all returned mail.
Qdir Sets the directory
in which to queue
messages. The
directory will be
created if it does
not exist.
rtime Sets the timeout
for reads from a
mailer program to
the value specified
by time. If no
timeout value is
set, sendmail waits
indefinitely for a
mailer to respond.
Sfile Sets the mail sta-
tistics file to the
file. Statistics
are only collected
if the file exists.
This file must be
created by the
user.
s Enqueues before
delivery, even when
in immediate
delivery mode.
Ttime Sets the timeout on
messages in the
queue to the speci-
fied time. After
this interval,
sendmail returns
the message to the
sender. The
default is three
days.
uN Sets the default
user ID to use when
calling mailers to
the value specified
by N.
v Run in verbose
mode.
Y The sendmail
program delivers
each message in the
mail queue from a
separate process.
This option is not
required and may
increase overhead
in the AIX environ-
ment.
Pname=num Defines values for the
"Precedence" field. When
name is found in a
"Precedence" field, the
message class is set to num.
Higher numbers indicate
higher precedence. Negative
numbers indicate that error
messages are not returned.
The default num is 0. The
precedence of mail is defined
by a header of that name
within the mail.
Rlhs rhs comments Defines a rewriting rule.
One or more tab characters
separate the three fields of
this command. If space char-
acters are to be used, the
configuration option I must
be set. The fields may
contain embedded spaces,
unless the I option is set.
If the I option is set, the
embedded spaces must be
represented by the character
defined in I. After the
fields are separated, the
character representing the
space is changed to an actual
space.
Sx Sets the rule set currently
collected to number x. If a
rule set definition is begun
more than once, the new defi-
nition overwrites the old.
Tuser1 user2... Defines system administrative
(trusted) user IDs. These
IDs have permission to over-
ride the sender address using
the -f flag. There may be
more than one ID specified
per line.
SPECIAL MACROS
Macros are interpolated using the construct $x, where x
is the name of the macro to be interpolated. Lower case
letters are reserved to have special semantics, used to
pass information in or out of the sendmail program.
The following macros must be defined to transmit informa-
tion into the sendmail program.
e The SMTP entry message. This message is sent by
the SMTP handler in the sendmail domain when the
host connects to it.
j The official domain name for the site. This must
be the first word in the $e macro. The domain
name is a sequence of domain element strings,
ordered from the most specific to the most
general, separated by periods. The use of nick-
names or aliases is not allowed. The maximum
domain name length is 64 characters. The $j macro
should use this format.
l The format of the AIX "From" line. This macro is
usually a constant.
n The name of the daemon (for error messages). This
macro is usually a constant.
o The set of operators in addresses. This macro
consists of a list of characters considered to be
tokens and separates tokens during parsing. For
example, if r exists in the $o macro, the input,
"address", parses into three tokens: "add, r," and
"ess". There are many internal hard-coded delim-
iters added to this list by sendmail. It is
recommended that this list not be changed.
q The default format of the sender address.
Sendmail defines some macros for interpolation into
argument variables for mailers or for other contexts.
These macros are:
a The origination date in Arpanet form. $a contains
the time extracted from the "Date" line of the
message (if there is one). If the incoming
message has no "Date:" line, the $a macro contains
the current time.
b The current date in Arpanet form. $b equals the
current date and time (used for postmarks).
c The hop count. The hop count is the number of
times the message has been processed. The -h flag
of the command line or the number of "Received:"
headers
in the message determine the hop count.
d The date in AIX (ctime) format.
f The sender (from) address. The $f macro is the
sender address as seen from the current host.
g The sender address relative to the receiver. When
mailing to a specific host, the $g macro contains
the address of the sender relative to the
receiver. For example, if the user, "newton", at
system, "appletree", sends a message to
"chopin@piano", the $f macro equals "newton" and
the $g macro equals "newton@appletree".
h The receiving host.
i The queue ID of the host. The $i macro is useful
for tracking messages if put into the message ID
line.
p The process ID of sendmail. $p and $t are used to
create unique strings for the "Message_ID" field.
s The host name of the sender.
t A numeric representation of the current time. The
macros, $p and $t, are used to create unique
strings for the "Message_ID" field.
u The receiving user
v The version number of AIX. The $v macro can be
found in "Received:" header messages and is useful
for debugging.
w The hostname of the local site and, if present,
the address.
x The full name of the sender. The name is deter-
mined by one of the following: the full name
passed as a flag to sendmail, the value found in
the "Full_Name" line of the header, the value
found in the comment field of a "From" line, or if
the message originates locally, the full name
found in /etc/passwd.
y The terminal ID of the sender.
z The home directory of the receiver.
File
/usr/lib/sendmail.cf The sendmail configuration file.
/usr/lib/sendmail.fc The compiled version of the
sendmail configuration file.
Related Information
Managing the AIX Operating System.
The command sendmail in AIX Operating System Commands
Reference.