Features:
FEATURE(`badmx')
Most Windows PCs that exist on the Internet use DHCP instead of static IP addresses. Because of this the machine is unable to publish an MX record. These machines can be used as zombie machines to send unsolicited commercial e-mailss.
This feature is used to reject mail from those machines. In addition it also denies mail from the loopback address.
Note: this feature requires that the sendmail binary has been compiled with the options MAP_REGEX and DNSMAP.
FEATURE(`bestmx_is_local')
Accept mail as though locally addressed for any host that lists us as the best possible MX record. This generates additional DNS traffic, but should be OK for low to medium traffic hosts. The argument may be a set of domains, which will limit the feature to only apply to these domains -- this will reduce unnecessary DNS traffic. THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH WILDCARD MX RECORDS!!! If you have a wildcard MX record that matches your domain, you cannot use this feature.
FEATURE(`blacklist_recipients')
Turns on the ability to block incoming mail for certain recipient usernames, hostnames, or addresses. For example, you can block incoming mail to user nobody, host foo.mydomain.com, or guest@bar.mydomain.com. These specifications are put in the access db as described in the anti-spam configuration control section later in this document.
FEATURE(`block_bad_helo')
Reject messages from SMTP clients which provide a HELO/EHLO argument which is either unqualified, or is one of our own names (i.e., the server name instead of the client name). This check is performed at RCPT stage and disabled for the following cases:
- authenticated sessions,
- connections from IP addresses in class $={R}.
Currently access_db lookups can not be used to (selectively) disable this test, moreover, FEATURE(`delay_checks') is required.
FEATURE(`delay_checks',`friend')
The rulesets check_mail and check_relay will not be called when a client connects or issues a MAIL command, respectively. Instead, those rulesets will be called by the check_rcpt ruleset; they will be skipped under certain circumstances.
FEATURE(`dnsbl', `')
Turns on rejection, discarding, or quarantining of hosts found in a DNS based list. The first argument is used as the domain in which blocked hosts are listed. A second argument can be used to change the default error message, or select one of the operations `discard' and `quarantine'. Without that second argument, the error message will be
Rejected: IP-ADDRESS listed at SERVER
where IP-ADDRESS and SERVER are replaced by the appropriate information. By default, temporary lookup failures are ignored. This behavior can be changed by specifying a third argument, which must be either `t' or a full error message. The dnsbl feature can be included several times to query different DNS based rejection lists. See also enhdnsbl for an enhanced version.
Set the DNSBL_MAP mc option to change the default map definition from `host'. Set the DNSBL_MAP_OPT mc option to add additional options to the map specification used.
Some DNS based rejection lists cause failures if asked for AAAA records. If your sendmail version is compiled with IPv6 support (NETINET6) and you experience this problem, add
define(`DNSBL_MAP', `dns -R A')
before the first use of this feature. Alternatively you can use enhdnsbl instead (see below). Moreover, this statement can be used to reduce the number of DNS retries, e.g.,
define(`DNSBL_MAP', `dns -R A -r2')
enhdnsbl
Enhanced version of dnsbl (see above). Further arguments (up to 5) can be used to specify specific return values from lookups. Temporary lookup failures are ignored unless a third argument is given, which must be either `t' or a full error message. By default, any successful lookup will generate an error. Otherwise the result of the lookup is compared with the supplied argument(s), and only if a match occurs an error is generated. For example,
FEATURE(`enhdnsbl', `dnsbl.example.com', `', `t', `127.0.0.2.')
will reject the e-mail if the lookup returns the value ``127.0.0.2.'', or generate a 451 response if the lookup temporarily failed. The arguments can contain metasymbols as they are allowed in the LHS of rules. As the example shows, the default values are also used if an empty argument, i.e., `', is specified. This feature requires that sendmail has been compiled with the flag DNSMAP.
Set the EDNSBL_TO mc option to change the DNS retry count from the default value of 5, this can be very useful when a DNS server is not responding, which in turn may cause clients to time out (an entry stating did not issue MAIL/EXPN/VRFY/ETRN will be logged).
local_lmtp
Use an LMTP capable local mailer. The argument to this feature is the pathname of an LMTP capable mailer. By default, mail.local is used. This is expected to be the mail.local which came with the 8.9 distribution which is LMTP capable. The path to mail.local is set by the confEBINDIR m4 variable -- making the default LOCAL_MAILER_PATH /usr/libexec/mail.local. If a different LMTP capable mailer is used, its pathname can be specified as second parameter and the arguments passed to it (A=) as third parameter, e.g.,
FEATURE(`local_lmtp', `/usr/local/bin/lmtp', `lmtp')
WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, i.e., without respecting any definitions in an OSTYPE setting.
FEATURE(`local_procmail')
Use procmail or another delivery agent as the local mailer. The argument to this feature is the pathname of the delivery agent, which defaults to PROCMAIL_MAILER_PATH. Note that this does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS for the local mailer; tweak LOCAL_MAILER_FLAGS and LOCAL_MAILER_ARGS instead, or specify the appropriate parameters. When procmail is used, the local mailer can make use of the "user+indicator@local.host" syntax; normally the +indicator is just tossed, but by default it is passed as the -a argument to procmail.
This feature can take up to three arguments:
1. Path to the mailer program [default: /usr/local/bin/procmail] 2. Argument vector including name of the program [default: procmail -Y -a $h -d $u] 3. Flags for the mailer [default: SPfhn9]
Empty arguments cause the defaults to be taken. Note that if you are on a system with a broken setreuid() call, you may need to add -f $f to the procmail argument vector to pass the proper sender to procmail.
For example, this allows it to use the maildrop (http://www.flounder.net/~mrsam/maildrop/) mailer instead by specifying:
FEATURE(`local_procmail', `/usr/local/bin/maildrop', `maildrop -d $u')
or scanmails using:
FEATURE(`local_procmail', `/usr/local/bin/scanmails')
WARNING: This feature sets LOCAL_MAILER_FLAGS unconditionally, i.e., without respecting any definitions in an OSTYPE setting.
FEATURE(`lookupdotdomain')
Look up also .domain in the access map. This allows to match only subdomains. It does not work well with FEATURE(`relay_hosts_only'), because most lookups for subdomains are suppressed by the latter feature.
FEATURE(`msp')
Defines config file for Message Submission Program. An optional argument can be used to override the default of `[localhost]' to use as host to send all e-mails to. Note that MX records will be used if the specified hostname is not in square brackets (e.g., [hostname]). If `MSA' is specified as second argument then port 587 is used to contact the server. Example:
FEATURE(`msp', `', `MSA')
Note: Due to many problems, submit.mc uses
FEATURE(`msp', `[127.0.0.1]')
by default. If you have a machine with IPv6 only, change it to
FEATURE(`msp', `[IPv6:::1]')
FEATURE(`mtamark')
Experimental support for "Marking Mail Transfer Agents in Reverse DNS with TXT RRs" (MTAMark), see draft-stumpf-dns-mtamark-01. Optional arguments are:
1. Error message, default:
550 Rejected: $&{client_addr} not listed as MTA
2. Temporary lookup failures are ignored unless a second argument is given, which must be either `t' or a full error message.
3. Lookup prefix, default: _perm._smtp._srv. This should not be changed unless the draft changes it.
Example:
FEATURE(`mtamark', `', `t')
FEATURE(`nocanonify')
Don't pass addresses to $[ ... $] for canonification by default, i.e., host/domain names are considered canonical, except for unqualified names, which must not be used in this mode (violation of the standard). It can be changed by setting the DaemonPortOptions modifiers (M=). That is, FEATURE(`nocanonify') will be overridden by setting the 'c' flag. Conversely, if FEATURE(`nocanonify') is not used, it can be emulated by setting the 'C' flag (DaemonPortOptions=Modifiers=C). This would generally only be used by sites that only act as mail gateways or which have user agents that do full canonification themselves. You may also want to use "define(`confBIND_OPTS', `-DNSRCH -DEFNAMES')" to turn off the usual resolver options that do a similar thing.
An exception list for FEATURE(`nocanonify') can be specified with CANONIFY_DOMAIN or CANONIFY_DOMAIN_FILE, i.e., a list of domains which are nevertheless passed to $[ ... $] for canonification. This is useful to turn on canonification for local domains, e.g., use CANONIFY_DOMAIN(`my.domain my') to canonify addresses which end in "my.domain" or "my". Another way to require canonification in the local domain is CANONIFY_DOMAIN(`$=m').
A trailing dot is added to addresses with more than one component in it such that other features which expect a trailing dot (e.g., virtusertable) will still work.
If `canonify_hosts' is specified as parameter, i.e., FEATURE(`nocanonify', `canonify_hosts'), then addresses which have only a hostname, e.g., <user@host>, will be canonified (and hopefully fully qualified), too.
FEATURE(`no_default_msa')
Don't generate the default MSA daemon, i.e., DAEMON_OPTIONS(`Port=587,Name=MSA,M=E') To define a MSA daemon with other parameters, use this FEATURE and introduce new settings via DAEMON_OPTIONS().
FEATURE(`nouucp')
Don't route UUCP addresses. This feature takes one parameter:
`reject': reject addresses which have "!" in the local part unless it originates from a system that is allowed to relay
`nospecial': don't do anything special with "!".
Warnings:
1. See the notice in the anti-spam section.
2. don't remove "!" from OperatorChars if `reject' is
given as parameter.
FEATURE(`nullclient', `host.domain')
This is a special case -- it creates a configuration file containing nothing but support for forwarding all mail to a central hub via a local SMTP-based network. The argument is the name of that hub.
The only other feature that should be used in conjunction with this one is FEATURE(`nocanonify'). No mailers should be defined. No aliasing or forwarding is done.
FEATURE(`redirect')
Reject all mail addressed to "address.REDIRECT" with a ``551 User has moved; please try <address>'' message. If this is set, you can alias people who have left to their new address with ".REDIRECT" appended.
FEATURE(`require_rdns')
Reject mail from connecting SMTP clients without proper rDNS (reverse DNS), functional gethostbyaddr() resolution.
Note: this feature will cause false positives, i.e., there are legitimate MTAs that do not have proper DNS entries. Rejecting mails from those MTAs is a local policy decision.
The basic policy is to reject message with a 5xx error if the IP address fails to resolve. However, if this is a temporary failure, a 4xx temporary failure is returned. If the look-up succeeds, but returns an apparently forged value, this is treated as a temporary failure with a 4xx error code.
EXCEPTIONS:
Exceptions based on access entries are discussed below.
Any IP address matched using $=R (the "relay-domains" file) is excepted from the rules. Since we have explicitly allowed relaying for this host, based on IP address, we ignore the rDNS failure.
The philosophical assumption here is that most users do not control their rDNS. They should be able to send mail through their ISP, whether or not they have valid rDNS. The class $=R, roughly speaking, contains those IP addresses and address ranges for which we are the ISP, or are acting as if the ISP.
If `delay_checks' is in effect (recommended), then any sender who has authenticated is also excepted from the restrictions. This happens because the rules produced by this FEATURE() will not be applied to authenticated senders (assuming `delay_checks').
ACCESS MAP ENTRIES:
Entries such as:
Connect:1.2.3.4 OK Connect:1.2 RELAY
will whitelist IP address 1.2.3.4, so that the rDNS blocking does apply to that IP address
Entries such as:
Connect:1.2.3.4 REJECT
will have the effect of forcing a temporary failure for that address to be treated as a permanent failure.
FEATURE(`smrsh')
Use the SendMail Restricted SHell (smrsh) provided with the distribution instead of /bin/sh for mailing to programs. This improves the ability of the local system administrator to control what gets run via e-mail. If an argument is provided it is used as the pathname to smrsh; otherwise, the path defined by confEBINDIR is used for the smrsh binary -- by default, /usr/libexec/smrsh is assumed.
FEATURE(`use_client_ptr')
If this feature is enabled then check_relay will override its first argument with $&{client_ptr}. This is useful for rejections based on the unverified hostname of client, which turns on the same behavior as in earlier sendmail versions when delay_checks was not in use. See doc/op/op.* about check_relay, {client_name}, and {client_ptr}.
FEATURE(`use_ct_file')
Used to tell Sendmail to read the /etc/mail/trusted-users file to get the names of users that will be 'trusted', that is, able to set their envelope from address using -f without generating a warning message.
FEATURE(`use_cw_file')
This tells Sendmail that you want to have it read an /etc/mail/local-host-names file to get the values for class w.
Next Section: Databases - 27 of 32