symname, equate, equate, equate, ...
equate expression is of the form
field is one of those in
first character of the
field is recognized. That is, all
of the following are equivalent:
S=21 Sender=21 SenderRuleSet=21
field is followed by more optional
whitespace, the mandatory
= character, optional whitespace,
and finally the
arg. The form that
arg takes varies depending on the
field. It may
or may not be required.
Special characters can be embedded into the
field as shown in
Table 31.3 of Section 31.3.2, "Syntax of the Configuration File Macro's Text".
For example, the backslash notation can be used to embed commas
and a newline character into the
A= equate like this:
... A=eatmail -F0\,12\,99 -E\n
The complete list of equates is shown in Table 30.1. A full description of each begins in the next section. They are presented in alphabetical order rather than in the order in which they would appear in typical delivery agent definitions.
|Argv||Section 30.4.1, A=||Delivery agent's command-line arguments|
|Charset||Section 30.4.2, C=||Default MIME character set (V8.7 and above)|
|Directory||Section 30.4.3, D=||Paths to directories for execution (V8.6 and above)|
|EOL||Section 30.4.4, E=||End-of-line string|
|Flags||Section 30.4.5, F=||Flags describing a delivery agent's behavior|
|Linelimit||Section 30.4.6, L=||Maximum line length (V8.1 and above)|
|Maximum||Section 30.4.7||Maximum message size|
|Niceness||Section 30.4.8, N=||How to nice(2) the agent (V8.7 and above)|
|Path||Section 30.4.9, P=||Path to the delivery program|
|Recipient||Section 30.4.10, R=||Recipient rewriting rule set|
|Sender||Section 30.4.11, S=||Sender rewriting rule set|
|Type||Section 30.4.12, T=||Types for DSN diagnostics (V8.7 and above)|
|UID||Section 30.4.13, U=||Run agent as uid:gid (V8.7 and above)|
The argv for this delivery agent(All versions)
The program that is to be run (specified by the
P=equate) is given its C language
char **argvarray (list of command-line arguments) by this
A=equate. This equate is traditionally the last one specified, because, prior to V8.7, the
argvarguments were all those from the
=to the end of the line:Mlocal, P=/bin/mail, F=rlsDFMmnP, S=10, R=20, A=mail -d $u prior to V8.7, argv to end of line
Beginning with V8.7, the
A=is treated like any other equate, in that it ends at the end of line or at the first comma. The backslash character can be used as a prefix to embed commas in the
Macros are expanded and may be used in this
argvarray. For example,A=mail -d $u
A=begins the declaration of the argument array. The program that is specified by the
/bin/mail) will be executed with an
argvofargv = "mail" argv = "-d" switch means perform final delivery argv = "fred" where macro $u contains "fred"
The macro value of
$ucontains the current recipient name (see Section 31.10.36, $u). Another macro that commonly appears in
$h, the recipient host (see Section 31.10.17, $h). You are, of course, free to use any macro you find necessary as a part of this
argvarray. Note that
$uis special in that if it is missing, sendmail will speak SMTP to the delivery agent (see Section 126.96.36.199, "$u in A="). Also note that any arguments in excess of the maximum number defined by MAXPV (see Section 18.8.19, MAX...), usually 40, are silently ignored.
Under V8 sendmail's m4 configuration you can define the
A=equate using the values shown in the leftmost column of Table 30.2. For example, to modify the
A=equate for the
localdelivery agent, you might include this definition in your
mcfile:define(`LOCAL_MAILER_ARGS', `put.local -d $u -l')dnl
Table 30.2: m4 Modification of A= Equates define() Agent MAILER() Default A= CYRUS_MAILER_ARGS cyrus cyrus deliver -e -m $h -- $u CYRUS_BB_MAILER_ARGS cyrusbb cyrus deliver -e -m $u FAX_MAILER_ARGS fax fax mailfax $u $h $f LOCAL_MAILER_ARGS local local mail -d $u LOCAL_SHELL_ARGS prog local sh -c $u MAIL11_MAILER_ARGS mail11 mail11 mail11 $g $x $h $u PH_MAILER_ARGS ph phquery phquery -- $u POP_MAILER_ARGS pop pop pop $u PROCMAIL_MAILER_ARGS procmail procmail procmail -m $h $f $u SMTP_MAILER_ARGS smtp smtp IPC $h SMTP8_MAILER_ARGS smtp8 smtp IPC $h ESMTP_MAILER_ARGS esmtp smtp IPC $h RELAY_MAILER_ARGS relay smtp IPC $h USENET_MAILER_ARGS usenet usenet inews -m -h -n UUCP_MAILER_ARGS uucp uucp uux - -r -a$g -gC $h!rmail ($u)
In general, the definitions in the _CF_DIR_/ostype subdirectory are pretuned in a way that is best for most sites. If you want to make changes, remember that each definition that you put in your
mcfile replaces the definition in _CF_DIR_/ostype. Therefore it's best to copy an existing definition and modify it for your own use. Just be sure you don't omit something important. (The _CF_DIR_ prefix is described in Section 19.2.1.)
For network delivery via the
P=[IPC]delivery agent, the
A=equate is usually declared like this:A=IPC $h
The value in
$his the value returned by rule set 0's
$@operator and is usually the name of the host to which sendmail should connect. During delivery the sendmail program expands this hostname into a possible list of MX records.  It attempts delivery to each MX record. If all delivery attempts fail and if the V8
V) option (see Section 34.8.25, FallbackMXhost (V)) is set, delivery is attempted to that fallback host. In all cases, if there are no MX records, delivery is attempted to the A record instead.
 Unless the V8.8
