REVERSE mapping table

During the address reversal stage of address processing (which note occurs after rewriting via the MTA&#x27;s rewrite rules), first any     LDAP-based address reversal is performed, as discussed in  LDAP lookups for address  reversal. After any such LDAP-based address reversal, then header From: addresses and other backwards-pointing addresses and  forwards-pointing header addresses may receive yet another address  reversal processing step which makes use of the  address reversal database  and  mapping table.9

Nowadays, the reverse database is  very little used, having mostly been superceded for general address reversal purposes by the use of LDAP lookups for address  reversal; the   mapping table is also seldom needed or used for general address reversal purposes nowadays, but does sometimes get used under special circumstances. Thus while in principle the reverse database and  mapping can  apply in an alternating fashion -- see the discussion of the reverse database for details -- this discussion of the   mapping table will focus on the   mapping table alone or as an adjust to LDAP lookups for address reversal. (Note that you do not need to have an  address reversal database in order to use a    mapping table.  That is, you can use a   mapping without having  an address reversal database. And, of course, the reverse is true: you  do not need to have a   mapping to use an address reversal  database.)

After the other address reversal mechanisms have applied (LDAP lookups for address reversal and the reverse database), the MTA checks for whether a  mapping table exists. If a  mapping table does exist, the MTA will probe the mapping table with, by default, simply  the current (as already reversed by other mechanisms) address. Note that the exact format of probes to the  mapping table  (and reverse database)  can be affected by the    MTA  option, which can cause inclusion of channel names in the  probe and as of MS 8.0, even the header field from which the address was  taken. And as of MS 7.0.5, probes to the  mapping table can also be affected by  the    MTA option.

If the address probe matches a   mapping entry, the result of the  mapping is tested. The resulting string will replace the address if the entry specifies a  ; a   will discard the  result of the mapping. (If the mapping entry specifies   in addition to , the resulting string will be run  through the reversal database once more, and  if a match occurs the  template from the database will replace the mapping result, and hence  the address.)

New in MS 7.0u1, the output (template) of the  mapping is  interpreted as a series of addresses separated by commas. As always, the first address becomes the reversal result if the entry sets the   flag; but new in MS 7.0u1, if the    flag is also set and the input to the   mapping  was the MAIL FROM (envelope From) address, then the second address in  the comma-separated list becomes the default postmaster address for  this sender.

See Table of  mapping table flags  for a description of additional flags available for  the   mapping, and  Mapping template substitutions and metacharacters for a list of general mapping  table substitution sequences and metacharacters.

Note that if you have a compiled configuration, then you must recompile and reload your configuration in order for changes to the  mapping table (or indeed changes to any mapping table) to take effect.

9Address reversal processing can be restricted to only backwards pointing addresses if the third bit, bit 2, in the MTA  option   is cleared. Application of this processing to envelope From address can be disabled using the    MTA option. The  channel option can disable  address reversal  from being performed during enqueues to particular destination channels. However, note that at typical Messaging Server sites such options should not be used -- address reversal should not be disabled -- as a wide range of functionality, including functionality that might not at first glance seem to be address reversal related, depends critically upon normal address reversal processing.

See also:
 * Rewrite rules
 * reverse_url MTA Option
 * LDAP lookups for address reversal
 * Reverse database
 * Mapping entry templates
 * Internal host names in Received: and Message-Id: header lines
 * use_reverse_database MTA Option
 * usereversedatabase Option
 * include_conversiontag MTA Option
 * Mapping tables
 * Address reversal