qmail错误: CNAME_lookup_failed_temporarily._ #4.4.3
2016-02-25    刘世伟   
打印自: 安恒公司
地址: HTTP://es-lan.anheng.com.cn/news/article.php?articleid=2486
qmail错误: CNAME_lookup_failed_temporarily._ #4.4.3

最近qmail偶尔会有一些域名发邮件出现问题, 日志中写 

Feb 22 16:41:24 localhost qmail: 1456130484.941418 delivery 71082: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/


用这个补丁可以解决:

--- netqmail-1.06/dns.c~	2014-11-09 21:30:43.000000000 +0100
+++ netqmail-1.06/dns.c	2014-11-09 21:32:36.954314782 +0100
@@ -204,32 +204,7 @@
 int dns_cname(sa)
 stralloc *sa;
 {
- int r;
- int loop;
- for (loop = 0;loop < 10;++loop)
-  {
-   if (!sa->len) return loop;
-   if (sa->s[sa->len - 1] == ']') return loop;
-   if (sa->s[sa->len - 1] == '.') { --sa->len; continue; }
-   switch(resolve(sa,T_ANY))
-    {
-     case DNS_MEM: return DNS_MEM;
-     case DNS_SOFT: return DNS_SOFT;
-     case DNS_HARD: return loop;
-     default:
-       while ((r = findname(T_CNAME)) != 2)
-	{
-	 if (r == DNS_SOFT) return DNS_SOFT;
-	 if (r == 1)
-	  {
-	   if (!stralloc_copys(sa,name)) return DNS_MEM;
-	   break;
-	  }
-	}
-       if (r == 2) return loop;
-    }
-  }
- return DNS_HARD; /* alias loop */
+ return 0;
 }

 #define FMT_IAA 40

责任编辑: admin