F=0flag is set (see Section 30.8.1, F=0).
Beginning with V8 sendmail,
$h(possibly as returned by rule set 0) can be a colon-separated list of hosts. The sendmail program attempts to connect to each in turn, left to right:A=IPC
Here, it tries to connect to
hostAfirst. If that fails, it next tries
hostB, and so on. As usual, trying a host means trying its MX records first, or its A record if there are no MX records.
The host (as
$h) is usually the only argument given to
IPC. But, strictly speaking,
IPCcan accept three arguments, like this:A=IPC
port(third argument) is usually omitted and so defaults to 25. However, a port number can be included to force sendmail to connect on a different port.
To illustrate, consider the need to force mail to a gateway machine to be always delivered on a particular port. First, design a new delivery agent that uses
IPCfor transport.Mgateway, P=[IPC], ..., A=IPC gateway.domain $h
Here, any mail that selects the
gatewaydelivery agent is transported over the network (the
[IPC]) to the machine
gateway.domain. The port number is carried in
$h, which usually carries the hostname.
Next, design a rule in rule set 0 that selects this delivery agent:R$+ < @ $+ .gateway > $* $#gateway $@ 26 $: $1 < @ $2 .gateway> $3
This rule selects the
gatewaydelivery agent for any address that ends in
.gateway. The host part that is returned by the
$@is the port number to use. The
$:part (the address) is passed in the envelope. Note that the gateway also has to be listening on the same port for this to work.
In the event that you wish to carry the port number in a macro, you may do so by specifying the host with
$h. For example,Mgateway, P=[IPC], ..., A=IPC
$h $PR$+ < @ $+ .gateway > $* $#gateway $@
$2$: $1 < @ $2 .gateway> $3
Then sendmail can be run with the command-line argument-MP26
gatewaymail to go out on port 26.
$umacro is special in the
A=equate's field. If
$udoes not appear in the array, sendmail assumes the program in
P=equate speaks SMTP. Consequently, you should never use a
$uwhen defining mail delivery agents that speak SMTP. All agents that use
P=equate's field must use SMTP.
$udoes appear in the array, sendmail assumes that the program in
P=does not speak SMTP.
$uappears and the
F=mdelivery agent flag is also specified, then the argument containing
$uis repeated as many times as there are recipients. For example, a typical
uucpdelivery agent definition looks like this:Muucp, P=/bin/uux, F=
msDFMhuU, S=13, R=23, A=uux - -r $h!rmail (
$u) note note
In the above, the
mflag is set in the
F=equate's field, which tells sendmail that this delivery agent can deliver to multiple recipients simultaneously. The
$umacro is also included as one of the arguments specified by the
A=command-line array. Thus if mail is sent with this delivery agent to multiple recipients, say
joe, then the
($u)argument  is repeated three times, once for each recipient:
$uis used as part of a UUCP delivery agent's
F=Aarray, it should be parenthesized. This is what the uux(1) program expects.uux - -r $h!rmail (jim) (bill) (joe)
The default MIME character set(V8.7 and above)
C=equate (introduced with V8.7 sendmail) is used to define a default character set for use with the MIME
Content-Type:header (see Section 35.10.9, Content-Type:). If it is present, its value supersedes that of the
DefaultCharSetoption (see Section 34.8.14, DefaultCharSet).
Note that the
C=equate is examined only when the delivery agent is selected for a sender address.
When a mail message is converted from 8 to 7 bits (see the
8) option in Section 34.8.22, EightBitMode (8)), it is important that the result looks like a MIME message. V8.7 sendmail first outputs the following header (if one is not already present):MIME-Version: 1.0
Next, V8.7 sendmail looks for a
Content-Type:header (see Section 35.10.9). If none is found, the following is inserted, where
charsetis the value declared for the
C=equate of the sender's delivery agent:Content-Type: text/plain; charset=
If the argument to the
C=is missing, the following error is printed and the
agent_name: null charset
C=equate is undefined in your configuration file,
charsetdefaults to the value of the
DefaultCharSetoption. If both are undefined, the value for
Paths to directories for execution(V8.6 and above)
Ordinarily, whenever sendmail executes a program via the
progdelivery agent, it does so from within the sendmail queue directory. One unfortunate side effect of this behavior is that shell scripts written with the C-shell (and possibly other programs) may fail because they cannot stat(2) the current directory. To alleviate this problem, V8 sendmail has introduced the
D=delivery agent equate. This new equate allows you to specify a series of directories for sendmail to attempt to chdir(2) into before invoking the delivery program.
The form of the
D=equate looks like this:D=
D=is followed by a colon-separated series of directory pathnames. Before running the delivery program, sendmail tries to chdir(2) into each in turn, leftmost to rightmost, until it succeeds. If it does not succeed with any of the directories (perhaps because none of them exist), sendmail remains in its queue directory.
One recommended setting for the
D=equate is this:D=$z:/tmp
Here, sendmail first tries to chdir(2) into the directory defined by the
$zmacro (see Section 31.10.46, $z). That macro either contains the full pathname of the recipient's home directory or is NULL. If it is NULL or if the home directory is unavailable, the chdir(2) fails, and sendmail instead does a chdir(2) to the /tmp directory.
In using V8 sendmail's m4 configuration, the value given to
D=can be easily changed only for the
progdelivery agent, which defaults toD=$z:/
progit can be redefined by using LOCAL_SHELL_DIR, as, for example,define(`LOCAL_SHELL_DIR', `$z:/var/tmp')dnl MAILER(local)
Here, LOCAL_SHELL_DIR is given a new value before the
progdelivery agent is loaded (via the
For all other delivery agents you must first copy an existing delivery agent definition, then modify it as outlined in Section 30.3.1, "Tuning Without an Appropriate Keyword".
D=argument is missing, the following error is printed and the
agent_name: null working directory
The chdir(2) process can be traced with the
-d11.20debugging switch (see Section 37.5.46, -d11.20).
The end-of-line string(All versions)
The end-of-line characters are defined with the
E=equate as backslash-escaped control characters, such asE=\r\n
Prior to V8.8 the default end-of-line string, if the
E=field was missing, was the C language newline character,
\n.  Beginning with V8.8 sendmail, the default is
\nfor all but delivery agents that speak SMTP, in which case the default is
 On some NeXT computers (prior to OS version 2.0) the default E= terminator is
\r\n. This can cause serious problems when used with some non-TCP delivery agents like UUCP. If you have a system that does this, you can override that improper default with
In general, delivery agents that speak SMTP (those that lack a
A=argument array, should have their end-of-line field set to
E=\r\n(for a carriage return/line feed pair).  Delivery agents that do not speak SMTP (those that include a
A=argument array) should have their end-of-line field set to
E=\n(for a lone linefeed character).
 line feed is the same ASCII character as newline.
In using V8 sendmail's m4 configuration, the value given to
E=cannot be easily changed. It is supplied to the MAILER(smtp) delivery agents as
\r\nbut is left as the default
\nfor all others. If you need to change this value at the m4 level, you must first copy an existing delivery agent definition, then modify it as outlined in Section 30.3.1.
E=equate's argument is missing, the following error message is printed and the
agent_name: null end-of-line string
Flags describing a delivery agent's behavior(All versions)
F=equate is probably more fraught with peril than the others. The flags specified with
F=tell sendmail how the delivery agent will behave and what its needs will be. These flags are used in one or more of three ways:
First, if a header definition relies conditionally on a flag:H?
P?Return-Path: <$g> apply if P flag specified in F= equate.
and if that flag is listed as a part of the
F=equate:Mlocal, P=/bin/mail, F=rlsDFMmn
P, S=10, R=20, A=mail -d $u apply in header
then that header is included in all mail messages that are sent via this delivery agent.
Second, if a delivery agent needs a special command-line argument that sendmail can produce for it but requires that argument only under special circumstances, selected
F=flags can produce that result. For example, the
F=fflag specifies that the delivery agent needs a
-fcommand-line switch when it is forwarding network mail.
F=flags also tell sendmail how this particular delivery agent behaves. For example, it performs final delivery or requires uppercase preserved for usernames.
Many flags have special meaning to sendmail; others are strictly user-defined. All of the flags are detailed at the end of this chapter (Section 30.8, "Alphabetized F= Flags").
Note that whitespace characters cannot be used as flags. Also note that flags OR together (they are really just bits), so they can be declared separately, for clarity, as in the following:F=D, # include Date: header if not present F=F, # include From: header if not present F=7, # strip the hi bit when delivering
Or they can be declared all together, with no change in meaning or effect, like this:F=DF7,
Note that the argument following the
F=is optional, and an empty declaration is silently ignored. Also note that the comma can be used as a flag by prefixing it with a backslash.
188.8.131.52 m4 modification of F=
When using V8 sendmail's m4 configuration, you can modify various flags for inclusion with most delivery agents. As shown in Table 30.3 some modifications are made by appending the new flags to the original flags. Others are made by replacing a few flags with new ones and appending the result to the originals. For example, the following declaration:define(`LOCAL_MAILER_FLAGS', `f')dnl
results in these flags being defined for the
Table 30.3: m4 Modification of F= Equates define() Agent MAILER() Append to Replace CYRUS_MAILER_FLAGS cyrus cyrus
5@A CYRUS_MAILER_FLAGS cyrusbb cyrus
FAX_MAILER_FLAGS fax fax
LOCAL_MAILER_FLAGS local local
rmn LOCAL_SHELL_FLAGS prog local
eu MAIL11_MAILER_FLAGS mail11 mail11 nsFx PH_MAILER_FLAGS ph phquery
ehmu POP_MAILER_FLAGS pop pop
Penu PROCMAIL_MAILER_FLAGS procmail procmail
Shu SMTP_MAILER_FLAGS smtp smtp
SMTP_MAILER_FLAGS esmtp smtp
SMTP_MAILER_FLAGS smtp8 smtp
SMTP_MAILER_FLAGS relay smtp
USENET_MAILER_FLAGS usenet rlsDFMmn UUCP_MAILER_FLAGS uucp uucp
UUCP_MAILER_FLAGS uucp-old uucp
UUCP_MAILER_FLAGS suucp uucp
UUCP_MAILER_FLAGS uucp-new uucp
UUCP_MAILER_FLAGS uucp-dom uucp
UUCP_MAILER_FLAGS uucp-uudom uucp
To append to flags or to replace them, use the appropriate definition from the left-most column of the table and make sure your definition precedes the MAILER m4 command, for example,define(`SMTP_MAILER_FLAGS', `P')dnl first MAILER(smtp) second
If you reverse them, the define will be silently ignored.
Maximum line length(V8.1 and above)
L=equate is used to limit the length of text lines in the body of a mail message. If this equate is omitted and if the delivery agent has the obsolete
F=Lflag set (see Section 30.8.29, F=L), sendmail defaults to SMTPLINELIM (990) as defined in conf.h (see Section 18.8.43, SMTPLINELIM). If the
F=Lis clear (as it is in modern configuration files), sendmail defaults to 0. The
F=Lis honored for compatibility with older versions of sendmail that lack this
Limiting line length causes overly long lines to be split. When an output line is split, the text up to the split is first transmitted, followed by the
!character. After that the characters defined by the
E=equate are transmitted. A line may be split into two or more pieces. For example, consider the following text from the body of a mail message:The maximum line length for SMTP mail is 990 characters. A delivery agent speaks SMTP when the $u macro is omitted from the A= equate.
A delivery agent could limit line length to 20 characters with a declaration ofL=20
With that limit, the above text would be split during transmission into the following lines:The maximum line len! gth for SMTP mail is! 990 characters. But that length is o! nly enforced if the ! F=L flag is included in a delivery agent ! definition. A delive! ry agent speaks SMTP when the $u mac! ro is omitted from t! he A= equate.
Limiting the line length can find application with programs that can't handle long lines. A 40-character braille print-driving program might be one example.
If the argument to
L=is missing or if it evaluates to 0 or less, the maximum line limit is set to zero, in which case no limit is enforced.
In using V8 sendmail's m4 configuration, the default for the
smtp8delivery agents is 990. The default for the
relaydelivery agent is 2040. The default for all other delivery agents is 0. To change the default at the m4 level, copy an existing delivery agent definition and modify it as outlined in Section 30.3.1.
Maximum message size(All versions)
nbytesis the ASCII representation of an integer that specifies the largest size in bytes that can be transmitted. If
nbytesis missing, or if the entire
M=equate is missing,
nbytesbecomes zero. If the value is zero, no checking is done for a maximum.
If the size of the message exceeds the limit specified, an error message is returned (bounced) that looks like this:--- Transcript of session follows --- 552 <
recipient>... Message is too large;
Bounced mail includes only a copy of the headers. The body is specifically not bounced. The DSN status is set to 5.2.3 (see RFC1893).
This equate is usually used with UUCP agents, where the cost of telephone connections is of concern. It may also find application in mail to files, where disk space is limited.
Prior to V8 sendmail, care had to be used to avoid setting
M=to a non-zero value when the delivery agent had the
F=eflag set. That flag tells sendmail that the delivery agent is expensive. If the
coption is also set, expensive mail is queued rather than delivered. A problem arose because the size of the message was ignored when it was delivered from the queue, so no queued messages were ever bounced for exceeding the
M=limit. This bug is fixed in V8 sendmail.
184.108.40.206 m4 modifications of M=
In using V8 sendmail's m4 configuration, the maximum message size can be changed by using the definitions listed in the leftmost column of Table 30.4.
Table 30.4: m4 Modification of M= Equates define() Agent MAILER() Default M= CYRUS_MAILER_MAX cyrus cyrus 0 CYRUS_MAILER_MAX cyrusbb cyrus 0 FAX_MAILER_MAX fax fax 100000 LOCAL_MAILER_MAX local local 0 LOCAL_MAILER_MAX prog local 0 none mail11 mail11 0 none ph phquery 0 none pop pop 0 PROCMAIL_MAILER_MAX procmail procmail 0 SMTP_MAILER_MAX smtp smtp 0 SMTP_MAILER_MAX esmtp smtp 0 SMTP_MAILER_MAX smtp8 smtp 0 none relay smtp 0 USENET_MAILER_MAX usenet usenet 0 UUCP_MAILER_MAX uucp uucp 100000 UUCP_MAILER_MAX uucp-old uucp 100000 UUCP_MAILER_MAX suucp uucp 100000 UUCP_MAILER_MAX uucp-new uucp 100000 UUCP_MAILER_MAX uucp-dom uucp 100000 UUCP_MAILER_MAX uucp-uudom uucp 100000
To change a maximum size, place your definition before the MAILER command in your
mcfile. For example, here is one way to increase the limit on UUCP traffic to a more reasonable one million:define(`UUCP_MAILER_MAX', `1000000')dnl MAILER(`uucp')
To change the limit for agents that lack a definition, copy an existing delivery agent definition, then modify it as outlined in Section 30.3.1.
How to nice(3) the agent(V8.7 and above)
The form for the
N=equate looks like this:N=
incris a signed integer expression that will adjust the "niceness" up or down. If
incris zero or missing, the niceness of the delivery agent is unchanged. Positive numbers reduce system priority. Negative numbers increase it.
One possible application for the
N=equate might be with Usenet news. Because news seldom needs to flow as quickly as normal email, its delivery agent (
usenet) can be forced to run at a low system priority:Musenet, P=/usr/lib/news/inews, F=rlsDFMmn, M=10000,
N=10,A=inews -m -h -n
To change the niceness at the m4 level, copy an existing delivery agent definition and modify it as outlined in Section 30.3.1.
Path to the delivery agent(All versions)
pathis missing, sendmail will print the following error message and set
agent_name: empty path name
pathcan also be one of three names that are defined internally to sendmail. Those internally defined names are
[IPC], which tells sendmail to forward mail over a kernel-supported (usually TCP/IP) network;
[FILE], which tells sendmail to deliver to a file; and
[LPC], which is used for debugging.
pathbegins with a slash character (when it is a full pathname), sendmail first forks (creates a copy of itself), and then the child process (the copy) execs (replaces itself with) the program. The argument vector (argv, or command-line arguments) supplied to the program is specified by the
A=equate (see Section 30.4.1). The program inherits the environment  of sendmail and has its standard input and output connected to the parent process (the sendmail that forked). The message (header and body) is fed to the program through its standard input. The envelope (sender and recipient addresses) may or may not be provided on the command line, depending on the nature of the program as defined by its
F=flags. If the
A=does not include the
$umacro, then sendmail will speak SMTP on standard I/O with the program.
 In most versions of sendmail the environment is stripped for security. V8 passes only TZ=, AGENT=, and (beginning with V8.7) the environmental variables specified with the
Econfiguration command (see Section 22.2.1, "The E Configuration Command").
The special internal name
[IPC]specifies that sendmail is to make a network connection to the recipient host and that it should talk SMTP to that host. Most current versions of sendmail allow the name
[TCP] to be a synonym for
[IPC]should be used when portability is of concern. The
$umacro should never be included in the
A=for this internal name.
 Originally, IPC meant "interprocessor communications," not "interprocess communications" as it does today. Some vendors have made TCP a synonym, thinking that it was more descriptive of the TCP/IP network mechanism. That may be a mistake on their part, because sendmail can interface to other network protocols such as XNS and OSI.
Beginning with V8 sendmail, the internal name
[FILE]specifies that delivery will be made by appending the message to a file. This name is intended for use by the
*file*delivery agent (see Section 30.5, "Internally Defined Names").
[FILE]can be useful for designing a custom delivery agent whose purpose is to append to files (perhaps coupled with the
U=equate, Section 30.4.13, to force particular ownership of the file).
The special internal name
[LPC](for local person communication) causes sendmail to run in a sort of debugging mode. In this mode the mail message is sent to the sendmail program's standard input, and replies are read (in the case of SMTP) from its standard output; you act as the SMTP server.
[LPC]mode can be very helpful in tracking down mail problems. Consider the mystery of duplicate five-character "
From" header lines that appear at the beginning of a mail message when mail is sent with UUCP. To solve the mystery, make a copy of your sendmail.cf file and change the
P=for the UUCP delivery agent to
[LPC]in that copy:Muucp, P=/usr/bin/uux, F=msDFMhuU, S=13, R=23, A=uux - -r $h!rmail ($u) change to Muucp, P=[LPC], F=msDFMhuU, S=13, R=23, A=uux - -r $h!rmail ($u)
Then run sendmail by hand to see what it is sending to the uux program:%
copy.cfcommand-line argument causes sendmail to use the copy of the sendmail.cf file rather than the original. The
uucpaddressis the address of a recipient that would normally be sent via UUCP. The
messageshould contain only a
Subject:header line and a minimal body:Subject: test one line header a blank line This is a test. one line body
If sendmail prints the message with a five-character "
From" header line at the top, then you know that sendmail is the culprit.
220.127.116.11 m4 modifications of P=
In using V8 sendmail's m4 configuration technique, the
P=equate can be easily changed for all delivery agents by using the definitions in the leftmost column of Table 30.5.
Table 30.5: m4 Modification of P= Equates define() Agent MAILER() Default P= CYRUS_MAILER_PATH cyrus cyrus /usr/cyrus/bin/deliver CYRUS_MAILER_PATH cyrusbb cyrus /usr/cyrus/bin/deliver FAX_MAILER_PATH fax fax /usr/local/lib/fax/mailfax LOCAL_MAILER_PATH local local /bin/mail LOCAL_SHELL_PATH prog local /bin/sh MAIL11_MAILER_PATH mail11 mail11 /usr/etc/mail11 PH_MAILER_PATH ph phquery /usr/local/etc/phquery POP_MAILER_PATH pop pop /usr/lib/mh/spop PROCMAIL_PATH procmail procmail /usr/local/bin/procmail none smtp smtp [IPC] none esmtp smtp [IPC] none smtp8 smtp [IPC] none relay smtp [IPC] USENET_MAILER_PATH usenet usenet /usr/lib/news/inews UUCP_MAILER_PATH uucp uucp /usr/bin/uux UUCP_MAILER_PATH uucp-old uucp /usr/bin/uux UUCP_MAILER_PATH suucp uucp /usr/bin/uux UUCP_MAILER_PATH uucp-new uucp /usr/bin/uux UUCP_MAILER_PATH uucp-dom uucp /usr/bin/uux UUCP_MAILER_PATH uucp-uudom uucp /usr/bin/uux
In general, the default values given to these are automatically set when you include the appropriate OSTYPE() directive (see Section 20.3.1, addheader()).
Recipient Rewriting Set(All versions)
R=equate specifies a rule set to be used for processing all envelope- and header-recipient addresses for a specific delivery agent. Mail messages are always addressed to at least one recipient, but there may be more. The addresses of the recipients are given in the envelope and are usually repeated in the mail message's header. The envelope address is given to sendmail in one of three ways: as a command-line argument; as an SMTP RCPT command; or as
Bcc:headers (if the
-tcommand-line switch is given).  Figure 30.1 shows how the
R=rule set fits into the flow of addresses through rule sets.
-tswitch is intended for initial submissions only.
There are two forms for the
R=equate. One is the standard form, and the other is an enhanced alternative beginning with V8 sendmail:R=
rulesetlegal for all R=
eset/hsetlegal beginning with V8
In the first case,
rulesetspecifies the rule set to use in rewriting both headers and the envelope. If that value is zero or if the entire
R=equate is missing, no rule set is called.
In the second case, two rule sets may be specified.  One rule set is specific to the envelope, and the other is specific to headers. The envelope-specific rule set is the one to the left of the slash; the header-specific rule set is to the right (
R=eset/hset). If both values are missing, both default to zero. If only one is missing, the missing value defaults to the other value.
 This form was inspired by an identical form in IDA sendmail.
Either rule set may be specified by using names or numbers or both:R=Myset name R=12 number R=Myset=12 both
See Section 29.1, "The S Configuration Command" for a discussion of the various legal ways in which rule sets can be specified.
Macros may not be used in delivery agent rule-set specifications. That is,R=$X
will not give the expected result. Instead, sendmail will complain about a missing rule-set specification.
When using V8 sendmail's m4 configuration, you cannot change or specify
R=rule sets. If the need arises, however, you can copy an existing delivery agent definition and then modify it as outlined in Section 30.3.1.
Sender rewriting set(All versions)
S=equate specifies a rule set to be used for processing both envelope- and header-sender addresses. The sender's address is given in the envelope and generally repeated in the mail message's
From:header line.  The envelope address is given to sendmail in one of four ways: as a
-fcommand-line argument, as an SMTP
From:header, or derived from the identity of the user who ran the program (these latter two are used only during initial message submission). Figure 30.1 shows how the
S=rule set fits into the flow of addresses through rule sets.
 It is not unusual for these to differ. For example, mail that has been passed through a mailing list exploder may show one address in the envelope and another in the
There are two forms for the
S=equate. One is the standard form, and the other is an enhanced alternative beginning with V8 sendmail:S=
rulesetlegal for all S=
eset/hsetlegal beginning with V8
The first case specifies a rule set (
ruleset) that will process both recipient and header addresses. If
rulesetis zero or if the entire
S=equate is missing, no rule set is called.
In the second case, one rule set is specific to the envelope, and the other is specific to headers. The envelope-specific rule is the one to the left of the slash; the header-specific rule is the one to the right (
S=eset/hset). If both values are both missing, no sender
S=processing is done. If only one is missing, the missing value defaults to become the other value. (See Chapter 29, Rule Sets, for a description of possible errors and how the new V8.7 symbolic rule set names can be used.)
Either rule set may be specified using names or numbers or both:S=Myset name S=12 number S=Myset=12 both
See Section 29.1 for a discussion of the various legal ways rule sets can be specified.
Macros may not be used in delivery agent rule set specifications. That is,S=$X
will not give the expected result. Instead, sendmail will complain about a missing rule set specification.
When using V8 sendmail's m4 configuration, you cannot change or specify
S=rule sets. If the need arises, however, you can copy an existing delivery agent definition, then modify it as outlined in Section 30.3.1.
Types for DSN diagnostics(V8.7 and above)
Beginning with V8.7 sendmail, notification of successful, deferred, or failed delivery is now determined by Delivery Status Notification (DSN, see RFC1891). The
T=equate provides three pieces of required information to DSN. The pieces are separated by the slash character:T=
The first piece, the
mta-type, is later supplied to the
Reporting-MTA:DSN header, as its first argument:Reporting-MTA: dns; here.us.edu mta-type here
The second piece, the
addr-type, is later supplied to the
Final-Recipient:DSN header, as its first argument:Final-Recipient: rfc822; firstname.lastname@example.org addr-type here
The third piece, the
diag-type, is later supplied to the
Diagnostic-Code:DSN header, as its first argument:Diagnostic-Code: smtp; 550 <email@example.com>... User unknown diag-type here
P=for a delivery agent is
[TCP], an undeclared
dns, an undeclared
rfc822, and an undeclared
smtp. For any other
P=the default for an undeclared entry is NULL.
In configuring with the m4 technique, the declarations of the
T=equates areT=X-Unix cyrus and prog (equivalent to X-Unix/X-Unix/X-Unix) T=X-Phone/X-FAX/X-Unix fax T=DNS/RFC822/X-Unix local, pop, and procmail T=DNS/RFC822/SMTP all SMTP agents T=X-Usenet/X-Usenet/X-Unix Usenet T=X-UUCP/X-UUCP/X-Unix all UUCP agents
You cannot change these
T=defaults. If the need arises, you can, however, copy an existing delivery agent definition and then modify it as outlined in Section 30.3.1.
Run agent as uid:gid(V8.7 and above)
Prior to V8.7 the user and group identities under which sendmail ran were defined by an elaborate set of properties (described under the
F=Sflag in Section 30.8.40, F=S). Beginning with V8.7, sendmail now offers the
U=equate as the means to define those identities. If the
U=equate is specified, it sets the default user and group identities for the delivery agent and always overrides the values of the
g) option (see Section 34.8.15, DefaultUser (g)(u)). If the
F=Sflag is not set, any controlling user will override this
U=equate. If the
F=Sflag is set, this
U=equate is absolute, overriding everything, including any controlling user.
The form of the
U=equate looks like this:U=
useris the alphanumeric identity of a user on the local system. If
useris found in the local passwd(5) file, the numeric uid from that file becomes the value used. Otherwise,
user, which must be fully numeric, becomes the value used.
The colon,  if present, is followed by the alphanumeric identity of a group on the local system. If the
groupis found in the local group(5) file, the numeric gid from that file is used. Otherwise,
group, which must be fully numeric, becomes the value used. If the colon and group are missing or if the
userwas found in the passwd(5) file, the value is taken from the gid field of the passwd(5) file.
 A colon is used because the POSIX standard allows login names to contain a dot.
In using V8 sendmail's m4 configuration, no
U=equate is specified for any delivery agent. You cannot add a
U=equate with the m4 technique. If the need arises, however, you can copy an existing delivery agent definition and then modify it as outlined in Section 30.3, "m4 Configuration Syntax".