FORWARD mapping table

From Messaging Server Technical Reference Wiki
Jump to: navigation, search


The FORWARD mapping table provides functionality of pattern-based forwarding (analogous to the way that the REVERSE mapping table provides pattern-based changes to non-routing addresses), and the FORWARD mapping table also provides a mechanism for source specific forwarding. If a FORWARD mapping table exists, it is applied to each envelope To address. The probe of the FORWARD mapping table by default consists simply of the current envelope To address:

envelope-to

But bits of the use_forward_database MTA option and include_conversiontag MTA option control inclusion of additional fields in the probe. Bit 4 (value 16) of the use_forward_database MTA option controls including the source-channel and from-address in the probe; bit 6 (value 64) of use_forward_database controls including the current destination-channel in the probe; new in MS 6.3, enabling bit 2 (value 4) of the include_conversiontag MTA option causes any current conversion tags on the message to be included in a comma-separated list clause in the probe. With these additional fields enabled, the probe has the form

source-channel|from-address|destination-channel|tag-list|envelope-to

New in MS 8.0, the include_mtpriority MTA option and include_spares2 MTA option control, respectively, the inclusion of MT-PRIORITY and expected message size, and LDAP "spare" attribute values associated with the sender address, in the probe. Also new in MS 8.0 are new bits of the use_forward_database MTA option controlling inclusion of the initial form and intermediate form of the recipient address, and the authenticated sender address, in the probe. With all these options enabled as well as the previously discussed options, the probe has the form:

src-chan|from-addr|dst-chan|auth-sender|tag-list|s1|s2|s3|s4|s5|s6|mtpriority|expected-size|initial-to|inter-to|envelope-to

New in MS 8.0.2.2, LDAP "spare" attribute values associated with the recipient address can also be included in the probe. These appear after the sender spare attributes and are controlled by additional bits in the include_spares2 MTA option.

Note that when the from-address is included in the probe, then the MTA options use_orig_return, and (new in MS 6.3) use_canonical_return, and (new in MS 7.0) use_auth_return, can be used to select which form of the envelope From address is included.

If the probe matches a FORWARD mapping table entry pattern, the result of the mapping is tested. The resulting string will replace the envelope To address if the entry template specifies a $Y; a $N will discard the result of the mapping. See FORWARD mapping table flags for a list of additional flags, and see Mapping tables for general background and syntax of mapping tables. If no entries in the FORWARD mapping table match, or if no FORWARD mapping table exists, then the MTA's envelope To address processing proceeds to its next stage.

The FORWARD mapping, if present, is consulted before any forward database lookup. If a FORWARD mapping matches and has the flag $G, then the result of the FORWARD mapping will be checked against the forward database, if forward database use has been enabled via the appropriate setting of use_forward_database. (Note that if channel specific forward database use has been specified, then the source address and source channel will be prefixed to the result of the FORWARD mapping before looking up in the forward database.) If a matching FORWARD mapping entry specifies $D, then the result of the FORWARD mapping (and optional forward database lookup) will be run through the MTA's address rewriting process again. If a matching FORWARD mapping entry specifies $H, then no further FORWARD mapping or database lookups will be performed during that subsequent address rewriting (that resulting from the use of $D).

FORWARD mapping table flags
Flags Description
$Y Use output as new address
$N Address remains unchanged
$Xerror-code New in MS 8.1.0.7. Issue the specified error-code as the extended SMTP error code when rejecting the address with $F (below). If the first digit of the extended SMTP error code x.y.z is a 4, a temporary 452 4.y.z response is used instead of the usual 550 5.y.z sort of permanent rejection.
$Nstring New in MS 8.1.0.7. Reject access with the optional error text string
$* New in MS 8.1.0.7. If used with $F, also force disconnect of the SMTP session.
$D Run output through the rewriting process again
$G Run output through the forward database, if forward database use has been enabled
$S Set the "trust subaddress as folder" flag, as if a folder name had been specified in a Sieve " fileinto" action
$/ (New in MS 7.0u2) In an entry with $Y$D also set, treat the forwarding result as a mailing list with the original envelope From as the reporting address. This is similar in functionality to the specification of a / as the value of an mgrpErrorsTo value or a / as the value of a [ENVELOPE_FROM] named parameter in the alias file or alias database.
$H Disable further forward database or FORWARD mapping lookups at this alias level.
$I Hold the message as a .HELD file.
$J (New in 8.0.1.3) Disable further forward database or FORWARD mapping lookups for all inner levels. (Use with caution: Careless use of this option can prevent proper alias expansion from occurring.)
$K (New in MS 7.0.4.27.5 and MS 7.0.5.29.0) Don't reset the "intermediate" address before processing the mapping/database result; only takes effect if $Y and $D are also set. This is useful when performing a final fixup to an address produced by delivery option processing.
$P (New in MS 7.0.4.27.5 and MS 7.0.5.29.0) Treat the FORWARD mapping result as having specified additional recipient address(es) in addition to, rather than replacing, the current recipient address; only takes effect if $Y and $D are also set.
$V (New in MS 8.0) Do not set the internal "alias match" flag, (normally as of MS 7.0u2 set by a matching FORWARD entry, so that viaaliasrequired is satisfied); that is, $V means that viaaliasrequired is not satisfied by this FORWARD match
Flag comparisons Description
$:E (New in MS 6.3) Incoming connection used ESMTP/EHLO
$;E (New in MS 6.3) Incoming connection did not use ESMTP/EHLO
$:L (New in MS 6.3) Incoming connection used LMTP/LHLO
$;L (New in MS 6.3) Incoming connection did not use LMTP/LHLO
$:F (New in MS 6.3) NOTIFY=FAILURES active for this recipient
$;F (New in MS 6.3) NOTIFY=FAILURES not active for this recipient
$:S (New in MS 6.3) NOTIFY=SUCCESSES active for this recipient
$;S (New in MS 6.3) NOTIFY=SUCCESSES not active for this recipient
$:D (New in MS 6.3) NOTIFY=DELAYS active for this recipient
$;D (New in MS 6.3) NOTIFY=DELAYS not active for this recipient
$:A (New in MS 6.3) SASL (SMTP AUTH) used to authenticate connection
$;A (New in MS 6.3) SASL (SMTP AUTH) not used
$:T (New in 6.3) SSL/TLS used to secure connection
$;T (New in 6.3) SSL/TLS not used
$:P (New in MS 7.0) Match only if POP-before-SMTP was used
$;P (New in MS 7.0) Match only if POP-before-SMTP was not used
$:R (New in MS 8.0) Match only if the current channel is "internal" (the process channel, reprocess channel, or conversion channel).
$;R (New in MS 8.0) Match only if the current channel is not "internal".
$:U (New in MS 8.0) Match only if a UTF8 address was used.
$;U (New in MS 8.0) Match only if the address did not use UTF8.
$:V (New in MS 8.0) Match only if the recipient address expanded via an alias.
$;V (New in MS 8.0) Match only if the recipient address did not expand via an alias.
$:C (New in MS 8.0.1.3) Match only if message is the result of a capture/journal action.
$;C (New in MS 8.0.1.3) Match only if message is not the result of a capture/journal action.

See also the ldap_domain_attr_catchall_mapping MTA option which may be used to specify the name of a domain-level LDAP attribute whose value names an MTA mapping table that functions, for addresses in the domain which match no specific user entry, similarly to the FORWARD mapping table. That is, it provides a domain-specific, more restrictive (applying only to addresses which have no explicit user entry), analogue of the FORWARD mapping table.


See also: