存档

文章标签 ‘Domain’

给域名添加SPF记录

2009年3月18日

独立域名博客在收到主机寄过来的邮件时,邮件头会经常显示如下两行:

Received-SPF: neutral (google.com: 72.47.192.112 is neither permitted nor denied by best guess record for domain of wordpress@your_domain.com) client-ip=72.47.192.112;

Received-SPF: fail (google.com: domain of wordpress@your_domain.com does not designate 72.47.192.112 as permitted sender) client-ip=72.47.192.112;
Authentication-Results: mx.google.com; spf=hardfail (google.com: domain of wordpress@your_domain.com does not designate 72.47.192.112 as permitted sender) smtp.mail=wordpress@your_domain.com

Received-SPF: softfail (google.com: domain of transitioning wordpress@your_domain.com does not designate 72.47.192.112 as permitted sender) client-ip=72.47.192.112;
Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning wordpress@your_domain.com does not designate 72.47.192.112 as permitted sender) smtp.mail=wordpress@your_domain.com

对一个完美主义者来说,出现“Fail”是不可接受的,这种邮件被Gmail扔进Spam的几率比较大哦。这是你域名的SPF记录没配置好出现验证失败的缘故,那什么是SPF呢?

由于同一个域名可能透过多台的mail server或是ISP寄信,通过IP地址来反向解析看是否为伪造信件的方式就不够用了(我们也经常可以收到发件人是自己的垃圾邮件)。因此就有域名验证的观念出来了,共包括domain key和SPF这两大类,都必须在网域名称的DNS记录中加入一笔记录。

SPF(或是Sender ID)是Sender Policy Framework的缩写。当你定义了你域名的SPF记录后,接收邮件方会根据你的SPF记录来判断连接过来的IP地址是否被包含在SPF记录里面,如果在,则认为是一封正确的邮件,否则则认为是一封伪造的邮件。现在绝大部份反垃圾邮件系统都支持SPF过滤,这种过滤一般不会有误判,除非是邮件系统管理员自己把SPF记录配置错误或遗漏.

至于domain key则是由Yahoo所提出的。必需配合软件和加密技术,比较麻烦。目前使用的也不多。 Google目前所谓的支援domainkey也只是在寄信的时候加入,免得被yahoo退信,本身并没有要求寄件者要有domainkey。

正确设置后邮件头一般显示如下:

Received-SPF: pass (google.com: domain of wordpress@your_domain.com designates 72.47.192.112 as permitted sender) client-ip=72.47.192.112;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of wordpress@your_domain.com designates 72.47.192.112 as permitted sender) smtp.mail=wordpress@your_domain.com

关于SPF是否有设定的必要?一般认为有加上SPF比较好,怕万一碰到哪个收件服务器有采用SenderID机制来过滤信件的话就有用处了。

如何增加SPF记录,非常简单,在DNS里面添加TXT记录即可,可以使用下面两个SPF生成检查工具:
http://www.microsoft.com/mscorp/safety/content/technologies/senderid/wizard/default.aspx
http://old.openspf.org/wizard.html

a 你域名的A记录,一般选择yes,因为他有可能发出邮件,比如我上面提到的Wordpress的回信。
mx 一般也是yes,MX服务器会有退信等。
ptr 选择no,官方建议的。
inlude 如果有可能通过一个isp来发信,isp有自己的SPF记录,则填入这个isp的域名。比如你使用Google Apps,应该增加include:google.com记录,因为你的邮件时从Google服务器发出去的。
ip4: 你还有没有其他的ip发信?可能你的smtp服务器是独立出来的,那么就填入你的IP地址或者网段。
~all: 意思是除了上面的,其他的都不认可。当然是yes了。

再检查下,进入cmd(以Google.com为例):

C:\Documents and Settings\>nslookup
Default Server: resolver1.opendns.com
Address: 208.67.222.222>
> set type=txt
>
> google.com
Server: resolver1.opendns.com
Address: 208.67.222.222

Non-authoritative answer:
google.com text =

