Address reversals are not applied to envelope To: addresses. The reasons for this omission are fairly obvious--envelope To: addresses are continuously rewritten and modified as messages proceed through the mail system. The entire goal of routing is to convert envelope To: addresses to increasingly system- and mailbox-specific formats. The canonization functions of address reversal are entirely inappropriate for envelope To: addresses.
The various substitution mechanisms for envelope To: addresses provide functionality equivalent to the reversal database, but none of these things provides functionality equivalent to reverse mapping. And circumstances do arise where mapping functionality for envelope To: addresses is useful and desirable.
The FORWARD mapping table provides this missing functionality. If a FORWARD mapping table exists in the mapping file, it is applied to each envelope To: address. No changes are made if this mapping does not exist or no entries in the mapping match.
If the address matches a mapping entry, the result of the mapping is tested. The resulting string will replace the envelope To: address if the entry specifies a $Y; a $N will discard the result of the mapping.
The following example illustrates the use of a complex REVERSE and FORWARD mapping. Suppose that a system or pseudo domain named am.sigurd.nocompany.com associated with the l channel produces RFC 822 addresses of the general form:
"lastname, firstname"@am.sigurd.nocompany.com
or
"lastname,firstname"@am.sigurd.nocompany.com
Although these addresses are perfectly legal, they often confuse other mailers that do not fully comply with RFC 822 syntax rules--mailers that do not handle quoted addresses properly, for instance. Consequently, an address format that does not require quoting tends to operate with more mailers. One such format is:
firstname.lastname@am.sigurd.nocompany.com
The goals of this example mapping are to:
![]() |
Allow any of these three address formats to be used |
![]() |
Present only addresses in the original format to the mr_local channel, converting formats as necessary |
![]() |
Present only addresses in the new unquoted format to all other channels, converting formats as necessary. |
The following mapping file tables produce the desired results. The REVERSE mapping shown assumes that bit 3 in the IMTA option USE_REVERSE_DATABASE is set.