Testing mapping tables

Mapping tables are a very general MTA facility, routinely used for a wide variety of purposes, in a wide variety of contexts, and with a wide variety of potential inputs and outputs. Besides all of the MTA&#x27;s own standard, pre-defined mapping tables, sites may also incorporate their own, private mapping tables, for their own site-specific purposes. There is thus a "low-level" of basic mapping table output given a specific input which is a general aspect of mapping table behavior true for all mapping tables, and in contrast there is the "high-level" interpretation of mapping output which is performed by specific MTA components.

The MTA has two general, low-level command line test utilities, the  utility and the   utility, that can be used on any mapping table to test, respectively, the basic pattern matching and the low-level operation (the output-string and flags returned given some input-string) of mapping tables. But note that these utilities, and in particular the  utility, do not provide any interpretation of the meaning or effect of a particular mapping table output-string, nor do they do any "validity check" on the input-string(s) supplied for testing. (And it is frequently the case that when a mapping table is not having the effect that you desire, that the real "problem" is that the input the MTA is feeding into the mapping table is not the input that you had anticipated.)

So when you wish to test for the meaning or effect of a mapping table, when you want to see what a mapping tables does in real-world operation, these above-named utilities will not be useful. Instead, these utilities&#x27; intended purpose is for testing basic syntax of mapping tables, and they are best used primarily to answer syntax questions that arise when using fairly complex mapping tables. The  utility is useful when testing complex matching patterns, such as patterns that use "globs" or  "IP subnet matching". The  utility is useful when testing mapping tables that contain complex recursive or iterative entries, or that include  callouts to routines.

In contrast, the effects of commonly-used addressing and access mapping tables such as the   mapping table, the   mapping table, the   mapping table, or any of the recipient access mapping tables   can be conveniently tested using the   utility. Note that when doing such testing, the utility&#x27;s  and   switches, and in the case of the ,  , and   mapping tables also the   and   switches, tend to be useful (indeed necessary) for proper testing.

(Aside: The  utility can also be used to test  posting access  controls for mailing lists.)

See also:
 * Mapping tables
 * Pre-defined mapping tables
 * Mapping entry templates
 * Testing address access mapping tables
 * test -mapping utility
 * test -match utility
 * test -rewrite utility