2011年4月25日星期一

Mail Exchangers 避免循环转发

比如 abc.com 有以下3条 mx 记录:

abc.com. IN MX 0 0.abc.com.
abc.com. IN MX 10 11.abc.com.
abc.com. IN MX 10 12.abc.com.
abc.com. IN MX 20 21.abc.com.


向 0.abc.com 投递失败后,发送方会向 11 或者 12 进行投递,若 11 和 12 只有转发功能,则依然需要查询 mx 记录,然后再次进行投递。11 收到邮件后可能会投递给 12,12 收到邮件后会投递给 11,循环由此产生。
为解决此问题,转发服务器会自动 disable 优先级不高于自己的 mx 记录(即只保留优先级比自己高的记录),从而达到此目的。

比如对于 abc.com,11 在收到邮件后,根据自己的优先级10,会仅仅向 0 转发邮件,而停止向 12 和 21 的转发,这样就避免了循环投递的情况。

不过可以假设一个存在view情况,在 view1 中 11 的优先级高于 12,但是在 view2中 12 的优先级高于 11,这样是不是依然可能存在循环投递的情况。

nslookup 和 dig 的差别

One major difference between nslookup and dig is that dig doesn't apply the search list

nslookup 和 name server 的差别

To query like a resolver, you use nslookup's default settings. To query like a name server, use set norecurse and set nosearch. On the command line, that's nslookup -norecurse -nosearch.

简单的说,nslookup默认采用searchlist并在查询时设置递归位。经过set -norecurse 和 set -nosearch 后,nslookup的行为和name server的行为一致。

resolver 和 nslookup 的不同

resolv.conf中若配置一条name server记录,二者表现相同。若配置多条记录:
The resolver tries the first nameserver, then the second, then the first, then the second, until it receives a response or gives up. The resolver does this for every query. On the other hand, nslookup tries the first nameserver in resolv.conf and keeps retrying until it finally gives up on the first nameserver and tries the second. Once it gets a response, it locks onto that server and doesn't try the next.

2011年4月22日星期五

resolver 和 name server 的不同

resolver 一般是指系统提供解析服务的库文件,是它去向 name server 进行查询。简单的解释如下:
The resolver is the client half of the Domain Name System. It's responsible for translating a program's request for host information into a query to a name server and for translating the response into an answer for the program.


Name servers' query messages aren't that much different from resolvers' query messages in the first place. The primary difference in the query messages is that resolvers request recursive resolution and name servers seldom do. Requesting recursion is the default with nslookup, so you have to explicitly turn it off. The difference in operation between a resolver and a name server is that the resolver applies the search list, and the name server doesn't. By default, nslookup applies the search list, so that must be explicitly turned off as well. Of course, judicious use of the trailing dot will have the same effect.

2011年4月18日星期一

activity 和 desktop的差别

Plasma 中引入了 activity 的概念,虽然多个activity 和 desktop 从表面看起来差不多,但还是有很大的差别的。以下摘自 suse 的帮助文档,不翻译了。

Plasma 的组成:
The essence of Plasma revolves around two basic concepts: Plasma Widgets and Containments. Widgets is Applets, or small applications that live on the desktop. Containments is Applets that act as the container for the Plasma widgets
On a default desktop, there are two main elements: the Panel and the Desktop itself. Both are containments in the Plasma sense.

Plasma 和 desktop 的差别:
The desktop toolbox, accessed via the top right corner has a button for displaying your activities, of which Plasma allows you to have more than one. Basically, that is multiple desktop containments hosting multiple sets of Plasma widgets. Display the “Activities” bar, choose Add activity to create a new containment, select your new containment and customize suiting your taste. Plasma’s activities and KWin’s desktop grid are similar in that respect, but there is a fundamental difference. While virtual desktop are used to group and organize windows, Plasma’s activities are used to group and organize Plasma widgets. This way, you can switch between activities and have relevant Plasma widgets supporting the task you're currently trying to accomplish.