9 月 062011
 

Is my DNS a Mess? Probably!!

We don’t have time and space here to fix all those problems, but I’d like to concentrate now on:

How to Keep Your DNS from Blocking Mail Delivery from your and your Clients’ Mail Servers

Short, snappy headlines rule, OK!

IPv6, when widely implemented (you do have a plan, don’t you?) will fix a ton of Internet security problems. Until Nirvana arrives, we’ll have to do the best we can with the (DNS) technology in hand, which is a lot better than than mess we’ve got now.

Since I’ve become involved with postfix, a wonderful Mail Tranfser Agent (MTA) by Wietse Venema and IBM, used as the basis of my IMGate project (see link in left column), I’ve learned a lot about how advanced MTA’s such as postfix, qmail, and the latest version of sendmail can be setup to triangulate and validate any other mail servers who want to send them mail.

Using postfix as as example, just take a look at this page: Continue reading »

4 月 062010
 

域名/IP反解析

  在垃圾邮件泛滥的今天,垃圾邮件给我们的生活、工作、学习带来了极大的危害。由于SMTP服务器之间缺乏有效的发送认证机制,即使采用了垃圾邮件识别阻拦技术效果仍旧一般,再者垃圾邮件识别阻拦技术主要是在收到信件后根据一定条件进行识别的,需要耗费大量服务器资源,如果能在信件到达服务器之前就采取一定手段,这样就能大大提高服务器效率了。因此,目前许多邮件服务器如sina.com,hotmail.com,yahoo.com.cn等等都采用了垃圾邮件识别阻拦技术+IP反向解析验证技术以更好的阻拦垃圾邮件。

我们先来了解一下什么是IP反向解析。其实作过DNS服务器的朋友一定会知道DNS服务器里有两个区域,即“正向查找区域”和“反向查找区域”,反向查找区域即是这里所说的IP反向解析,它的作用就是通过查询IP地址的PTR记录来得到该IP地址指向的域名,当然,要成功得到域名就必需要有IP地址的 PTR记录。

那么IP反向解析是怎么被应用到邮件服务器中来阻拦垃圾邮件的呢?我们来看看下面一个例子:

某天,阿Q到A公司拜访,他递上一张名片,名片上写着他来自“黑道俱乐部”以及电话号码等信息,A公司觉得应该对阿Q的来历做个简单调查,于是打电话到阿Q名片上的电话号码所属电信局进行查实,如果电信局告诉A公司其电话号码不属于“黑道俱乐部”,则A公司将拒绝阿Q的拜访,如果其电话号码的确属于“黑道俱乐部”,A公司可能接受阿Q的拜访也可能进一步查实,于是就打电话到“黑道俱乐部”所属注册机构查询,如果得到的答复确认该俱乐部确有此电话号码,则A公司将接受阿Q的拜访,否则仍将拒绝阿Q的拜访。 Continue reading »

4 月 062010
 

什么是SPF

就是Sender Policy Framework。SPF可以防止别人伪造你来发邮件,是一个反伪造性邮件的解决方案。当你定义了你的domain name的SPF记录之后,接收邮件方会根据你的SPF记录来确定连接过来的IP地址是否被包含在SPF记录里面,如果在,则认为是一封正确的邮件,否则则认为是一封伪造的邮件。关于更详细的信息请参考RFC4408(http://www.ietf.org/rfc/rfc4408.txt)

如何增加SPF记录
非常简单,在DNS里面添加TXT记录即可。登陆http://www.openspf.org/在里面输入你的域名,点击Begin,然后会自动得到你域名的一些相关信息。
a 你域名的A记录,一般选择yes,因为他有可能发出邮件。
mx 一般也是yes,MX服务器会有退信等。
ptr 选择no,官方建议的。

a: 有没有其他的二级域名?比如:mail.abc.com和www不在一台server上,则填入mail.abc.com。否则清空。
mx: 一般不会再有其他的mx记录了。
ip4: 你还有没有其他的ip发信?可能你的smtp服务器是独立出来的,那么就填入你的IP地址或者网段。
include: 如果有可能通过一个isp来发信,这个有自己的SPF记录,则填入这个isp的域名,比如:hichina.com
~all: 意思是除了上面的,其他的都不认可。当然是yes了。

好了,点击Continue…..
自动生成了一条SPF记录 Continue reading »

4 月 042010
 

Authentication mechanisms vs. password schemes

Authentication mechanisms and password schemes are often confused, because they have somewhat similar values. For example there is a PLAIN auth mechanism and PLAIN password scheme. But they mean completely different things.

1.Authentication mechanism is a client/server protocol.
It's about how the client and server talk to each others in order to perform the authentication. Most people use only PLAIN authentication, which basically means that the user and password are sent without any kind of encryption to server. SSL/TLS can then be used to provide the encryption to make PLAIN authentication secure.

2.Password scheme is about how the password is hashed in your password database.
If you use a PLAIN scheme, your passwords are stored in cleartext without any hashing in the password database. A popular password scheme MD5-CRYPT (also commonly used in /etc/shadow) where passwords looks like “$1$oDMXOrCA$plmv4yuMdGhL9xekM.q.I/”.

3.Plaintext authentication mechanisms work with ALL password schemes.

4.Non-plaintext authentication mechanisms require either PLAIN password scheme or a mechanism-specific password scheme.