“v=spf1 include:_netblocks.google.com ~all”
>
> _netblocks.google.com
Server: resolver1.opendns.com
Address: 208.67.222.222

Non-authoritative answer:
_netblocks.google.com text =

“v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/
2.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 i
0.0/20 ip4:207.126.144.0/20 ?all”
>
>behindgfw.com
Server: resolver1.opendns.com
Address: 208.67.222.222

Non-authoritative answer:
behindgfw.com   text =

“v=spf1 a a:fwolf.com mx include:google.com ~all”

ok,都设置好了,给check-auth@verifier.port25.com发封邮件,很快会有回信告诉你设置是否正确。或者在http://69.56.15.194/找到一个形如XXXX@69.56.15.194的邮箱地址,发封邮件,点击“view sample”就可以看见你的检测结果了。这两种方式都会返回详细的SPF check、DomainKeys check、DKIM check、Sender-ID check结果。

至于那些域名注册商支持添加SPF记录,可以在如下网址检查:
http://www.kitterman.com/spf/txt.html

参考链接:
RFC4408 http://www.ietf.org/rfc/rfc4408.txt
Chifeng

标签: ,

几个域名、主机工具

2007年8月2日

1、Who is Hosting This
可以查询域名是被那家主机商所托管。
2、MyIPneighbors
MyIPneighbors是一个查询共用IP网站的服务。通过输入域名或者网页IP地址,便能够自动搜索出在同一IP上的其它网站列表,可以通过IFrame调用来快速查看网站内容。
3、Web Lookup Tools
域名查询、Mx查询、Whois查询、等等…其实网络上类似工具很多,不过这个够简单。
4、Check Server Headers Tool – HTTP Status Codes Checker
301重定向检测工具,网络上也有很多类似的Server Header检查工具。错误的302重定向有可能象Business.com一样遭Google惩罚,所以一定要认真检查一下确保网站实施了正确的301重定向。

标签: ,

贴一个host文件

2006年4月21日

贴一个host文件,提供本地的域名解析,文件地址windows\system32\drivers\etc\。

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host127.0.0.1 localhost

# 解析国内DNS经常不解析的站点
64.233.185.19 mail.google.com
64.233.161.147 www.google.com
64.233.167.147 groups.google.com
64.233.167.104 groups-beta.google.com
66.249.89.99 google.com
#66.249.89.104 www.google.com

