bestmx |
Look up the best MX record for a host | V8.7 and above |
Switch |
§ |
Description |
---|---|---|
-a |
-a |
Append tag on successful match |
-D |
-D |
Don't use this database map if DeliveryMode=defer |
-m |
-m |
Suppress replacement on match |
-q |
-q |
Don't strip quotes from key |
-T |
-T |
Suffix to append on temporary failure |
-t |
-t |
Ignore temporary errors |
-z |
-z |
Specify the column delimiter |
The -z switch (special for this bestmx database-map type) allows multiple MX records to be returned, and specifies a column delimiter used to separate one record from another. So long as the column delimiter is not a character that appears in any domain name, it will be used to separate all the MX records returned by the MX lookup. These records will be returned in the new workspace. For example, if the -z switch specified a comma, and if abc.com were looked up, the following might be returned:
mail11 . disney . com . , mail . disney . com .
If the -z switch wrongly specifies a character that can exist in a domain name (such as a dot), the following error will be reported, and only one MX record will be returned:
bestmx_map_lookup: MX host mail11.disney.com. includes map delimiter character 0x2E
If too many MX records are returned, the list can be truncated to avoid an overly long workspace. When the list is truncated, some MX records can be lost. This can become a serious problem when this -z switch is used with this database-map type and when the relay_based_on_MX feature is also declared (Section 7.4.4).
This type can be watched with the -d8 debugging switch (-d8.1).