Contains the configuration information for the sendmail command.
The /etc/sendmail.cf configuration file contains the configuration information for the sendmail command. Information contained in this file includes such items as the host name and domain, and the sendmail rule sets.
If your environment includes only these types of mail delivery, you can use the supplied /etc/sendmail.cf file with few, if any, changes.
The /etc/sendmail.cf file consists of a series of control lines, each of which begins with a single character defining how the rest of the line is used. Lines beginning with a space or a tab are continuation lines. Blank lines and lines beginning with a # (pound sign) are comments. Control lines are used for defining:
Each of these control line types are discussed in detail below.
The sendmail command receives addresses in a number of different formats because different mailers use different formats to deliver mail messages. The sendmail command changes the addresses to the format needed to route the message for the mailer program being used. To perform this translation, the sendmail command uses a set of rewrite rules, or rule sets, that are defined in the /etc/sendmail.cf configuration file. Rewrite rules have the following format:
Snumber Rbefore after
where number is a integer greater than or equal to zero indicating which ruleset this is, and before and after are symbolic expressions representing a particular pattern of characters. The line beginning with R means "Rewrite the expression before so that it has the same format as the expression after." Sendmail scans through the set of rewrite rules looking for a match on the left-hand side (LHS) of the rule. When a rule matches, the address is replaced by the right-hand side (RHS) of the rule.
Note: There must be at least one TAB character (ASCII code 0x09) between the before and after sections of the /etc/sendmail.cf file. For this reason, any editor that translates TAB characters into a series of spaces (ASCII code 0x20) may not be used to edit the /etc/sendmail.cf file. For example, the GNU eMacs editor can corrupt the sendmail.cf file, but the vi editor does not.
The /etc/sendmail.cf file installed with the sendmail command contains enough rules to perform the translation for BNU and TCP/IP networks using a domain address structure. You should not have to change these rules unless connecting to a system that uses a different addressing scheme.
Macro expansions of the form $x are performed when the configuration file is read. Expansions of the form $&x are performed at run time, using a somewhat less general algorithm. This form is intended only for referencing internally defined macros such as $h that are changed at runtime.
The left-hand side of rewrite rules contains a pattern. Normal words are simply matched directly. Metasyntax is introduced using a dollar sign. The metasymbols are:
$* | Match zero or more tokens |
$+ | Match one or more tokens |
$- | Match exactly one token |
$=x | Match any phrase in class x |
$~x | Match any word not in class x |
If any of these match, they are assigned to the symbol $n for replacement on the right-hand side, where n is the index in the LHS. For example, if the LHS:
$-:$+
UCBARPA:linda
the rule will match, and the values passed to the RHS will be:
$1 UCBARPA $2 linda
When the left-hand side of a rewrite rule matches, the input is deleted and replaced by the right-hand side. Tokens are copied directly from the RHS unless they begin with a dollar sign. Metasymbols are:
The $n syntax substitutes the corresponding value from a $+, $-, $*, $=, or $~ match on the LHS. It may be used anywhere.
A host name enclosed between $[ and $] is looked up in the host database(s) and replaced by the canonical name. For example, $[merlin]" might become "merlin.magician" and "$[[128.32.130.2]$]" would become "king.arthur."
The $( ... $) syntax is a more general form of lookup; it uses a named map instead of an implicit map. If no lookup is found, the indicated default is inserted; if no default is specified and no lookup matches, the value is left unchanged. The arguments are passed to the map for possible use.
The $>n syntax causes the remainder of the line to be substituted as usual and then passed as the argument to ruleset n. The final value of ruleset n then becomes the substitution for this rule. The $> syntax can only be used at the beginning of the right hand side; it can be only be preceded by $@ or $:.
The $# syntax should only be used in ruleset zero or a subroutine of ruleset zero. It causes evaluation of the ruleset to terminate immediately, and signals to sendmail that the address has completely resolved. The complete syntax is:
$#mailer $@host $:user
This specifies the {mailer, host, user} 3-tuple necessary to direct the mailer. If the mailer is local, the host part may be omitted. The mailer must be a single word, but the host and user may be multi-part. If the mailer is the builtin IPC mailer, the host may be a colon-separated list of hosts that are searched in order for the first working address, exactly like MX (machine exchange) records. The user is later rewritten by the mailer-specific envelope rewrite set and assigned to the $u macro. As a special case, if the value to $# is "local" and the first character of the $: value is "@", the "@" is stripped off, and a flag is set in the address descriptor that causes sendmail to not do ruleset 5 processing.
Normally, a rule that matches is retried, that is, the rule loops until it fails. An RHS may also be preceded by a $@ or a $: to change this behavior. A $@ prefix causes the ruleset to return with the remainder of the RHS as the value. A $: prefix causes the rule to terminate immediately, but the ruleset to continue; this can be used to avoid continued application of a rule. The prefix is stripped before continuing.
The $@ and $: prefixes may precede a $> spec. For example:
R$+ $: $>7 $1
matches anything, passes that to ruleset seven, and continues; the $: is necessary to avoid an infinite loop.
Substitution occurs in the order described; that is, parameters from the LHS are substituted, hostnames are canonicalized, "subroutines" are called, and finally $#, $@, and $: are processed.
There are five rewrite sets that have specific semantics.
Ruleset three should turn the address into "canonical form." This form should have the basic syntax:
local-part@host-domain-spec
Ruleset three is applied by sendmail before doing anything with any address.
If no "@" sign is specified, then the host-domain-spec may be appended (box "D" in "Rewrite Set Semantics") from the sender address (if the C flag is set in the mailer definition corresponding to the sending mailer).
Ruleset zero is applied after ruleset three to addresses that are going to actually specify recipients. It must resolve to a {mailer, host, user} triple. The mailer must be defined in the mailer definitions from the configuration file. The host is defined into the $h macro for use in the argv expansion of the specified mailer.
Some special processing occurs if the ruleset zero resolves to an IPC mailer (that is, a mailer that has "[IPC]" listed as the Path in the M configuration line. The host name passed after "$@" has MX expansion performed; this looks the name up in DNS to find alternate delivery sites.
The host name can also be provided as a dotted quad in square brackets; for example:
[128.32.149.78]
This causes direct conversion of the numeric value to a TCP/IP host address.
The host name passed in after the "$@" may also be a colon-separated list of hosts. Each is separately MX expanded and the results are concatenated to make (essentially) one long MX list. The intent here is to create "fake" MX records that are not published in DNS for private internal networks.
As a final special case, the host name can be passed in as a text string in square brackets:
[any.internet.addr]
This form avoids the MX mapping if the F=0 flag is set for the selected delivery agent.
Note: This is intended only for situations where you have a network firewall (a system or machine that controls the access between outside networks and private networks) or other host that will do special processing for all your mail, so that your MX record points to a gateway machine. This machine could then do direct delivery to machines within your local domain. Use of this feature directly violates RFC 1123 section 5.3.5: it should not be used lightly.
Macros in the /etc/sendmail.cf file are interpreted by the sendmail command. A macro is a symbol that represents a value or string. A macro is defined by a D command in the /etc/sendmail.cf file.
Macros are named with a single character or with a word in {braces}. Single-character names may be selected from the entire ASCII set, but user-defined macros should be selected from the set of uppercase letters only. Lowercase letters and special symbols are used internally. Long names beginning with a lowercase letter or a punctuation character are reserved for use by sendmail, so user-defined long macro names should begin with an uppercase letter.
The syntax for macro definitions is:
Dxval
where x is the name of the macro (which may be a single character or a word in braces) and val is the value it should have. There should be no spaces given that do not actually belong in the macro value.
Macros are interpolated using the construct $x, where x is the name of the macro to be interpolated. This interpolation is done when the configuration file is read, except in M lines. The special construct $&x can be used in R lines to get deferred interpolation.
Conditionals can be specified using the syntax:
$?x text1 $| text2 $.
This interpolates text1 if the macro $x is set, and text2 otherwise. The "else" ($|) clause may be omitted.
Lowercase macro names are reserved to have special semantics, used to pass information in or out of sendmail, and special characters are reserved to provide conditionals, and so on. Uppercase names (that is, $A through $Z) are specifically reserved for configuration file authors.
The following macros are defined and/or used internally by sendmail for interpolation into argv's for mailers or for other contexts. The ones marked - are information passed into sendmail, the ones marked = are information passed both in and out of sendmail, and the unmarked macros are passed out of sendmail but are not otherwise used internally. AIX Version 4.2 specifically defines the following macros:
$_ | RFC1413-validation & IP source route (V8.1 and above). |
$a | The origin date in RFC822 format. |
$b | The current date in RFC822 format. |
$(bodytype) | The ESMTP BODY parameter. |
$B | The BITMAP relay. |
$c | The hop count. |
$(client_addr) | The connecting host's IP address. |
$(client_name) | The connecting host's canonical name. |
$(client_port) | The connecting host's port name. |
$C | The hostname of the DECnet relay (m4 technique). |
$d | The current date in UNIX (ctime)(3) format. |
$e | SMTP greeting message (V8.8 and earlier). |
$(envid) | The original DSN envelope ID (V8.8 and above). |
$E | X400 relay (unused) (m4 technique). |
$f | The sender's address. |
$F | FAX relay (m4 technique). |
$g | The sender's address relative to the recipient. |
$h | Host part of the recipient address. |
$H | The mail hub (m4 technique). |
$i | The queue identifier. |
$j= | The official canonical name. |
$k | The UUCP node name (V8.1 and above). |
$l | Unix From format (V8.6 and earlier). |
$L | Local user relay (m4 technique). |
$m | The DNS domain name (V8.1 and above). |
$M | Who we are masquerading as (m4 technique). |
$n | The error messages sender. |
$o | Token separation characters (V8.6 and earlier). |
$opMode | The startup operating mode (V8.7 and above). |
$p | The sendmail process id. |
$q- | Default form of the sender address (V8.6 and earlier). |
$r | The protocol used. |
$R | The relay for unqualified names (m4 technique). |
$s | The sender's host name. |
$S | The Smart host (m4 technique). |
$t | Current time in seconds. |
$u | The recipient's username. |
$U | The UUCP name to override $k. |
$v | The sendmail program's version. |
$V | The UUCP relay (for class $=V) (m4 technique). |
$w | The short name of this host. |
$W | The UUCP relay (for class $=W) (m4 technique). |
$x | The full name of the sender. |
$X | The UUCP relay (for class $=X) (m4 technique). |
$y | The home directory of the recipient. |
$z | The name of the controlling TTY. |
$Y | The UUCP relay for unclassified hosts. |
$z | The recipient's home directory. |
$Z | The version of this m4 configuration (m4 technique). |
There are three types of dates that can be used. The $a and $b macros are in RFC 822 format; $a is the time as extracted from the "Date:" line of the message (if there was one), and $b is the current date and time (used for postmarks). If no "Date:" line is found in the incoming message, $a is set to the current time also. The $d macro is equivalent to the $b macro in UNIX (ctime) format. The $t macro is the current time in seconds.
The macros $w, $j, and $m are set to the identity of this host. Sendmail tries to find the fully qualified name of the host if at all possible; it does this by calling gethostname(2) to get the current hostname and then passing that to gethostbyname(3) which is supposed to return the canonical version of that host name. Assuming this is successful, $j is set to the fully qualified name, and $m is set to the domain part of the name (everything after the first dot). The $w macro is set to the first word (everything before the first dot) if you have a level 5 or higher configuration file; otherwise, it is set to the same value as $j. If the canonification is not successful, it is imperative that the config file set $j to the fully qualified domain name.
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 a user sends to king@castle.com from the machine vangogh.painter.com, the $f macro will be vincent and the $g macro will be vincent@vangogh.painter.com.
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 rewrite rules, respectively.
The $p and $t macros are used to create unique strings (for example, 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 useful for tracking messages. The $v macro is set to be the version number of sendmail; this is normally put in timestamps and has been proven useful for debugging.
The $c field is set to the "hop count," that is, the number of times this message has been processed. 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 sending 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 compliant 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 connecting host who is invoking sendmail as a server. These can be used in the check_* rulesets (using the $& deferred evaluation form).
Note: This function is available in AIX Version 3.2.5 and AIX Version 4.1 only.
The domain name macro, DD, specifies the full domain name of your local group of hosts. The format of the domain name macro is DD followed by, at most, four period-separated names, for example:
DDname1.name2.name3.name4
This macro can be set automatically through the hostname command. The sendmail command reads what has been set with the hostname command and uses it to initialize the host and domain macros and classes. The configuration file macros only need to be changed if you want the sendmail host and domain names to be different from those set by the hostname command.
To change the domain name macro:
vi /etc/sendmail.cf
DDnewyork.abc.com
The host name macro, Dw, specifies the name of your host system used in the return address of all messages you generate. The format of the host name macro is Dw followed by the hostname of this machine, for example:
Dwhostname
By default, the sendmail command reads what has been set with the hostname command and uses it to initialize the host and domain name macros and classes. Change the configuration file macros only if you want the sendmail command host and domain names to be different from those set by the hostname command.
To change the host name macro:
vi /etc/sendmail.cf
Dwbrown
Note: If the Dw macro is defined, you must also define the CW (hostname) class.
The revision-level Z macro tracks changes you make to the /etc/sendmail.cf file. When you make a change to the /etc/sendmail.cf file, change the value of this macro to show your new version level. You can use any format you wish for the number. For example, if you want the revision-level to be 3.1, make the following entry in the /etc/sendmail.cf file:
DZ3.1
or, use a text string for this macro:
DZthree_one
The following is a list of the control lines you may want to configure:
Note: These control lines are available for customization in AIX Version 3.2.5 and AIX Version 4.1 only.
Before you modify the /etc/sendmail.cf file, make a backup copy. Do this by executing the following command:
cp /etc/sendmail.cf /etc/sendmail.cf.working
If the changes you make cause the mail system not to work properly, you can return to using a copy of the /etc/sendmail.cf file that you know works.
You can modify the /etc/sendmail.cf file by using your favorite text editor. However, some editors store tabs as the number of spaces they represent, not the tab character itself. This can cause unexpected results if the tab character is defined as the field-separator character in rule sets. Use the vi editor to avoid this problem, or change the field-separator character with the J option. (For ease of reference, this discussion assumes you use the vi editor to modify the /etc/sendmail.cf file.)
After changing any information in the /etc/sendmail.cf file, you must compile the file into a database format that the sendmail command can read. See the next section, "Compiling the sendmail.cf File."
Note: This function is available in AIX Version 3.2.5 and AIX Version 4.1 only.
To compile the /etc/sendmail.cf file into a database format that the sendmail command can read, enter the command:
/usr/sbin/sendmail -bz
This creates the file /etc/sendmail.cfDB. The /etc/sendmail.cfDB file contains the database version of the configuration information. If you want the changes to take effect immediately, make the sendmail daemon reread the configuration information.
After you have made changes to the sendmail.cf file, instruct the daemon to reread the file. If you started the sendmail command using the startsrc command, enter the command:
refresh -s sendmail
Or, if you started the sendmail daemon using the /usr/sbin/sendmail command, enter the command:
kill -1 `cat /etc/sendmail.pid`
Both of these commands cause the daemon to reread the /etc/sendmail.cf file, the /etc/aliases file, and the /etc/sendmail.nl file.
The alias database exists in two forms. One is a text form, maintained in the file /etc/aliases. The aliases are of the form:
name: name1, name2, ...
Only local names may be aliased. For example:
linda@cloud.ai.acme.org: linda@CS.
will not have the desired effect. Aliases may be continued by starting any continuation lines with a space or a tab. Blank lines and lines beginning with a pound sign (#) are comments.
The second form is processed by the ndbm or db library. This is the form that sendmail actually uses to resolve aliases. This technique is used to improve performance. This form is in the files:
/etc/aliases.dir and /etc/aliases.pag | For AIX Version 4.2 or later. |
/etc/aliasesDB/DB.dir and /etc/aliasesDB/DB.pag | For AIX Version 3.2.5 and AIX Version 4.1. only. |
Beginning with AIX Version 4.2, the control of search order is actually set by the service switch. The entry
OAswitch:aliases
is always added as the first alias entry. Also, the first alias file name without a class (for example, without "nis:" on the front) will be used as the name of the file for a "files" entry in the aliases switch. For example, if the configuration file contains:
OA/etc/aliases
and the service switch contains:
aliases nis files
aliases will first be searched in the NIS database, then in /etc/aliases.
The DB or DBM version of the database may be rebuilt explicitly by executing the command:
newaliases
This is equivalent to giving sendmail the -bi flag:
/usr/sbin/sendmail -bi
If the RebuildAliases (old D) option is specified in the configuration, sendmail will rebuild the alias database automatically if possible when it is out of date. Auto-rebuild can be dangerous on heavily loaded machines with large alias files. If it might take more than the rebuild timeout (option AliasWait, old a, which is normally five minutes) to rebuild the database, there is a chance that several processes will start the rebuild process simultaneously.
If you have multiple aliases databases specified, the -bi flag rebuilds all the database types. II understands, for example, it can rebuild NDBM databases, but not NIS databases.
There are a number of problems that can occur with the alias database. They all result from a sendmail process accessing the DBM version while it is only partially built. This can happen under two circumstances: One process accesses the database while another process is rebuilding it, or the process rebuilding the database dies (due to being killed or a system crash) before completing the rebuild.
Sendmail has three techniques to try to relieve these problems. First, it ignores interrupts while rebuilding the database; this avoids the problem of someone aborting the process leaving a partially rebuilt database. Second, it locks the database source file during the rebuild, but that may not work over NFS or if the file is unwritable. Third, at the end of the rebuild, it adds an alias of the form:
@: @
(which is not normally legal). Before sendmail will access the database, it checks to ensure that this entry exists.
If an error occurs on sending to a certain address, for example,"x", sendmail will look for an alias of the form "owner-x" to receive the errors. This is typically useful for a mailing list where the submitter of the list has no control over the maintenance of the list itself. In this case, the list maintainer would be the owner of the list. For example:
unix-wizards: linda@paintbox, wnj@monet, nosuchuser, sam@matisse owner-unix-wizards: unix-wizards-request unix-wizards-request: linda@paintbox
would cause linda@paintbox to get the error that will occur when someone sends to unix-wizards due to the inclusion of nosuchuser on the list.
List owners also cause the envelope sender address to be modified. The contents of the owner alias are used if they point to a single user. Otherwise, the name of the alias itself is used. For this reason, and to conform to Internet conventions, the "owner-" address normally points at the "-request" address; this causes messages to go out with the typical Internet convention of using "list-request" as the return address.
As an alternative to the alias database, users may put a file with the name ".forward" in their home directory. If this file exists, sendmail redirects mail for that user to the list of addresses listed in the .forward file. For example, if the home directory for user "kenly" has a .forward file with contents:
kenly@ernie joel@renoir
then any mail arriving for "kenly" will be redirected to the specified accounts.
Actually, the configuration file defines a sequence of filenames to check. By default, this is the user's .forward file, but can be defined to be more general using the J option. If you change this, you will have to inform your user base of the change.
Beginning with AIX Version 4.2, UCB sendmail 8.7 supports the IDENT protocol as defined in RFC 1413. Although this enhances identification of the author of an e-mail message by doing a ``callback'' to the originating system to include the owner of a particular TCP connection in the audit trail, it is in no sense perfect; a determined forger can easily violate the security of the IDENT protocol.
Note: The AIX operating system does not support the IDENT protocol. The IDENT timeout is set to zero (0) in the /etc/sendmail.cf file to disable IDENT. Modify your sendmail.cf file and set IDENT timeout if you wish to enable IDENT.
The following description is excerpted from RFC 1413:
The information returned by this protocol is at most as trustworthy as the host providing it OR the organization operating the host. For example, a PC in an open lab has few if any controls on it to prevent a user from having this protocol return any identifier the user wants. Likewise, if the host has been compromised the information returned may be completely erroneous and misleading.
The Identification Protocol is not intended as an authorization or access control protocol. At best, it provides some additional auditing information with respect to TCP connections. At worst, it can provide misleading, incorrect, or maliciously incorrect information.
The use of the information returned by this protocol for other than auditing is strongly discouraged. Specifically, using Identification Protocol information to make access control decisions, either as the primary method (that is, no other checks) or as an adjunct to other methods may result in a weakening of normal host security.
An Identification server may reveal information about users, entities, objects or processes which might normally be considered private. An Identification server provides service which is a rough analog of the CallerID services provided by some phone companies and many of the same privacy considerations and arguments that apply to the CallerID service apply to Identification. If you wouldn't run a "finger" server due to privacy considerations you may not want to run this protocol.
Beginning with AIX Version 4.2, there are a number of configuration parameters you may want to change, depending on the requirements of your site. Most of these are set using an option in sendmail.cf. For example,the line "O Time-out.queuereturn=5d" sets option "Timeout.queuereturn" to the value "5d" (five days).
Most of these options have appropriate defaults for most sites. However, sites having very high mail loads may find they need to tune them as appropriate for their mail load. In particular, sites experiencing a large number of small messages, many of which are delivered to many recipients, may find that they need to adjust the parameters dealing with queue priorities.
All versions of sendmail prior to version 8.7 had single-character option names. As of version 8.7, options have long (multi-character) names. Although old short names are still accepted, most new options do not have short equivalents.
This section only describes the options you are most likely to want to tweak; read <<add pointer to section 5 here>> for more details.
All time intervals are set using a scaled syntax. For example, "10m" represents ten minutes, whereas "2h30m" represents two and a half hours. The full set of scales is:
s | seconds |
m | minutes |
h | hours |
d | days |
w | weeks |
Beginning with AIX Version 4.2, timeouts all have option names "Time-out.suboption". The recognized suboptions, their default values, and the minimum values allowed by RFC 1123 section 5.3.2 are :
For compatibility with old configuration files, if no suboption is specified, all the timeouts marked with - are set to the indicated value.
The sendmail command process can produce many types of timeouts. The time values for the different timeouts can be changed in the /etc/sendmail.cf file. You can set the timeout options for:
After sitting in the queue for a few days, a message will time out. This is to ensure that at least the sender is aware of the inability to send a message. The timeout is typically set to five days. It is sometimes considered convenient to also send a warning message if the message is in the queue longer than a few hours (assuming you normally have good connectivity; if your messages normally took several hours to send, you would not want to do this because it would not be an unusual event). These timeouts are set using the Timeout.queuereturn and Timeout.queuewarn options in the configuration file (previously both were set using the T option).
Since these options are global, and since you cannot know how long another host outside your domain will be down, a five-day timeout is recommended. This allows a recipient to fix the problem even if it occurs at the beginning of a long weekend. RFC 1123 section 5.3.1.1 says that this parameter should be``at least 4-5 days''.
The Timeout.queuewarn value can be piggybacked on the T option by indicating a time after which a warning message should be sent; the two timeouts are separated by a slash. For example, the line:
OT5d/4h
causes e-mail to fail after five days, but a warning message will be sent after four hours. This should be large enough that the message will have been tried several times.
The argument to the -q flag specifies how often a subdaemon will run the queue. This is typically set to between fifteen minutes and one hour. RFC 1123, section 5.3.1.1 recommends this be at least 30 minutes.
By setting the ForkEachJob (Y) option, sendmail will fork before each individual message while running the queue. This will prevent sendmail from consuming large amounts of memory, so it may be useful in memory-poor environments. However, if the ForkEachJob option is not set, sendmail will keep track of hosts that are down during a queue run, which can improve performance dramatically.
If the ForkEachJob option is set, sendmail cannot use connection caching.
Every message is assigned a priority when it is first instantiated, consisting of the message size (in bytes) offset by the message class (which is determined from the Precedence: header) times the "work class factor"and the number of recipients times the "work recipient factor." The priority is used to order the queue. Higher numbers for the priority mean that the message will be processed later when running the queue.
The message size is included so that large messages are penalized relative to small messages. The message class allows users to send "high priority" messages by including a "Precedence:" field in their message; the value of this field is looked up in the P lines of the configuration file. Since the number of recipients affects the amount of load a message presents to the system, this is also included into the priority.
The recipient and class factors can be set in the configuration file using the RecipientFactor (y) and ClassFactor (z) options respectively. They default to 30000 (for the recipient factor) and 1800 (for the class factor). The initial priority is:
pri = msgsize - (class times bold ClassFactor) + (nrcpt times bold RecipientFactor)
(Remember that higher values for this parameter actually mean that the job will be treated with lower priority.)
The priority of a job can also be adjusted each time it is processed (that is, each time an attempt is made to deliver it) using the "work time factor," set by the RetryFactor(Z) option. This is added to the priority, so it normally decreases the precedence of the job, on the grounds that jobs that have failed many times will tend to fail again in the future. The RetryFactor option defaults to 90000.
Sendmail can be asked to queue (but not deliver) mail if the system load average gets too high using the QueueLA (x) option. When the load average exceeds the value of the QueueLA option, the delivery mode is set to q (queue only) if the QueueFactor (q) option divided by the difference in the current load average and the QueueLA option plus one exceeds the priority of the message; that is, the message is queued if:
pri > { bold QueueFactor } over { LA - { bold QueueLA } + 1 }
The QueueFactor option defaults to 600000, so each point of load average is worth 600000 priority points (as described above).
For drastic cases, the RefuseLA (X) option defines a load average at which sendmail will refuse to accept network connections. Locally generated mail (including incoming UUCP mail) is still accepted.
There are a number of delivery modes that sendmail can operate in, set by the DeliveryMode (d) configuration option. These modes specify how quickly mail will be delivered. Legal modes are:
There are tradeoffs. Mode i gives the sender the quickest feedback, but may slow down some mailers and is hardly ever necessary. Mode b delivers promptly, but can cause large numbers of processes if you have a mailer that takes a long time to deliver a message. Mode q minimizes the load on your machine, but means that delivery may be delayed for up to the queue interval. Mode d is identical to mode q except that it also prevents all the early map lookups from working; it is intended for "dial on demand'' sites where DNS lookups might be very expensive. Some simple error messages (for example, host unknown during the SMTP protocol) will be delayed using this mode. Mode b is the default.
If you run in mode q (queue only), d (defer), or b (deliver in background), sendmail will not expand aliases and follow .forward files upon initial receipt of the mail. This speeds up the response to RCPT commands. Mode i cannot be used by the SMTP server.
The level of logging can be set for sendmail. The default using a standard configuration table is level 9. The levels for AIX Version 4.2 (or later) are as follows:
The following log levels apply to AIX Version 3.2.5 and AIX Version 4.1 only:
Additionally, values above 64 are reserved for extremely verbose debugging output.
The modes used for files depend on what functionality you want and the level of security you require.
The database that sendmail actually uses is represented by the following two files:
/etc/aliases.dir and /etc/aliases.pag | For AIX Version 4.2 or later. |
/etc/aliasesDB/DB.dir and /etc/aliasesDB/DB.pag | For AIX Version 3.2.5 and AIX Version 4.1. only. |
The mode on these files should match the mode of /etc/aliases. If aliases is writable and the files for AIX Version 4.2 (or later) are not, users will be unable to reflect their desired changes through to the actual database. However, if aliases is read-only and the AIX Version 4.2 (or later) DBM files are writable, a slightly sophisticated user can arrange to steal mail anyway.
If your AIX Version 4.2 (or later) DBM files are not writable,or you do not have auto-rebuild enabled (with the AutoRebuildAliases option), then you must be careful to reconstruct the alias database each time you change the text version:
newaliases
If this step is ignored or forgotten, any intended changes will be lost.
Beginning with AIX Version 4.2, when processing the queue, sendmail will try to keep the last few open connections open to avoid startup and shutdown costs. This only applies to IPC connections.
When trying to open a connection, the cache is first searched. If an open connection is found, it is probed to see if it is still active by sending a NOOP command. It is not an error if this fails; instead, the connection is closed and reopened.
Two parameters control the connection cache. The ConnectionCacheSize (k) option defines the number of simultaneous open connections that will be permitted. If it is set to zero, connections will be closed as quickly as possible. The default is one. This should be set as appropriate for your system size; it will limit the amount of system resources that sendmail will use during queue runs. Never set this higher than 4.
The ConnectionCacheTimeout (K) option specifies the maximum time that any cached connection will be permitted to idle. When the idle time exceeds this value, the connection is closed. This number should be small (under ten minutes) to prevent you from grabbing too many resources from other hosts. The default is five minutes.
If you want machine exchange (MX) support, you must be using Domain Name Services (DNS).
The ResolverOptions(I) option allows you to tweak name server options. The command line takes a series of flags as documented inresolver(3) (with the leading "RES_" deleted). Each can be preceded by an optional `+' or `-'. For example, the line:
O ResolverOptions=+AAONLY -DNSRCH
turns on the AAONLY (Accept Authoritative Answers only) and turns off the DNSRCH (search the domain path) options. Most resolver libraries default DNSRCH, DEFNAMES, and RECURSE flags on and all others off. You can also include "HasWildcardMX" to specify that there is a wildcard MX record matching your domain; this turns off MX matching when canonifying names, which can lead to inappropriate canonifications.
Note: This function is available beginning in AIX Version 4.2 only.
Some sites mount each user's home directory from a local disk on their workstation, so that local access is fast. However, the result is that .forward file lookups are slow. In some cases, mail can even be delivered on machines inappropriately because of a file server being down. The performance can be especially bad if you run the automounter.
The ForwardPath (J) option allows you to set a path of forward files. For example, the config file line:
O ForwardPath=/var/forward/$u:$z/.forward.$w
would first look for a file with the same name as the user's login in /var/forward. If that is not found (or is inaccessible), the file ".forward.machinename" in the user's home directory is searched.
If you create a directory such as /var/forward, it should be mode 1777 (that is, the sticky bit should be set). Users should create the files mode 644.
Note: This function is available beginning in AIX Version 4.2 only.
On systems that have one of the system calls in the statfs(2) family (including statvfs and ustat), you can specify a minimum number of free blocks on the queue filesystem using the MinFreeBlocks (b) option. If there are fewer than the indicated number of blocks free on the filesystem on which the queue is mounted, the SMTP server will reject mail with the 452 error code. This invites the SMTP client to try again later.
Attention: Be careful not to set this option too high; it can cause rejection of e-mail when that mail would be processed without difficulty.
Note: This function is available beginning in AIX Version 4.2 only.
To avoid overflowing your system with a large message, the MaxMessageSize option can set an absolute limit on the size of any one message. This will be advertised in the ESMTP dialogue and checked during message collection.
Note: This function is available beginning in AIX Version 4.2 only.
The PrivacyOptions (p) option allows you to set certain "privacy" flags. Actually, many of them don't give you any extra privacy, rather just insisting that client SMTP servers use the HELO command before using certain commands or adding extra headers to indicate possible security violations.
The option takes a series of flag names; the final privacy is the inclusive or of those flags. For example:
O PrivacyOptions=needmailhelo, noexpn
insists that the HELO or EHLO command be used before a MAIL command is accepted and disables the EXPN command.
The flags are detailed in RFC 1123 S 5.1.6.
Normally, sendmail deletes the (envelope) sender from any list expansions. For example, if "linda" sends to a list that contains "linda" as one of the members, she will not get a copy of the message. If the -m (me too) command line flag, or if the MeToo (m) option is set in the configuration file, this behavior is suppressed.
Classes of phrases may be defined to match on the left hand side of rewrite rules, where a "phrase" is a sequence of characters that do 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 lowercase letters and special characters are reserved for system use. Classes defined in config files may be given names from the set of uppercase letters for short names or beginning with an uppercase letter for long names.
Ccphrase1 phrase2... Fcfile
The first form defines the class c to match any of the named words. It is permissible to split them among multiple lines; for example, the two forms:
CHmonet ucbmonet
CHmonet CHucbmonet
are equivalent. The ``F'' form reads the elements of the class c from the named file.
Elements of classes can be accessed in rules using $= or $~. The $~ (match entries not in class) only matches a single word; multi-word entries in the class are ignored in this context.
The class $=w is set to be the set of all names this host is known by. This can be used to match local hostnames.
The class $=k is set to be the same as $k, that is, the UUCP node name.
The class $=m is set to the set of domains by which this host is known, initially just $m.
The class $=t is set to the set of trusted users by the T configuration line. If you want to read trusted users from a file, use Ft/file/name.
The class $=n can be set to the set of MIME body types that can never be eight to seven bit encoded. It defaults to "multipart/signed". Message types "message/*" and "multipart/*" are never encoded directly. Multipart messages are always handled recursively. The handling of message/* messages are controlled by class $=s. The class $=e contains the Content-Transfer-Encodings that can be 8->7 bit encoded. It is predefined to contain "7bit", "8bit", and "binary". The class $=s contains the set of subtypes of message that can be treated recursively. By default it contains only "rfc822". Other "message/*" types cannot be 8->7 bit encoded. If a message containing eight-bit data is sent to a seven-bit host, and that message cannot be encoded into seven bits, it will be stripped to 7 bits.
Beginning with AIX Version 4.2, the three classes $=U, $=Y, and $=Z are defined to describe the hosts requiring the use of a uucp mailer. Specifically, $=U should contain all hosts requiring the uucp-old mailer. $=Y should contain all hosts requiring the uucp-new mailer. Finally, $=Z should contain all hosts requiring the uucp-uudom mailer. Each uucp host should belong to one of these classes.
Sendmail can be compiled to allow a scanf(3) string on the F line. This lets you do simplistic parsing of text files. For example, to read all the user names in your system /etc/passwd file into a class, use:
FL/etc/passwd %[^:]
which reads every line up to the first colon.
Cw contains all the possible names for the local host. It defines aliases. Cw specifies the name and all aliases for your host system. If your system uses different names for two different network connections, enter both names as part of the host name class. If you do not define both names, mail sent to the undefined name is returned to the sender.
CwCw alias aliasn...
By default, the sendmail command reads what has been set with the hostname command and uses it to initialize the host and domain name macros and classes. Change the configuration file macros only if you want the sendmail host and domain names to be different from those set by the hostname command.
To change the host name:
To define a class whose members are listed in an external file (one member per line), use a control line that begins with the letter F. The syntax for the F class definition is:
FClass FileName [Format]
Class is the name of the class that matches any of the words listed in FileName. Filename is the full path name of file (for convenience, you may wish to put the file in the /etc directory). Format is an optional scanf subroutine format specifier that indicates the format of the elements of the class in FileName. The Format specifier can contain only one conversion specification.
Programs and interfaces to mailers are defined in this line. The format is:
Mname, {field=value}*
where name is the name of the mailer (used internally only) and the "field=name" pairs define attributes of the mailer. Fields are:
Only the first character of the field name is checked.
The flags in the following list may be set in the mailer description. Any other flags may be used freely to conditionally assign headers to messages destined for particular mailers. Flags marked with - are not interpreted by the sendmail binary; these are conventionally used to correlate to the flags portion of the H line. Flags marked with = apply to the mailers for the sender address rather than the usual recipient mailers.
Note: Configuration files prior to level 6 assume the `A', `w', `5', `:', `|', `/', and `@' options on the mailer named "local".
The mailer with the special name "error" can be used to generate a user error. The (optional) host field is an exit status to be returned, and the user field is a message to be printed. The exit status may be numeric or one of the values USAGE, NOUSER, NOHOST, UNAVAILABLE, SOFTWARE, TEMPFAIL, PROTOCOL, or CONFIG to return the corresponding EX_ exit code. For example, the entry:
$#error $@ NOHOST $: Host unknown in this domain
on the RHS of a rule will cause the specified error to be generated and the "Host unknown" exit status to be returned if the LHS matches. It is always available for use in O, S, and check_ ... rulesets and it cannnot be defined with M commands.
The mailer named "local" must be defined in every configuration file. This is used to deliver local mail, and is treated specially in several ways. Additionally, three other mailers named "prog", "*file*",and "*include*" may be defined to tune the delivery of messages to programs, files, and :include: lists respectively. They default to:
Mprog, P=/bin/sh, F=lsoDq9, T=DNS/RFC822/X-Unix, A=sh -c $u M*file*, P=[FILE], F=lsDFMPEuq9, T=DNS/RFC822/X-Unix, A=FILE $u M*include*, P=/dev/null, F=su, A=INCLUDE $u
The Sender and Recipient rewrite sets may either be a simple ruleset id or may be two ids separated by a slash If so, the first rewrite set is applied to envelope addresses, and the second is applied to headers. Setting any value to zero disables the corresponding mailer-specific rewriting.
The Directory field is a path of directories to try. For example, the definition D=$z:/ tries to execute the recipient's home directory, but if that is not available, it tries to execute in the root of the filesystem. Use this on the prog mailer only, since some shells (e.g., csh) do not execute if they cannot read the home directory. Since the queue directory usually cannot be read by unauthorized users, csh scripts can fail if they are used as recipients.
The Userid field specifies the default user and group id to run. It overrides the DefaultUser option q.v. If the S mailer flag is also specified, the user and group id will run in all circumstances. Use the form user:group to set both the user and group id. Either of these variables may be an interger or a symbolic name that is looked up in the passwd and group files respectively.
The Charset field is used when converting a message to MIME. It is the character set used in the Content-Type: header. If it is not set, the DefaultCharset option is used. If the DefaultCharset is not set, the value unknown-8bit is used. The Charset field applies to the sender's mailer; not the recipient's mailer. For example: if the envelope sender address is on the local network and the recipient is on an external network, the character set is set from the Charset= field for the local network mailer, not the external network mailer.
The Type field sets the type of information used in MIME error messages (as defined by RFC 1984). It contains three values that are separated by slashes: the MTA type (a description of how hosts are named), address type (a description of e-mail addresses), and diagnostic type (a description of error diagnostic codes). Each must be a registered value or begin with X-. The default is dns/rfc822/smtp.
Mlocal, P=/usr/bin/bellmail, F=lsDFMmn, S=10, R=20, A=mail $uThe mailer is called local. Its path name is /usr/bin/bellmail. The mailer uses the following flags:
The format of the header lines that sendmail inserts into the message are defined by the H line. The syntax of this line is:
H[?mflags?]hname: htemplate
Continuation lines in this spec are reflected directly into the outgoing message. The htemplate is macro expanded before insertion into the message. If the mflags (surrounded by question marks) are specified, at least one of the specified flags must be stated in the mailer definition for this header to be automatically output. If one of these headers is in the input, it is reflected to the output regardless of these flags.
Some headers have special semantics that will be described later.
A secondary syntax allows validation of headers as they being read. To enable validation, use:
HHeader: $>Ruleset
The indicated Ruleset is called for the specified Header. Like other check_* rulesets, it can return $#error to reject the message or $#discard to discard the message. The header is treated as a structured field, so comments (in parentheses) are deleted before processing.
For example, the following configuration lines:
HMessage-Id: $>CheckMessageId SCheckMessageId R<$+@$+> $@OK R$* $#error $: Illegal Message-Id header
would refuse any message header that had a Message-Id: header of any of the following forms:
Message-Id: <> Message-Id: some text Message-Id: <legal test@domain> extra text
Lines in the configuration file that begin with a capital letter H, define the format of the headers used in messages. The format of the H command is:
Lines in the configuration file that begin with a capital letter H, define the format of the headers used in messages. The format of the H control line is:
H[?MailerFlags?]FieldName: Content
The variable parameters are defined as:
These example lines are from a typical /etc/sendmail.cf file:
For information on the options for AIX Version 4.2 or later, see "sendmail.cf File Options (for AIX Version 4.2 or Later)" .
For information on the options for AIX Version 3.2.5 and AIX Version 4.1, see "sendmail.cf File Options (for AIX Version 3.2.5 or AIX Version 4.1)" .
Values for the "Precedence:" field may be defined using the P control line. The syntax of this field is:
Pname=num
When the name is found in a "Precedence:" field, the message class is set to num. Higher numbers mean higher precedence. Numbers less than zero have the special property that if an error occurs during processing, the body of the message will not be returned; this is expected to be used for "bulk" mail such as through mailing lists. The default precedence is zero. For example, the list of default precedences is:
To provide compatibility with old configuration files, the V line has been added to define basic semantics of the configuration file. This is not intended as long term support. These compatibility features may be removed in future releases.
N.B.: configuration version levels are independent of configuration file version numbers. For example, version number 8.9 configuration files use version level 8 configurations.
"Old" configuration files are defined as version level one.
Version level two files make the following changes:
Version level three files allow # initiated comments on all lines. Exceptions are backslash escaped # marks and the $# syntax.
Version level four files are equivalent to level three files.
Version level five files change the default definition of $w to be the first component of the hostname.
Version level six configuration files change many of the local processing options (i.e., aliasing and matching the address beginning for the | character) to mailer flags. This allows fine grained control over the special local processing. Version level six files may also use long option names. The ColonOkInAddr option (which allows colons in the local part of the address) defaults to on in configuration files with lower version numbers. The configuration file requires additional "intelligence" to properly handle the RFC 822 group construct.
Version level seven configuration files use new option names to replace old macros.
$e became | SmtpGreetingMessage |
$1 became | UnixFromLine |
$o became | OperatorChars |
Prior to version seven, the F=q flag (use the return value 250 instead of 252 for SMTP VRFY commands) was assumed.
Version level eight configuration files allow $# on the left side of ruleset lines.
The V line may have an optional /vendor variable to indicate that the configuration file uses vendor specific modifications. You may use /Berkeley to indicate that the file uses the Berkeley sendmail dialect.
Note: This function is available beginning in AIX Version 4.2 only.
Special maps can be defined using the line:
Kmapname mapclass arguments
The mapname is the name by which this map is referenced in the rewrite rules. The mapclass is the name of a type of map; these are compiled in to sendmail. The arguments are interpreted depending on the class; typically, there would be a single argument naming the file containing the map.
Maps are referenced using the syntax:
$( map key $@ arguments $: default $)
where either or both of the arguments or default portion may be omitted. The $@ arguments may appear more than once. The indicated key and arguments are passed to the appropriate mapping function. If it returns a value, it replaces the input. If it does not return a value and the default is specified, the default replaces the input. Otherwise, the input is unchanged.
During replacement of either a map value or default, the string "%n" (where n is a digit) is replaced by the corresponding argument. Argument zero is always the database key. For example, the rule:
R$- ! $+ $: $(uucp $1 $@ $2 $: %1 @ %0 . UUCP $)
looks up the UUCP name in a (user-defined) UUCP map. If not found, it turns it into ".UUCP" form. The database might contain records like:
decvax %1@ %0.DEC.COM research %1@%0.ATT.COM
Note: The default clauses never do this mapping.
The builtin map with both name and class "host" is the host name canonicalization lookup. Thus, the syntax:
$(host hostname$)
$[hostname$]
There are many defined classes.
dbm | Database lookups using the ndbm(3) library. Sendmail must be compiled with NDBM defined. | ||||||||||||||
nis | NIS lookups. Sendmail must be compiled with NIS defined. | ||||||||||||||
ldapx | LDAP X500 directory lookups. Sendmail must be compiled with LDAPMAP defined. The map supports most of the standard arguments and command line arguments of the ldapsearch program. | ||||||||||||||
text | Text file lookups. The format of the text file is defined by the -k (key field number), -v (value field number), and -z (field delimiter) flags. | ||||||||||||||
stab | Internal symbol table lookups. Used internally for aliasing. | ||||||||||||||
implicit | Really should be called "alias." This is used to get the default lookups for alias files, and is the default if no class is specified for alias files. | ||||||||||||||
user | Looks up users using getpwnam(3). The -v flag can be used to specify the name of the field to return (although this is normally used only to check the existence of a user). | ||||||||||||||
host | Canonifies host domain names. Given a host name, it calls the name server to find the canonical name for that host. | ||||||||||||||
bestmx | Returns the best MX record for a host name given as the key. The current machine is always preferred. For example, if the curent machine is one of the hosts listed as the lowest preference MX record, it will be guaranteed to be returned. This can be used to find out if this machine is the target for an MX record and mail can be accepted on that basis. If the -z flag is given, all MX names are returned (separated by the given delimiter). | ||||||||||||||
sequence | The arguments on the `K' line are a list of maps; the resulting map
searches the argument maps in order until it finds a match for the indicated
key. For example, if the key definition is:
Kmap1 ... Kmap1 ... Kseqmap sequence map1 map2 then a lookup against "seqmap" first does a lookup in map1. If that is found, it returns immediately. Otherwise, the same key is used for map2. | ||||||||||||||
switch | Much like the "sequence" map except that the order of maps is
determined by the service switch. The argument is the name of the service to
be looked up; the values from the service switch are appended to the map name
to create new map names. For example, consider the key definition:
Kali switch aliases together with the service switch entry: aliases nis files This causes a query against the map "ali" to search maps named "ali.nis" and "ali.files" in that order. | ||||||||||||||
dequote | Strip double quotes (") from a name. It does not strip backslashes,
and will not strip quotes if the resulting string would contain unscannable
syntax (that is, basic errors like unbalanced angle brackets; more
sophisticated errors such as unknown hosts are not checked). The intent is for
use when trying to accept mail from systems such as DECnet that routinely
quote odd syntax such as:
"49ers::ubell" A typical use is probably something like: Kdequote dequote ... R$- $: $(dequote $1 $) R$- $+ $: $>3 $1 $2 Care must be taken to prevent unexpected results; for example, "|someprogram < input > output" will have quotes stripped, but the result is probably not what you had intended. Fortunately, these cases are rare. | ||||||||||||||
regex | The map definition on the K line contains a regular expression.
Any key input is compared to that expression using the POSIX regular expressions
routines regcomp( ), regerr( ), and regexec( ). Refer to the
documentation for those routines for more information about regular expression
matching. No rewriting of the key is done if the -m flag is used.
Without it, the key is discarded, or if -s is used, it is substituted
by the substring matches, delimited by the $| or the string specified
with the -d flag. The flags available for the map are:
The -s flag can include an optional parameter which can be used to select the substrings in the result of the lookup. For example, -s1,3,4. | ||||||||||||||
program | The arguments on the K line are the pathname to a program and any initial parameters to be passed. When the map is called, the key is added to the initial parameters and the program is invoked as the default user/group id. The first line of standard output is returned as the value of the lookup. This has many potential security problems and terrible performance. It should be used only when absolutely necessary. |
Most of these accept as arguments the same optional flags and a filename (or a mapname for NIS; the filename is the root of the database path, so that ".db" or some other extension appropriate for the database type will be added to get the actual database name). Known flags are:
-o | Indicates that this map is optional. That is, if it cannot be opened, no error is produced, and sendmail will behave as if the map existed but was empty. |
-N, -O | If neither -N or -O are specified, sendmail uses an adaptive algorithm to decide whether or not to look for null bytes on the end of keys. It starts by trying both; if it finds any key with a null byte, it never tries again without a null byte and vice versa. If -N is specified, it never tries without a null byte and if -O is specified, it never tries with a null byte. Setting one of these can speed matches but are never necessary. If both -N and -O are specified, sendmail will never try any matches at all. That is, everything will appear to fail. |
-ax | Append the string x on successful matches. For example, the default host map appends a dot on successful matches. |
-Tx | Append the string x on temporary failures. For example, x would be appended if a DNS lookup returned server failed or an NIS lookup could not locate a server. See the -t flag for additional information. |
-f | Do not fold upper to lower case before looking up the key. |
-m | Match only (without replacing the value). If you only care about the existence of a key and not the value (as you might when searching the NIS map "hosts.byname" for example), this flag prevents the map from substituting the value. However, The -a argument is still appended on a match, and the default is still taken if the match fails. |
-kkeycol | The key column name (for NIS+) or number (for text lookups). |
-vvalcol | The value column name (for NIS+) or number (for text lookups). |
-zdelim | The column delimiter (for text lookups). It can be a single character or one of the special strings "\n" or "\t" to indicate newline or tab respectively. If omitted entirely, the column separator is any sequence of whitespace. |
-t | Normally, when a map attempts to do a lookup and the server fails (e.g., sendmail could not contact any name server -- this is not the same as an entry not being found in the map), the message being processed is queued for future processing. The -t flag turns off this behavior, letting the temporary failure (server down) act as though it were a permanent failure (entry not found). It is particularly useful for DNS lookups, where another's misconfigured name server can cause problems on your machine. Care must be taken to avoid "bouncing" mail that would be resolved correctly if another attempt were made. A common strategy is to forward such mail to another mail server. |
-sspacesub | For the dequote map only, the character to use to replace space characters after a successful dequote. |
-q | Do not dequote the key before lookup. |
-A | When rebuilding an alias file, the -A flag causes duplicate entries
in the text version to be merged. For example, the following two entries:
list: user1,user2 list: user3 would be treated as if they were the following single entry: list: user1,user2,user3 |
The dbm map appends the strings ".pag" and ".dir" to the given filename; the two db-based maps append ".db". For example, the map specification
Kuucp dbm -o -N /usr/lib/uucpmap
specifies an optional map named "uucp" of class "dbm"; it always has null bytes at the end of every string, and the data is located in /usr/lib/uucpmap.{dir,pag}.
CXWord1 Word2... | Defines the class of words that can be used to match the left-hand side of rewrite rules. Class specifiers (X) may be any of the uppercase letters from the ASCII character set. Lowercase letters and special characters are reserved for system use. |
DXValue | Defines a macro (X) and its associated Value. Macro specifiers may be any of the uppercase letters from the ASCII character set. Lowercase letters and special characters are reserved for system use. |
FXFileName [Format] | Reads the elements of the class (X) from the FileName variable, using an optional scanf format specifier. The format specifier contains only one conversion specification. One class number is read for each line in the FileName variable. |
H[?MFlags?]HeaderName: HeaderTemplate | Defines the header format the sendmail command inserts into a message. Continuation lines are a part of the definition. The HeaderTemplate is macro-expanded before insertion into the message. If the MFlags are specified and at least one of the specified flags is included in the mailer definition, this header is automatically written to the output message. If the header appears in the input message, it is written to the output message regardless of the MFlags variable. |
MName, [Field=Value] | Defines a Mail program where the Name variable is the name of the Mail program and Field=Value pair defines the attributes of the mailer. |
Ox[Value] | Sets the option to the value of x. If the option is a valued
option, you must also specify the Value variable. Options may also be
selected from the command line.
Note: For valid values, see "sendmail.cf File Options (for AIX Version 4.2 or Later)" or "sendmail.cf File Options (for AIX Version 3.2.5 or AIX Version 4.1)" . |
PName=Number | Defines values for the Precedence: header field. When the Name variables found in a message's Precedence: field, the message's precedence is set to the Number variable. Higher numbers indicate higher precedences. Negative numbers indicate that error messages are not returned. The default Number is 0. |
RLeftHandSide RightHandSide Comments | Defines a rewrite rule. One or more tab characters separate the three fields of this command. If space characters are used as field separators, option J must be set. The J option allows spaces as well as tabs to separate the left- and right-hand sides of rewrite rules. The J option allows rewrite rules to be modified using an editor that replaces tabs with spaces. |
Sx | Sets the rule set currently defined to the specified number(x). If a rule set definition is started more than once, the new definition overwrites the old. |
TUser1 User2 ... | Defines user IDs for the system administrators. These IDs have permission to override the sender address using the -f flag. More than one ID can be specified per line. |
There are a number of global options that can be set from a configuration file. Options are represented by full words. Some can also be represented as single characters for back compatibility. The syntax of this line is:
O option=value
This sets option to be value. Note that there must be a space between the letter `O' and the name of the option. An older version is:
Oovalue
where the option o is a single character. Depending on the option, value may be a string, an integer, a boolean (with legal values "t", "T", "f", or "F"; the default is TRUE), or a time interval.
The options supported are as follows. You can also use the single-character names; they are shown in brackets in the following list:
AliasFile=spec, spec, ... | [A] Specify possible alias file(s). Each spec should
be in the format ``class: file'' where class: is optional and defaults to
``implicit''. Depending on how sendmail is compiled, valid classes are
as follows, or if a list of specs is provided, sendmail searches them
in order.
| ||||||||||||||||||||||||||||||||||||||
AliasWait=timeout | [a] If set, wait up to timeout (units default to minutes) for an "@:@" entry to exist in the alias database before starting up. If it does not appear in the timeout interval, rebuild the database (if the AutoRebuildAliases option is also set) or issue a warning. | ||||||||||||||||||||||||||||||||||||||
AllowBogusHELO | [no short name] If set, allow HELO SMTP commands that don't include a host name. Setting this violates RFC 1123, section 5.2.5, but is necessary to interoperate with several SMTP clients. If there is a value, it is still checked for legitimacy. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
AutoRebuildAliases | [D] If set, rebuild the alias database if necessary and possible. If this option is not set, sendmail will never rebuild the alias database unless explicitly requested using -bi. Not recommended, since it can cause thrashing. | ||||||||||||||||||||||||||||||||||||||
BlankSub=c | [B] Set the blank substitution character to c. Unquoted spaces in addresses are replaced by this character. Defaults to space (no change is made). | ||||||||||||||||||||||||||||||||||||||
CheckAliases | [n] Validate the RHS of aliases when rebuilding the alias database. | ||||||||||||||||||||||||||||||||||||||
CheckpointInterval=N | [C] Checkpoints the queue every N (default 10) addresses sent. If your system crashes during delivery to a large list, this prevents retransmission to any but the last recipients. | ||||||||||||||||||||||||||||||||||||||
ClassFactor=fact | [z] The indicated factor is multiplied by the message class (determined by the Precedence: field in the user header and the P lines in the configuration file) and subtracted from the priority. Thus, messages with a higher Priority: will be favored. Defaults to 1800. | ||||||||||||||||||||||||||||||||||||||
ColonOkInAddr | [no short name] If set, colons are acceptable in e-mail addresses (for example, "host:user"). If not set, colons indicate the beginning of a RFC 822 group construct ("groupname: member1, member2, ... memberN;"). Doubled colons are always acceptable ("nodename::user") and proper route-addr nesting is understood ("<@relay:user@host>"). Furthermore, this option defaults on if the configuration version level is less than 6 (for back compatibility). However, it must be off for full compatibility with RFC 822. | ||||||||||||||||||||||||||||||||||||||
ConnectionCacheSize=N | [k] The maximum number of open connections that will be cached at a time. The default is one. This delays closing the current connection until either this invocation of sendmail needs to connect to another host or it terminates. Setting it to zero defaults to the old behavior, that is, connections are closed immediately. Since this consumes file descriptors, the connection cache should be kept small; 4 is probably a practical maximum. | ||||||||||||||||||||||||||||||||||||||
ConnectionCacheTimeout=timeout | [K] The maximum amount of time a cached connection will be permitted to idle without activity. If this time is exceeded, the connection is immediately closed. This value should be small (approximately ten minutes). Before sendmail uses a cached connection, it always sends a RSET command to check the connection; if this fails, it reopens the connection. This keeps your end from failing if the other end times out. This option avoids using up excessive resources on the other end. The default is five minutes. | ||||||||||||||||||||||||||||||||||||||
ConnectionRateThrottle=N | [no short name] If set to a positive value, allow no more that N incoming daemon connections in a one-second period. This is intended to flatten out peaks and allow the load average checking to cut in. Defaults to zero (no limits). This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
DaemonPortOptions=options | [O] Set server SMTP options. The options are
key=value pairs. Known keys are:
The Address mask may be a numeric address in dot notation or a network name. | ||||||||||||||||||||||||||||||||||||||
DefaultCharSet=charset | [no short name] When a message that has 8-bit characters but is not in MIME format is converted to MIME (see the EightBitMode option), a character set must be included in the Content-Type: header. This character set is normally set from the Charset= field of the mailer descriptor. If that is not set, the value of this option is used. If this option is not set, the value "unknown-8bit" is used. | ||||||||||||||||||||||||||||||||||||||
DefaultUser=user:group | [u] Set the default userid for mailers to user:group. If group is omitted and user is a user name (as opposed to a numeric user id), the default group listed in the /etc/passwd file for that user is used as the default group. Both user and group may be numeric. Mailers without the S flag in the mailer definition will run as this user. Defaults to 1:1. The value can also be given as a symbolic user name. | ||||||||||||||||||||||||||||||||||||||
DeliveryMode=x | [d] Deliver in mode x. Legal modes are:
Defaults to b if no option is specified, i if it is specified but given no argument (for example, ``Od'' is equivalent to '`Odi''). The -v command line flag sets this to i. | ||||||||||||||||||||||||||||||||||||||
DialDelay=sleeptime | [no short name] Dial-on-demand network connections can see timeouts if a connection is opened before the call is set up. If this is set to an interval and a connection times out on the first connection being attempted, sendmail will sleep for this amount of time and try again. This should give your system time to establish the connection to your service provider. Units default to seconds, so "DialDelay=5" uses a five second delay. Defaults to zero (no retry). | ||||||||||||||||||||||||||||||||||||||
DontBlameSendmail=option,option,... | [no short name] To avoid possible cracking attempts caused by world-writeable and
group-writeable files and directories, sendmail does paranoid checking when opening
most of its support files. If you must use a group-writeable directory (e.g., /etc),
you must turn off this checking. Turning off checking will make your system more vulnerable
to attack. The following arguments are individual options that turn off checking:
Note: Safe is the default option, but it is not recommended for use. Safe | ||||||||||||||||||||||||||||||||||||||
DontExpandCnames | [no short name] The standards say that all host addresses used in a mail message must be fully canonical. For example, if your host is named "Cruft.Foo.ORG" and also has an alias of "FTP.Foo.ORG", the former name must be used at all times. This is enforced during host name canonification ($[ ... $] lookups). If this option is set, the protocols are ignored and the "wrong" thing is done. However, the IETF is moving toward changing this standard, so the behavior may become acceptable. Please note that hosts downstream may still rewrite the address to be the true canonical name. | ||||||||||||||||||||||||||||||||||||||
DontInitGroups | [no short name] If set, sendmail will avoid using the initgroups(3) call. If you are running NIS, this causes a sequential scan of the groups.byname map, which can cause your NIS server to be badly overloaded in a large domain. The cost of this is that the only group found for users will be their primary group (the one in the password file), which will make file access permissions somewhat more restrictive. Has no effect on systems that do not have group lists. | ||||||||||||||||||||||||||||||||||||||
DontProbeInterfaces | Normally, when sendmail starts, it finds the names of all interfaces that are active on your machine and adds these names to the $=w class of known host aliases. This activity can take a long time if you have a large number of virtual interfaces or if your DNS inverse lookups are slow. You can turn off this probing by using this option; however, you must use some other mechanism to include all variant names in the $=w class. | ||||||||||||||||||||||||||||||||||||||
DontPruneRoutes | [R] Normally, sendmail tries to eliminate any
unnecessary explicit routes when sending an error message (as discussed in RFC
1123 S 5.2.6). For example, when sending an error message to:
<@known1,@known2,@known3:user@unknown> sendmail will strip off the "@known1,@known2" in order to make the route as direct as possible. However, if the R option is set, this will be disabled, and the mail will be sent to the first address in the route, even if later addresses are known. This may be useful if you are behind a firewall. | ||||||||||||||||||||||||||||||||||||||
DoubleBounceAddress=error-address | [no short name] If an error occurs when sending an error message, send the error report (termed a "double bounce" because it is an error "bounce" that occurs when trying to send another error "bounce") to the indicated address. If not set, defaults to "postmaster". This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
EightBitMode=action | [8] Set handling of eight-bit data. There are two kinds of
eight-bit data: that declared as such using the BODY=8BITMIME ESMTP
declaration or the -B8BITMIME command line flag, and undeclared 8-bit data,
that is, input that just happens to be eight bits. There are three basic
operations that can happen: undeclared 8-bit data can be automatically
converted to 8BITMIME, undeclared 8-bit data can be passed as is, without
conversion to MIME, and declared 8-bit data can be converted to 7-bits for
transmission to a non-8BITMIME mailer. The possible actions are:
In all cases, properly declared 8BITMIME data will be converted to 7BIT as needed. | ||||||||||||||||||||||||||||||||||||||
ErrorHeader=file-or-message | [E] Prepend error messages with the indicated message. If it begins with a slash, it is assumed to be the pathname of a file containing a message (this is the recommended setting). Otherwise, it is a literal message. The error file might contain the name, e-mail address, and/or phone number of a local postmaster who could provide assistance to end users. If the option is missing or null, or if it names a file which does not exist or which is not readable, no message is printed. | ||||||||||||||||||||||||||||||||||||||
ErrorMode=x | [e] Dispose of errors using mode x. The values for
x are:
| ||||||||||||||||||||||||||||||||||||||
FallbackMXhost=fallbackhost | [V] If specified, the fallbackhost acts like a very low priority MX on every host. This is intended to be used by sites with poor network connectivity. | ||||||||||||||||||||||||||||||||||||||
ForkEachJob | [Y] If set, deliver each job that is run from the queue in a separate process. Use this option if you are short of memory, since the default tends to consume considerable amounts of memory while the queue is being processed. | ||||||||||||||||||||||||||||||||||||||
ForwardPath=path | [J] Set the path for searching for users' .forward files. The default is "$z/.forward". Some sites that use the automounter may prefer to change this to "/var/forward/$u" to search a file with the same name as the user in a system directory. It can also be set to a sequence of paths separated by colons; sendmail stops at the first file it can successfully and safely open. For example, "/var/forward/$u:$z/.forward" will search first in /var/forward/username and then in ~username/.forward (but only if the first file does not exist). | ||||||||||||||||||||||||||||||||||||||
HoldExpensive | [c] If an outgoing mailer is marked as being expensive, don't connect immediately. This requires that queueing be compiled in, since it will depend on a queue run process to actually send the mail. | ||||||||||||||||||||||||||||||||||||||
HostsFile=path | [no short name] The path to the hosts database, normally /etc/hosts. This option is only consulted when sendmail is canonifying addresses, and then only when "files" is in the "hosts" service switch entry. In particular, this file is never used when looking up host addresses; that is, under the control of the system gethostbyname(3) routine. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
HostStatusDirectory=path | [no short name] The location of the long term host status information. When set, information about the status of hosts (for example, host down or not accepting connections) will be shared between all sendamil processes; normally, this information is only held within a single queue run. This option requires a connection cache of at least 1 to function. If the option begins with a leading `/', it is an absolute pathname; otherwise, it is relative to the mail queue directory. A suggested value for sites desiring persistent host status is .hoststat (that is, a subdirectory of the queue directory). This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
IgnoreDots | [i] Ignore dots in incoming messages. This is always disabled (that is, dots are always accepted) when reading SMTPmail. | ||||||||||||||||||||||||||||||||||||||
LogLevel=n | [L] Set the default log level to n. Defaults to 9. | ||||||||||||||||||||||||||||||||||||||
Mxvalue | [no long version] Set the macro x to value. This is intended only for use from the command line. The -M flag is preferred. | ||||||||||||||||||||||||||||||||||||||
MatchGECOS | [G] Allow fuzzy matching on the GECOS field. If this flag is set, and the usual user name lookups fail (that is, there is no alias with this name and a getpwnam fails), sequentially search the password file for a matching entry in the GECOS field. This also requires that MATCHGECOS be turned on during compilation. This option is not recommended. | ||||||||||||||||||||||||||||||||||||||
MaxDaemonChildren=N | [no short name] If set, sendmail will refuse connections when it has more than N children processing incoming mail. This does not limit the number of outgoing connections. If not set, there is no limit to the number of children; that is, the system load averaging controls this. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
MaxHopCount=N | [h] The maximum hop count. Messages that have been processed more than N times are assumed to be in a loop and are rejected. Defaults to 25. | ||||||||||||||||||||||||||||||||||||||
MaxMessageSize=N | [no short name] Specify the maximum message size to be advertised in the ESMTP EHLO response. Messages larger than this will be rejected. | ||||||||||||||||||||||||||||||||||||||
MaxQueueRunSize=N | [no short name] The maximum number of jobs that will be processed in a single queue run. If not set, there is no limit on the size. If you have very large queues or a very short queue run interval, this could be unstable. However, since the first N jobs in queue directory order are run (rather than the N highest priority jobs), this should be set as high as possible to avoid "losing" jobs that happen to fall late in the queue directory. | ||||||||||||||||||||||||||||||||||||||
MaxRecipientsPerMessage=N | [no short name] The maximum number of recipients that will be accepted per message in an SMTP transaction. If not set, there is no limit on the number of recipients per envelope. Note: Setting this option too low can interfere with sending mail from MUAs that use SMTP for initial submission. | ||||||||||||||||||||||||||||||||||||||
MeToo | [m] Send to me too, even if I am in an alias expansion. | ||||||||||||||||||||||||||||||||||||||
MinFreeBlocks=N | [b] Insist on at least N blocks free on the filesystem that holds the queue files before accepting e-mail via SMTP. If there is insufficient space, sendmail gives a 452 response to the MAIL command. This invites the sender to try again later. | ||||||||||||||||||||||||||||||||||||||
MinQueueAge=age | [no short name] Don't process any queued jobs that have been in the queue less than the indicated time interval. This is intended to allow you to get responsiveness by processing the queue fairly frequently without thrashing your system by trying jobs too often. The default units are minutes. | ||||||||||||||||||||||||||||||||||||||
MustQuoteChars=s | [no short name] Sets the list of characters that must be quoted if used in a full name; that is, in the phrase part of a ``phrase <address>'' syntax. The default is ``.''. The characters ``@,;:\()[]'' are always added to this list. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
NameServOpt | Set this option to use MB, MG, and MR resource records in the name
server.
| ||||||||||||||||||||||||||||||||||||||
NoRecipientAction | [no short name] The action to take when you receive a message that
has no valid recipient headers (To:, Cc:, Bcc:). It can be:
| ||||||||||||||||||||||||||||||||||||||
OldStyleHeaders | [o] Assume that the headers may be in old format, that is, spaces delimit names. This actually turns on an adaptive algorithm: if any recipient address contains a comma, parenthesis, or angle bracket, it will be assumed that commas already exist. If this flag is not on, only commas delimit names. Headers are always output with commas between the names. Defaults to off. | ||||||||||||||||||||||||||||||||||||||
OperatorChars=charlist | [$o macro] The list of characters that are considered to be "operators;" that is, characters that delimit tokens. All operator characters are tokens by themselves; sequences of non-operator characters are also tokens. White space characters separate tokens but are not tokens themselves. For example, "AAA.BBB" has three tokens, but "AAA BBB" has two. If not set, OperatorChars defaults to ".:@[]"; additionally, the characters "()<>,;" are always operators. | ||||||||||||||||||||||||||||||||||||||
PostmasterCopy=postmaster | [P] If set, copies of error messages will be sent to the named postmaster. Only the header of the failed message is sent. Since most errors are user problems, this is probably not a good idea on large sites, and arguably contains privacy violations. Defaults to no postmaster copies. | ||||||||||||||||||||||||||||||||||||||
PrivacyOptions=opt,opt,... | [p] Set the privacy options. "Privacy" is really a misnomer; many of these are just a way of
insisting on stricter adherence to the SMTP protocol. The options can be selected from:
The "goaway" pseudo-flag sets all flags except restrictmailq and restrictqrun. If mailq is restricted, only people in the same group as the queue directory can print the queue. If queue runs are restricted, only root and the owner of the queue directory can run the queue. Authentication Warnings add warnings about various conditions that may indicate attempts to violate the mail system security, such as using an nonstandard queue directory. | ||||||||||||||||||||||||||||||||||||||
QueueDirectory=dir | [Q] Use the named dir as the queue directory. | ||||||||||||||||||||||||||||||||||||||
QueueFactor=factor | [q] Use factor as the multiplier in the map function to decide when to just queue up jobs rather than run them. This value is divided by the difference between the current load average and the load average limit (QueueLA option) to determine the maximum message priority that will be sent. Defaults to 600000. | ||||||||||||||||||||||||||||||||||||||
QueueLA=LA | [x] When the system load average exceeds LA, just queue messages (do not try to send them). Defaults to 8. | ||||||||||||||||||||||||||||||||||||||
QueueSortOrder=algorithm | [no short name] Sets the algorithm used for sorting the queue. Only the first character of the value is used. Legal values are "host" (to order by the name of the first host name of the first recipient) and "priority" (to order strictly by message priority). Host ordering makes better use of the connection cache, but may tend to process low-priority messages that go to a single host over high-priority messages that go to several hosts; it probably should not be used on slow network links. Priority ordering is the default. | ||||||||||||||||||||||||||||||||||||||
QueueTimeout=timeout | [T] A synonym for "Timeout.queuereturn". This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
RecipientFactor=fact | [y] The indicated factor is added to the priority (thus lowering the priority of the job) for each recipient. That is, this value penalizes jobs with large numbers of recipients. Defaults to 30000. | ||||||||||||||||||||||||||||||||||||||
RefuseLA=LA | [X] When the system load average exceeds LA, refuse incoming SMTP connections. Defaults to 12. | ||||||||||||||||||||||||||||||||||||||
ResolverOptions=options | [I] Set resolver options. Values can be set using +flag and cleared using -
flag; the flags can be "debug", "aaonly", "usevc", "primary", "igntc", "recurse", "defnames", "stayopen",or
"dnsrch". The string "HasWildcardMX " (without a + or -) can be specified to turn off matching
against MX records when doing name canonifications.
You must be using the name server when defining this option. | ||||||||||||||||||||||||||||||||||||||
RetryFactor=fact | [Z] The factor is added to the priority every time a job is processed. Thus, each time a job is processed, its priority will be decreased by the indicated value. In most environments this should be positive, since hosts that are down can be down for a long time. Defaults to 90000. | ||||||||||||||||||||||||||||||||||||||
RunAsUser=user | [no short name] The user parameter may be a user name (looked up in /etc/passwd) or a numeric user id; either form can have ":group" attached (where group can be numeric or symbolic). If set to a non-zero (non-root) value, sendmail will change to this user id shortly after startup[20]. This avoids a certain class of security problems. However, this means that all ".forward" and ":include:" files must be readable by the indicated user, and on systems that don't support the saved uid bit properly, all files to be written must be writable by user and all programs will be executed by user. It is also incompatible with the SafeFileEnvironment option. In other words, it may not actually add much to security on an average system, and may, in fact, detract from security (because other file permissions must be loosened). However, it should be useful on firewalls and other places where users don't have accounts and the aliases file is well constrained. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
SafeFileEnvironment=dir | [no short name] If this option is set, sendmail will do a chroot(2) call into the indicated directory before doing any file writes. If the file name specified by the user begins with dir, that partial path name will be stripped off before writing, so (for example) if the SafeFileEnvironment variable is set to "/safe", then aliases of "/safe/logs/file" and "/logs/file" actually indicate the same file. Additionally, if this option is set, sendmail refuses to deliver to symbolic links. | ||||||||||||||||||||||||||||||||||||||
SaveFromLine | [f] Save UNIX-style "From" lines at the front of headers. Normally they are assumed redundant and discarded. | ||||||||||||||||||||||||||||||||||||||
SendMIMEErrors | [j] If set, send error messages in MIME format (see RFC1521 and RFC1344 for details). | ||||||||||||||||||||||||||||||||||||||
SevenBitInput | [7] Strip input to seven bits for compatibility with old systems. This should not be necessary. | ||||||||||||||||||||||||||||||||||||||
SingleLineFromHeader | [no short name] If set, From: lines that have embedded newlines are unwrapped onto one line. This is to get around a botch in Lotus Notes that apparently cannot understand legally wrapped RFC822 headers. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
SingleThreadDelivery | [no short name] If set, a client machine will never try to open two SMTP connections to a single server machine at the same time, even in different processes. That is, if another sendmail is already talking to some host, a new sendmail will not open another connection. This property is of mixed value; although this reduces the load on the other machine, it can cause mail to be delayed (for example, if one sendmail is delivering a huge message, other sendmails won't be able to send even small messages). Also, it requires another file descriptor (for the lock file) per connection, so you may have to reduce the ConnectionCacheSize option to avoid running out of per-process file descriptors. Requires the HostStatusDirectory option. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
SmtpGreetingMessage=message | [$e macro] The message printed when the SMTP server starts up. Defaults to "$j Sendmail $v ready at $b". | ||||||||||||||||||||||||||||||||||||||
StatusFile=file | [S] Log summary statistics in the named file. If not set, no summary statistics are saved. This file does not grow in size. It can be printed using the mailstats program. | ||||||||||||||||||||||||||||||||||||||
SuperSafe | [s] Be super-safe when running things. That is, always instantiate the queue file, even if you are going to attempt immediate delivery. sendmail always instantiates the queue file before returning control to the client under any circumstances. It is recommended that this always be set. | ||||||||||||||||||||||||||||||||||||||
TempFileMode=mode | [F] The file mode for queue files. It is interpreted in octal by default. Defaults to 0600. | ||||||||||||||||||||||||||||||||||||||
Timeout.type=timeout | [r; subsumes old T option as well] Set timeout
values. The actual timeout is indicated by the type. The recognized timeouts and their default values, and
their minimum values specified in RFC 1123 section 5.3.2 are:
All but those marked with a (-) apply to client SMTP. If the message is submitted using the NOTIFY SMTP extension, warning messages will only be sent if NOTIFY=DELAY is specified. The queuereturn and queuewarn timeouts can be further qualified with a tag based on the Precedence: field in the message; they must be one of the following:
For example, setting "Time-out.queuewarn.urgent=1h" sets the warning timeout for urgent messages only to one hour. The default if no precedence is indicated is to set the timeout for all precedences. | ||||||||||||||||||||||||||||||||||||||
TimeZoneSpec=tzinfo | [t] Set the local time zone info to tzinfo; for example, "PST8PDT". Actually, if this is not set, the TZ environment variable is cleared (so the system default is used). If set but null, the user's TZ variable is used, and if set and non-null, the TZ variable is set to this value. | ||||||||||||||||||||||||||||||||||||||
TryNullMXList | [w] If this system is the "best" (that is, lowest preference) MX for a given host, its configuration rules should normally detect this situation and treat that condition specially by forwarding the mail to a UUCP feed, treating it as local. However, in some cases (such as Internet firewalls), you may want to try to connect directly to that host as though it had no MX records at all. Setting this option causes sendmail to try this. Errors in your configuration are likely to be diagnosed as "host unknown" or "message timed out" instead of something more meaningful. This option is not recommended. | ||||||||||||||||||||||||||||||||||||||
UnixFromLine=fromline | [$l macro] Defines the format used when sendmail must add a UNIX-style From_ line (that is, a line beginning "From<space>user"). Defaults to "From $g $d". Do not change this unless your system uses a different UNIX mailbox format. | ||||||||||||||||||||||||||||||||||||||
UnsafeGroupWrites | [no short name] If set, :include: and .forward files that are group writable are considered "unsafe", that is, they cannot reference programs or write directly to files. World writable :include: and .forward files are always unsafe. This option is valid for sendmail version 8.8 and above. | ||||||||||||||||||||||||||||||||||||||
UseErrorsTo | [l] If there is an "Errors-To:" header, send error messages to the addresses listed there. They normally go to the envelope sender. Use of this option causes sendmail to violate RFC 1123. This option is not recommended. | ||||||||||||||||||||||||||||||||||||||
UserSubmission | [no short name] This is an initial submission directly from a Mail User Agent. This can be set in the configuration file if you have MUAs that do not pass the -U flag or use the XUSR ESMTP extension, but some relayed mail may get inappropriately rewritten if you do. | ||||||||||||||||||||||||||||||||||||||
Verbose | [v] Run in verbose mode. If this is set, sendmail adjusts options HoldExpensive (old c) and DeliveryMode (old d) so that all mail is delivered completely in a single job so that you can see the entire delivery process. Option Verbose should never be set in the configuration file; it is intended for command line use only. |
All options can be specified on the command line using the -O or -o flag, but most will cause sendmail to relinquish its setuid permissions. The options that will not cause this are MinFreeBlocks [b], DeliveryMode [d], ErrorMode [e], IgnoreDots [i], LogLevel [L], MeToo [m], OldStyleHeaders [o], PrivacyOptions [p], Timeouts [r], SuperSafe [s], Verbose [v], CheckpointInterval [C], and SevenBitInput [7]. Also, M (define macro) when defining the r or s macros is also considered "safe."
Note: The ServicesSwitchFile option is not supported. AIX sendmail uses AIX name resolution, which means that it uses either /etc/netsvc.conf, the NSORDER environment variable, or the default name resolution (DNS). If you do not want sendmail to use the DNS, you must specify the type of name resolution to use in either /etc/netsvc.conf or the NSORDER environment variable (for example, NSRODER=local). For more information, see "Name Resolution" in the TCP/IP chapter of AIX Version 4.3 System Management Guide: Communications and Networks
Set configuration options for the sendmail command by using a control line in the configuration file. The options are the same as those specified with the sendmail command and the -o flag. Name an option with a single character; for example:
OOption[Value]
Where Option is a single-character name for the option being set. Value is either a string, an integer, a time interval, or a Boolean option. Values for a Boolean option are t, T, y, Y for a true value and f or F for a false value. If you do not specify a value for a Boolean option, the default is true.
The options supported are as follows:
AFile | Uses the File specified as the alias file. | ||||||||||||
bCodeSet | Specifies the National Language Support code set of the network in Japanese environments. The sendmail command converts mail to or from the code set of the network from or to the code set of the locale. For NLS code set values see, "Understanding ISO Code Sets" or "Understanding IBM PC Code Sets" in AIX Kernel Extensions and Device Support Programming Concepts. | ||||||||||||
BCharacter | Sets the blank substitution Character. In addresses, the sendmail command replaces spaces without quotes with the specified Character. The supplied configuration file uses a . (period) for the value of the Character variable. This option prohibits the sendmail command from receiving messages through SMTP. The sendmail command cannot recognize the end of the message, a . (period), when receiving messages through SMTP. | ||||||||||||
c | Causes the sendmail command to queue messages without sending them if an outgoing mailer is marked as expensive to use. The queue can be run when costs are lower or when the queue is large enough to send the message efficiently. | ||||||||||||
d | The sendmail command operates in several delivery modes. The
default configuration file sets the delivery mode to b (the
default value). However, you can change the Od delivery mode with the
OdValue option in the configuration file. This mode specifies
how promptly mail is delivered. Value can be:
| ||||||||||||
e | Dispose of errors using mode x. The values for x are:
| ||||||||||||
ETimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the local SMTP protocol waits, after sending the rcpt command, for a reply from the remote SMTP protocol. | ||||||||||||
f | Saves From lines at the front of messages. These lines are normally discarded. | ||||||||||||
FValue | Sets the file mode for temporary files created by sendmail in the queue directory. Value is an octal file mode value. The default temporary file mode is 0660. | ||||||||||||
gNumber | Sets the default group ID to the value specified by the Number variable. | ||||||||||||
GTimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the SMTP protocol waits for completion of sending data. | ||||||||||||
h | The sendmail Oh option limits the number of alternate
addresses tried for multihomed hosts. Without the option, only the first
address is tried. The format for this option is:
OhNumber The Number variable specifies the number of alternate addresses to be tried. | ||||||||||||
i | Does not interpret a . (period) on a line by itself as a message terminator. This option prohibits the sendmail command from receiving messages through SMTP. The sendmail command cannot recognize the end of the message, a . (period), when receiving messages through SMTP. | ||||||||||||
I | Treats a failure to connect to the name server as a temporary error. The message is queued and delivery can be retried later. | ||||||||||||
J | Allows spaces as well as tabs to separate the left-hand side and right-hand side of rewrite rules. This option allows rewrite rules to be modified using an editor that replaces tabs with spaces. | ||||||||||||
k | Prevents character-set conversions for outgoing mail messages. Any National Language Support (NLS) extended characters are sent to other systems intact. | ||||||||||||
K[Value] | Sets the types of name server resource records that the
sendmail command uses to resolve recipient addresses. If using more
than one KValue option, separate them with a space. Value can
be:
| ||||||||||||
lFile | Sets the National Language Support (NLS) configuration file to File. | ||||||||||||
m | Sends messages to the sender if the sender appears in an alias expansion of a recipient address. The default action removes the sender's address from recipient alias expansions. | ||||||||||||
MMacro Value | Defines the Macro variable as the Value specified. This option is normally used from the sendmail command line only. | ||||||||||||
n | Validates the right-hand side of alias definitions when performing the newaliases function. | ||||||||||||
o | Indicates that this message can 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. | ||||||||||||
OCodeSet | Specifies the National Language Support code set of the local site in Japanese environments. The sendmail command converts mail to or from the code set of the locale to or from the code set of the network. For NLS code set values see, "Understanding ISO Code Sets" or "Understanding IBM PC Code Sets" in AIX Kernel Extensions and Device Support Programming Concepts. | ||||||||||||
pMapName | Sets the map name of NIS aliases when using NIS. If mail aliases are not found in the local /etc/aliases file, a search begins in a domainwide NIS database, usually located on a central machine. | ||||||||||||
PAddress | Identifies the Address to receive a copy of all returned mail. | ||||||||||||
qValue | Use value as the multiplier in the map function to decide when to just queue up jobs rather than run them. This value is divided by the difference between the current load average and the load average limit (x option) to determine the maximum message priority that will be sent. Defaults to 600000. | ||||||||||||
QDirectory | Sets the directory for queuing messages. A directory is created if one does not exist. | ||||||||||||
RTimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the local SMTP protocol waits, after sending the data command, for a reply from the remote SMTP protocol. | ||||||||||||
s | Enqueues messages before delivery, even during immediate delivery mode. | ||||||||||||
SFile | Specifies the path name of the File where the sendmail command stores data about delivered and received messages. Statistics are only collected if the file exists. This file must be created by the user. | ||||||||||||
uNumber | Sets the default user ID to the value specified by the Number variable. | ||||||||||||
UTimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the local SMTP protocol waits for the 220 greeting message from the remote SMTP protocol. | ||||||||||||
v | Runs in verbose mode. | ||||||||||||
VTimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the local SMTP protocol waits, after sending the mail command, for a reply from the remote SMTP protocol. | ||||||||||||
w | Causes all incoming mail that has 8-bit characters to be treated as ISO-8859/1 mail. These characters are converted to the equivalent National Language Support (NLS) extended characters. | ||||||||||||
WTimeValue | To comply with RFC 1123, which specifies per-command time-outs for the SMTP protocol, uncomment this line in the /etc/sendmail.cf configuration file, where TimeValue is the length of time the local SMTP protocol waits, after sending the mail termination . (period) command, for a reply from the remote SMTP protocol. | ||||||||||||
x=Value | When the system load average exceeds value, just queue messages (do not try to send them). Defaults to 8. | ||||||||||||
X=Value | When the system load average exceeds value, refuse incoming SMTP connections. Defaults to 12. | ||||||||||||
y=Value | The indicated value is added to the priority (thus lowering the priority of the job) for each recipient. That is, this value penalizes jobs with large numbers of recipients. Defaults to 30000. | ||||||||||||
Y | Delivers each message in the mail queue from a separate process. This option is not required. If used, the option increases overhead in the workstation environment. In addition, unavailable destination hosts may be retried during a queue run. | ||||||||||||
+ | Turns on secure SMTP. When enabled, this option disables the VRFY and EXPN commands. These commands are required and do run, but they echo their argument back to the user rather than expanding the argument to indicate whether it is valid or invalid. | ||||||||||||
- | Turns on SMTP security logging. When enabled, any use of the VRFY and EXPN commands is logged, even if the commands are disabled by the + option. Any invalid user given to the RCPT command is also logged. The log message is sent to syslogd as a mail.warning message. The message includes the date, time, user's hostname, command, and argument given to SMTP. |
This sendmail.cf file is part of Base Operating System (BOS) Runtime.
/etc/sendmail.cf | Specifies the path of the sendmail.cf file. |
/etc/passwd | Contains basic user attributes. |
/etc/aliases | Contains alias definitions for the sendmail command. |
The sendmail command.
The /etc/passwd file.