Technical data
Configuring and Managing SMTP
17.1 Key Concepts
17.1.5 How SMTP Routes Mail
To find a destination address, SMTP routing looks up addresses in this order:
1. Local MX database
2. BIND MX records
3. BIND A records
4. Local hosts database
Most messages are routed using the BIND records. Local MX records are
useful if you want to customize your system’s mail routing. DNS-based records
are networkwide. If you have local MX records, remember that they are case
sensitive and are available on the local node only.
17.1.5.1 Using Local MX Records
SMTP uses the information stored in local MX records, if available, to route mail.
MX tells the SMTP where to route mail for a particular destination domain. The
DNS (such as BIND) maintains the MX records, but SMTP makes use of them.
Each MX record contains the following fields:
Destination domain Matches the domain portion of the address. This is the
key
field of the MX record. For example, if mail is to be sent to
jones@xyzcorp.com
, MX lookup is done on the destination
domain
xyzcorp.com
.
Multiple MX records for the same destination are allowed.
Therefore, in a sense, the destination domain field allows
duplicate keys.
Gateway host name Specifies the name of the host through which mail sent to the
destination domain should be routed.
Preference Prioritizes multiple MX records for the same destination
domain. The lower the preference value, the higher the priority
for the MX record. That is, lower-preference MX records are
attempted before higher-preference records.
Multiple MX records to the same domain can have the same
preferences.
Creating multiple MX records for the same destination domain provides the
following advantages:
• Enables load balancing between mail routers. In this case, use the same
preferences for all the MX records with the same destination domain.
• Ensures that mail can still be delivered even if one of the routers becomes
unavailable.
• Provides MX-based routes for mail inside and outside a firewall.
Use the SET MX_RECORDS command to enter routing information to the MX
database. For example, the following command assigns MERLIN as the gateway
for CROW with a preference 100:
TCPIP> SET MX_RECORDS CROW /GATEWAY=MERLIN /PREFERENCE=100
MX routing first checks the local preference but tries it only once in the lookup
process.
See the Compaq TCP/IP Services for OpenVMS Management Command Reference
for a detailed desciption of the SET MX_RECORDS command.
17–4 Configuring and Managing SMTP