New Defined Macros for sendmail
The following table describes new macros that are reserved for use by the sendmail program. The macros' values are assigned internally. For more information, refer to the sendmail(1M) man page.
Table 27-10 Defined Macros for sendmail
Macro | Description |
---|---|
${addr_type} | Identifies the current address as an envelope sender or a recipient address. |
${client_resolve} | Holds the result of the resolve call for ${client_name}: OK, FAIL, FORGED, or TEMP. |
${deliveryMode} | Specifies the current delivery mode sendmail is using instead of the value of the DeliveryMode option. |
${dsn_notify}, ${dsn_envid}, ${dsn_ret} | Holds the corresponding DSN parameter values. |
${if_addr} | Provides the interface's address for the incoming connection if the interface does not belong to the loopback net. This macro is especially useful for virtual hosting. |
${if_addr_out}, ${if_name_out}, ${if_family_out} | Avoids the reuse of ${if_addr}. Holds the following values respectively. The address of the interface for the outgoing connection The host name of the interface for the outgoing connection The family of the interface for the outgoing connection |
${if_name} | Provides the interface's host name for the incoming connection and is especially useful for virtual hosting. |
${load_avg} | Checks and reports the current average number of jobs in the run queue. |
${msg_size} | Holds the value of the message size (SIZE=parameter) in an ESMTP dialogue before the message has been collected. Thereafter, the macro holds the message size as computed by sendmail and is used in check_compat. For information about check_compat, refer to Table 27-14. |
${nrcpts} | Holds the number of validated recipients. |
${ntries} | Holds the number of delivery attempts. |
${rcpt_mailer}, ${rcpt_host}, ${rcpt_addr}, ${mail_mailer}, ${mail_host}, ${mail_addr} | Holds the results of parsing the RCPT and MAIL arguments--that is, the resolved right-hand side (RHS) triplet from the mail delivery agent ($#mailer), the host ($@host), and the user ($:addr). |
New Macros Used to Build the sendmail Configuration File
In this section, you can find the following.
Table 27-11 New Macros Used to Build the sendmail Configuration File
Macro | Description |
---|---|
LOCAL_MAILER_EOL | Overrides the default end-of-line string for the local mailer. |
LOCAL_MAILER_FLAGS | Adds Return-Path: header by default. |
MAIL_SETTINGS_DIR | Contains the path (including the trailing slash) for the mail settings directory. |
MODIFY_MAILER_FLAGS | Improves the *_MAILER_FLAGS. This macro sets, adds, or deletes flags. |
RELAY_MAILER_FLAGS | Defines additional flags for the relay mailer. |
New MAX Macros
Use the following new macros to configure the maximum number of commands that can be received before sendmail slows its delivery. You can set these MAX macros at compile time. The maximum values in the following table also represent the current default values.
Table 27-12 New MAX Macros
Macro | Maximum Value | Commands Checked by Each Macro |
---|---|---|
25 | Unknown commands | |
20 | NOOP, VERB, ONEX, XUSR | |
3 | HELO, EHLO | |
6 | VRFY, EXPN | |
8 | ETRN |
Note - You can disable a macro's check by setting the macro's value to zero.
New and Revised m4 Configuration Macros for sendmail
This section contains a table of new and revised m4 configuration macros for sendmail. Use the following syntax to declare these macros.
symbolic_name(`value') |
If you need to build a new sendmail.cf file, refer to "Building the sendmail.cf Configuration File (Task)" in Chapter 25, Mail Services (Tasks).
Table 27-13 New and Revised m4 Configuration Macros for sendmail
m4 Macro | Description |
---|---|
FEATURE() | For details, refer to "Changes to the FEATURE() Declaration". |
This macro adds entries to class w ($=w). | |
A new macro that defines hosts or subdomains that cannot be masqueraded. | |
This macro can now be used for bracketed addresses, such as user@[host]. | |
When these macros are used, include $={VirtHost} in $=R. As a reminder, $=R is the set of host names that are allowed to relay. |
Changes to the FEATURE() Declaration
Refer to the following tables for information about the specific changes to the FEATURE() declarations.
To use the new and revised FEATURE names, use the following syntax.
FEATURE(`name', `argument') |
If you need to build a new sendmail.cf file, refer to "Building the sendmail.cf Configuration File (Task)", in Chapter 25, Mail Services (Tasks).
Table 27-14 New and Revised FEATURE() Declarations
Name of FEATURE() | Description |
---|---|
Argument: Refer to the example in the following paragraph. This new FEATURE() enables you to look for a key in the access map that consists of the sender address and the recipient address and is delimited by the following string, <@>. sender@sdomain<@>recipient@rdomain is an example. | |
Argument: friend, which enables a spam-friend test, or hater, which enables spam-hater test. A new FEATURE() that delays all checks. By using FEATURE(`delay_checks'), the rule sets check_mail and check_relay are not called when a client connects or issues a MAIL command, respectively. Instead, these rule sets are called by the check_rcpt rule set. For details, refer to the /usr/lib/mail/README file. | |
Argument: This FEATURE()accepts a maximum of two arguments:
A new FEATURE() that you can include multiple times to check the return values for DNS lookups. Note that this FEATURE() enables you to specify the behavior of temporary lookup failures. | |
Argument: domain name A new FEATURE() that is an enhanced version of dnsbl, which enables you to check the return values for DNS lookups. For more information, refer to /usr/lib/mail/README. | |
Argument: None A new FEATURE() that you can also use to apply genericstable to subdomains of $=G. | |
Argument: For details, refer to the "Release Notes" in http://www.sendmail.org. A new FEATURE() that implements LDAP address routing. | |
Argument: Path name of an LMTP-capable mailer. The default is mail.local, which is LMTP capable in this Solaris release. A FEATURE() that now sets the delivery status notification (DSN) diagnostic-code type for the local mailer to the proper value of SMTP. | |
Argument: None A new FEATURE() that you can use to avoid masquerading for the local mailer. | |
Argument: None A new FEATURE() that you can also use to look up the .domain in the access map. | |
Argument: canonify_hosts or nothing A FEATURE() that now includes the following features. Enables a list of domains, as specified by CANONIFY_DOMAIN or CANONIFY_DOMAIN_FILE, to be passed to the $[ and $] operators for canonification. Enables addresses that have only a host name, such as <user@host>, to be canonified, if canonify_hosts is specified as its parameter. Adds a trailing dot to addresses with more than one component. | |
Argument: None A new FEATURE() that turns off sendmail's default setting from m4-generated configuration files to "listen" on several different ports, an implementation of RFC 2476. | |
Argument: reject, which does not allow the ! token, or nospecial, which does allow the ! token. A FEATURE() that determines whether to allow the ! token in the local part of an address. | |
Argument: None A FEATURE() that now provides the full rule sets of a normal configuration, allowing anti-spam checks to be performed. | |
Argument: None A new FEATURE() that enables you to preserve the +detail portion of the address when sendmail passes the address to the local delivery agent. | |
Argument: None A new FEATURE() that enables you to preserve the name of the recipient host, if LUSER_RELAY is used. | |
Argument: None A new FEATURE() that enables you to select a queue group that is based on the full email address or on the domain of the recipient. | |
Argument: The domain is an optional argument. A new FEATURE() that allows relaying if the mail sender is listed as a RELAY in the access map and is tagged with the From: header line. If the optional domain argument is given, the domain portion of the mail sender is also checked. | |
Argument: None A FEATURE() that you can now use to apply $={VirtHost}, a new class for matching virtusertable entries that can be populated by VIRTUSER_DOMAIN or VIRTUSER_DOMAIN_FILE. FEATURE(`virtuser_entire_domain') can also apply the class $={VirtHost} to entire subdomains. |
The following FEATURE() declarations are no longer supported.
Table 27-15 Unsupported FEATURE() Declarations
Changes to the MAILER() Declaration
The MAILER() declaration specifies support for delivery agents. To declare a delivery agent, use the following syntax.
MAILER(`symbolic_name') |
Note the following changes.
In this new version of sendmail, the MAILER(`smtp') declaration now includes an additional mailer, dsmtp, which provides on-demand delivery by using the F=% mailer flag. The dsmtp mailer definition uses the new DSMTP_MAILER_ARGS, which defaults to IPC $h.
Numbers for rule sets that are used by MAILERs have been removed. You now have no required order for listing your MAILERs except for MAILER(`uucp'), which must follow MAILER(`smtp') if uucp-dom and uucp-uudom are used.
For more information about mailers, refer to "Mailers". If you need to build a new sendmail.cf file, refer to "Building the sendmail.cf Configuration File (Task)" in Chapter 25, Mail Services (Tasks).