A match causes the workspace to carry the extra information
that is matched by <$*.BAD >, and which results in an error being reported back to the
sender.
The -d38.20 command-line switch(?§15.7.53 on page 568) can be used to observe this
type??™s lookups in more detail.
23.7.3 bestmx
Look up the best MX record for a host V8.7 and later
The bestmx database-map type looks up a hostname as the key and returns the current,
single best MX record as the value. Because bestmx is a type, not a database map, you need
to declare it with a K configuration command before you can use it:
Kbestmx bestmx
One use for this database-map type might be to see whether a particular host has any
usable MX records:*
Kbestmx bestmx
...
R $*< @ $+ > $* $: $1<@$2>$3 < $(bestmx $2 $: NO $) >
R $*< @ $+ > $* < NO > $#smtp $@ $2 $: $1 < @ $2 > $3
R $*< @ $+ > $* < $* > $: $1<@ $[ $2 $] > $3
In the first rule, we look up the host part of an address (which has already been focused by
the canonify rule set 3) withth e bestmx database map. The result of the lookup is
surrounded with angle brackets and appended to the original address. The second rule
looks for the NO caused by an unsuccessful lookup (the $:). The original address is then sent
withth e smtp delivery agent. If the hostname inside the appended angle braces is not NO, th e
host part of the original address is canonicalized with the $[ and $] operators.
Pages:
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591