# 屏蔽恶意站点
127.0.0.1 www.cnnic.net.cn
127.0.0.1 www.umov.com
127.0.0.1 3721.com
127.0.0.1 cns.3721,com
127.0.0.1 cnsmin.3721,com
127.0.0.1 download.3721.com
127.0.0.1 bar.baidu.com #百度IE搜索伴侣
127.0.0.1 download.3721.com
127.0.0.1 3721.com #3721网络实名
127.0.0.1 3721.net #3721网络实名
127.0.0.1 cnsmin.3721.com #3721网络实名
127.0.0.1 cnsmin.3721.net #3721网络实名
127.0.0.1 download.3721.com #3721网络实名
127.0.0.1 download.3721.net #3721网络实名
127.0.0.1 www.3721.com #3721网络实名
127.0.0.1 www.3721.net #3721网络实名
127.0.0.1 www.qq101.com ##2004-04-17更新
127.0.0.1 www.qq235.com ##剧毒,真想olo死这个7黑!
127.0.0.1 www.qq520.com
127.0.0.1 www.dj3344.com
127.0.0.1 www.qq168.net
127.0.0.1 www.777888.com
127.0.0.1 www.5dsoft.com
127.0.0.1 www.wokoo.net
127.0.0.1 movie.sx.zj.cn
127.0.0.1 www.yeapple.com
127.0.0.1 xyxy68.8u8.net
127.0.0.1 www.youmiss.com
127.0.0.1 www.cctv8.net
127.0.0.1 www.yyqy.com
127.0.0.1 winzheng.126.com
127.0.0.1 www.sunvod.com
127.0.0.1 www.t168.com
127.0.0.1 www.boliwo.com
127.0.0.1 www.coolcdrom.com
127.0.0.1 www.zhengdian.comoe
127.0.0.1 www.girlchinese.com
127.0.0.1 www.yibinren.com
127.0.0.1 www.mtv51.com
127.0.0.1 www.163 [1].com
127.0.0.1 www.37021.com
127.0.0.1 www.cnqb.net
127.0.0.1 www.qq3344.com
127.0.0.1 www.qq3344.net
127.0.0.1 www.3322.net
127.0.0.1 www.58589.com
127.0.0.1 www.ftlink.net
127.0.0.1 home.kimo.com.tw
127.0.0.1 www.pixpox.com
127.0.0.1 www.k163.com
127.0.0.1 www.pk.com
127.0.0.1 204.177.92.68
127.0.0.1 www.fassia.net
127.0.0.1 www.ehomeday.com
127.0.0.1 www.jinpin.net
127.0.0.1 www.i-lookup.com
127.0.0.1 www.58p.com
127.0.0.1 www.7sou.com
127.0.0.1 www.ok530.com
127.0.0.1 www.58q.com
127.0.0.1 www.58q.com
127.0.0.1 www.0970.net:8000
127.0.0.1 www.qq550.com
127.0.0.1 www.qq720.com
127.0.0.1 http://www.dj3344.com
127.0.0.1 http://www.qq168.net
127.0.0.1 http://www.777888.com
127.0.0.1 http://WWW.5dsoft.com
127.0.0.1 http://www.wokoo.net
127.0.0.1 http://movie.sx.zj.cn
127.0.0.1 http://yeapple.com
127.0.0.1 http://xyxy68.8u8.net
127.0.0.1 http://www.youmiss.com
127.0.0.1 http://www.cctv8.net
127.0.0.1 http://www.kuliao.com
127.0.0.1 http://www.yyqy.com
127.0.0.1 http://winzheng.126.com
127.0.0.1 http://www.sunvod.com
127.0.0.1 http://www.t168.com
127.0.0.1 http://www.boliwo.com
127.0.0.1 http://www.coolcdrom.com
127.0.0.1 http://www.zhengdian.com
127.0.0.1 http://girlchinese.com
127.0.0.1 http://www.yibinren.com
127.0.0.1 http://www.mtv51.com
127.0.0.1 http://www.163[1].c
127.0.0.1 http://www.37021.com
127.0.0.1 http://www.cnqb.net
127.0.0.1 http://www.qq3344.com
127.0.0.1 http://youlove.3322.net/picture.exe
127.0.0.1 http://www.58589.com
127.0.0.1 http://tty.yyun.net
127.0.0.1 http://www.ftlink.net
127.0.0.1 http://home.kimo.com.tw/avnvyou520
127.0.0.1 http://www.pixpox.com
127.0.0.1 http://www.k163.com
127.0.0.1 http://www.pk.com
127.0.0.1 http://www.xxx.com
127.0.0.1 http://204.177.92.68/rotate/r3.jhtml
127.0.0.1 http://www.fassia.net
127.0.0.1 http://www.ehomeday.com
127.0.0.1 http://www.jinpin.net
127.0.0.1 http://zbszx.vicp.net
127.0.0.1 http://hothack.home
127.0.0.1 http://www.girl008.com
127.0.0.1 http://www.a521.com
127.0.0.1 http://www.126p.com
127.0.0.1 hjcz.www30.cnidc.cn/wyhk/love.html
127.0.0.1 hjcz.www30.cnidc.cn/wyhk/shan.html
127.0.0.1 hjcz.www30.cnidc.cn/wyhk/aibuwan.html
127.0.0.1 hjcz.www30.cnidc.cn/wyhk/shiyan1.html
127.0.0.1 hjcz.www30.cnidc.cn/wyhk/g1.html
127.0.0.1 http://www.ttjj.com.cn
127.0.0.1 http://www.aogo.net
127.0.0.1 www.mydj2005.com
127.0.0.1 http://community.rising.com.cn
127.0.0.1 52.www.tvliao.com
127.0.0.1 http://www.7mao.com

标签: , ,