ietf-smtp
[Top] [All Lists]

RFC 2821 Address Resolution

2004-01-04 05:40:15

I have a question about MX record lookups.  The RFC discusses about
expanding or creating the list of IP addresses that a SMTP send mail session
will attempt.   I would like to see what other smtp developers will do with
the MX lookup, for example for AOL.COM,  to generate the final
sorted/ordered list of IPs:

Here is a current snap shot of a NSLOOKUP MX lookup for aol.com and for
yahoo.com

D:\local\wc5\wcsmtp\wcdns>nslookup -querytype=mx aol.com
Server:  ns.bct.bellsouth.net
Address:  205.152.110.252

Non-authoritative answer:
aol.com MX preference = 15, mail exchanger = mailin-02.mx.aol.com
aol.com MX preference = 15, mail exchanger = mailin-03.mx.aol.com
aol.com MX preference = 15, mail exchanger = mailin-04.mx.aol.com
aol.com MX preference = 15, mail exchanger = mailin-01.mx.aol.com

aol.com nameserver = dns-07.ns.aol.com
aol.com nameserver = dns-01.ns.aol.com
aol.com nameserver = dns-02.ns.aol.com
aol.com nameserver = dns-06.ns.aol.com
mailin-01.mx.aol.com    internet address = 64.12.137.89
mailin-01.mx.aol.com    internet address = 64.12.137.184
mailin-01.mx.aol.com    internet address = 64.12.138.57
mailin-01.mx.aol.com    internet address = 64.12.138.152
mailin-01.mx.aol.com    internet address = 205.188.156.185
mailin-01.mx.aol.com    internet address = 205.188.158.121
mailin-01.mx.aol.com    internet address = 205.188.159.57
mailin-02.mx.aol.com    internet address = 205.188.158.121
mailin-02.mx.aol.com    internet address = 205.188.159.57
mailin-02.mx.aol.com    internet address = 64.12.137.89
mailin-02.mx.aol.com    internet address = 64.12.137.184
mailin-02.mx.aol.com    internet address = 64.12.138.89
mailin-02.mx.aol.com    internet address = 64.12.138.120
mailin-02.mx.aol.com    internet address = 205.188.156.185

D:\local\wc5\wcsmtp\wcdns>nslookup -querytype=mx yahoo.com
Server:  ns.bct.bellsouth.net
Address:  205.152.110.252

Non-authoritative answer:
yahoo.com       MX preference = 1, mail exchanger = mx2.mail.yahoo.com
yahoo.com       MX preference = 5, mail exchanger = mx4.mail.yahoo.com
yahoo.com       MX preference = 1, mail exchanger = mx1.mail.yahoo.com

yahoo.com       nameserver = ns1.yahoo.com
yahoo.com       nameserver = ns2.yahoo.com
yahoo.com       nameserver = ns3.yahoo.com
yahoo.com       nameserver = ns4.yahoo.com
yahoo.com       nameserver = ns5.yahoo.com
mx1.mail.yahoo.com      internet address = 64.157.4.79
mx1.mail.yahoo.com      internet address = 64.156.215.5
mx1.mail.yahoo.com      internet address = 64.156.215.6
mx1.mail.yahoo.com      internet address = 64.156.215.7
mx1.mail.yahoo.com      internet address = 64.157.4.78
mx2.mail.yahoo.com      internet address = 64.157.4.78
mx2.mail.yahoo.com      internet address = 64.156.215.5
mx2.mail.yahoo.com      internet address = 64.156.215.6
mx4.mail.yahoo.com      internet address = 66.218.86.156
mx4.mail.yahoo.com      internet address = 66.218.86.253
mx4.mail.yahoo.com      internet address = 66.218.86.254
mx4.mail.yahoo.com      internet address = 67.28.114.32
mx4.mail.yahoo.com      internet address = 216.155.197.63

Based on each snap shot, what would you generate (and why) for total
possible IP list, disregarding system policy options a server might offer to
limit the total servers to try?

I ask because I have learned a few things lately about the current design of
our DNS MX resolver resulting from an initial investigation why Microsoft
Window socket function gethostbyname() returned the same IP address for a
single MX, multi-home (multiple A records) domain.  The DNS A record lookup
shows a load balancing/sharing (rotation of the A records), but
gethostbyname() seems to return its internal cache for the single MX
exchange name lookup.

Well, looking at how DNS resolves an MX lookup, our design to use
gethostbyname() seems to be incorrect and redundant since the A record(s)
may be returned with the MX query.

Also, I noticed the current design of the our resolver is to return the
total servers based on the number of MX records.  So if only 1 MX record is
turned for a multiple A records system,  only 1 attempt is made.   That
seems to be incorrect according to the specs.

I seem I have worked it out according to the specs.  Now I need to verify
the results our new MX resolver.

The logic I used is:

1) Sort the MX records (low to high) preference,
2) For each MX, add the A records to the final list removing duplicate ips.

For aol.com, the final list would be:

mailin-02.mx.aol.com    internet address = 205.188.158.121
mailin-02.mx.aol.com    internet address = 205.188.159.57
mailin-02.mx.aol.com    internet address = 64.12.137.89
mailin-02.mx.aol.com    internet address = 64.12.137.184
mailin-02.mx.aol.com    internet address = 64.12.138.89
mailin-02.mx.aol.com    internet address = 64.12.138.120
mailin-02.mx.aol.com    internet address = 205.188.156.185
mailin-01.mx.aol.com    internet address = 64.12.138.57
mailin-01.mx.aol.com    internet address = 64.12.138.152

what should I do with?

aol.com MX preference = 15, mail exchanger = mailin-03.mx.aol.com
aol.com MX preference = 15, mail exchanger = mailin-04.mx.aol.com

where there is no A records for these exchanged returned in the MX query?

In our current version,  the current logic simply grabs the 4 MX records and
does a gethostbyname() to get the IP.   This didn't solve the load
balancing, but more importantly,  it does not seem to be correct according
to the RFC.  The potential list of servers to try is much higher.

Similarly for yahoo.com the final list would be based on my new lookup
logic:

mx2.mail.yahoo.com      internet address = 64.157.4.78
mx2.mail.yahoo.com      internet address = 64.156.215.5
mx2.mail.yahoo.com      internet address = 64.156.215.6
mx1.mail.yahoo.com      internet address = 64.157.4.79
mx1.mail.yahoo.com      internet address = 64.156.215.7
mx4.mail.yahoo.com      internet address = 66.218.86.156
mx4.mail.yahoo.com      internet address = 66.218.86.253
mx4.mail.yahoo.com      internet address = 66.218.86.254
mx4.mail.yahoo.com      internet address = 67.28.114.32
mx4.mail.yahoo.com      internet address = 216.155.197.63

and finally again, for our current logic, the 3 MX records would be used for
the final list of servers for yahoo.com.

Anyway, what would you think the final list should be?

Thanks in advance for any input you may have on this.

-- 
Hector Santos, Santronics Software, Inc.
http://www.santronics.com



<Prev in Thread] Current Thread [Next in Thread>