Indy中查询DNS域名的问题,绝对崭新问题!

nickycheng 2003-03-29 12:26:51
在下面这篇文章中

用Delphi编写邮件特快专递程序
http://www.china-pub.com/computers/emook/wzq/056/info.htm
和 Indy的Demo:SMTPRelay中都有一个问题

DNS检索出来的收信服务器结果都有很多个域名。比如查xxx@hotmail.com的收信服务器,就会出来mx1.hotmail.com,ns1.hotmail.com,ns2.hotmail.com.....等等。结果发信的时候就会频繁报错,因为很多域名都是不接收邮件的。也就是说其中好像只有一个服务器是真正正确的。
如foxmail的邮件特快专递好像就能直接解析出正确的哪一个。
这到底是怎么实现的呢??

请各位研究研究啊。我看那个倒霉rfc文档好几天了,都没找到点有用的东西
...全文
92 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
sadprince2008 2003-03-30
  • 打赏
  • 举报
回复
up
nickycheng 2003-03-29
  • 打赏
  • 举报
回复
现在的csdn都怎么了?
我自己顶
nickycheng 2003-03-29
  • 打赏
  • 举报
回复
我找到一些资料:


域名解析结果样例

Answer List

Resource name is : sina.com
Type is : MX Class is : IN
MX Priority : 10 MX Server : mailcn.sina.com

Resource name is : sina.com
Type is : MX Class is : IN
MX Priority : 15 MX Server : mail.sina.com.cn


Authority List

Resource name is : sina.com
Type is : NS Class is : IN
Domain name is : resolver.sina.com

Resource name is : sina.com
Type is : NS Class is : IN
Domain name is : ns2.sina.com


Additional Response List

Resource name is : mailcn.sina.com
Type is : A Class is : IN
IP Address is : 202.106.184.233

Resource name is : mail.sina.com.cn
Type is : A Class is : IN
IP Address is : 202.106.187.150

Resource name is : resolver.sina.com
Type is : A Class is : IN
IP Address is : 206.204.114.135

Resource name is : ns2.sina.com
Type is : A Class is : IN
IP Address is : 209.133.24.135

===================================

Network Working Group P. Mockapetris
Request for Comments: 1035 ISI
November 1987
Obsoletes: RFCs 882, 883, 973

DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION


4. MESSAGES

4.1. Format

All communications inside of the domain protocol are carried in a single
format called a message. The top level format of message is divided
into 5 sections (some of which are empty in certain cases) shown below:

+---------------------+
| Header |
+---------------------+
| Question | the question for the name server
+---------------------+
| Answer | RRs answering the question
+---------------------+
| Authority | RRs pointing toward an authority
+---------------------+
| Additional | RRs holding additional information
+---------------------+

The header section is always present. The header includes fields that
specify which of the remaining sections are present, and also specify
whether the message is a query or a response, a standard query or some
other opcode, etc.

The names of the sections after the header are derived from their use in
standard queries. The question section contains fields that describe a
question to a name server. These fields are a query type (QTYPE), a
query class (QCLASS), and a query domain name (QNAME). The last three
sections have the same format: a possibly empty list of concatenated
resource records (RRs). The answer section contains RRs that answer the
question; the authority section contains RRs that point toward an
authoritative name server; the additional records section contains RRs
which relate to the query, but are not strictly answers for the
question.


我想可以接收邮件的服务器就是分类在Answer中的。但是我不知道怎样用Indy或是DNSQuary查询出对应的服务器地址。
朋友们帮帮忙啦


naughtyboy 2003-03-29
  • 打赏
  • 举报
回复
不清楚
是不是在解析出域名后要对该域名以及相应的端口进行一次扫描?

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