Apr 12
作者: 肖建彬 | 可以转载, 转载时务必以超链接形式标明文章原始出处和作者信息及版权声明
网址:http://www.xiaojb.com/archives/mailtech/antispam-ptr.shtml
网址:http://www.xiaojb.com/archives/mailtech/antispam-ptr.shtml
做了这么多年的邮件系统,跟spam对着干的时候倒是很少,今天分析了一个maillog,开始根据日志中的反解析出来的ptr记录判断垃圾邮件源
grep " connect from" /var/log/maillog| grep -v "unknown" |cut -d '[' -f2 | cut -d' ' -f4 > ptrlist cat ptrlist|sort |uniq -c|sort -rn > ptrlist2
可以一些这样的地址
21 cm218-255-240-65.hkcable.com.hk
12 cm218-253-41-134.hkcable.com.hk
10 cm218-253-41-124.hkcable.com.hk
9 cm218-253-41-138.hkcable.com.hk
8 219-70-169-20.cable.dynamic.giga.net.tw
7 cm218-253-41-137.hkcable.com.hk
google了一下“hkcable.com.hk” 垃圾邮件,hkcael.com.hk是香港有线的动态IP,早已经被列入黑名单了,然后又从日志中得到了更多的动态地址的ptr记录信息,一起加到了client的黑名单中。
注意:1、postfix的配置不能是”smtpd_peername_lookup = no”
2、parent_domain_matches_subdomains这个参数中必须有smtpd_access_maps。否则access中的hkcable.com.hk REJECT不能命中cm218-253-41-138.hkcable.com.hk这样的subdomain。
Recent Comments