tom 2005/06/10 14:29:36 BST
Modified files:
exim-src/src dns.c spam.c
exim-src/src/lookups dnsdb.c
Log:
Fix possible endless loop due to dying spamd
Revision Changes Path
1.7 +2 -0 exim/exim-src/src/dns.c
1.12 +2 -0 exim/exim-src/src/lookups/dnsdb.c
1.7 +8 -0 exim/exim-src/src/spam.c
Index: dns.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/dns.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dns.c 10 May 2005 10:19:11 -0000 1.6
+++ dns.c 10 Jun 2005 13:29:36 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/dns.c,v 1.6 2005/05/10 10:19:11 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/dns.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -555,6 +555,8 @@
name, but avoid scanning more than necessary. Note that we must copy the
contents of any rr blocks returned by dns_next_rr() as they use the same
area in the dnsa block. */
+
+ DEBUG(D_dns) debug_printf("Back in dns_lookup()\n");
cname_rr.data = type_rr.data = NULL;
for (rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS);
Index: spam.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/spam.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- spam.c 10 May 2005 22:39:20 -0000 1.6
+++ spam.c 10 Jun 2005 13:29:36 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/spam.c,v 1.6 2005/05/10 22:39:20 tom Exp $ */
+/* $Cambridge: exim/exim-src/src/spam.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -247,6 +247,14 @@
}
#endif
wrote = send(spamd_sock,spamd_buffer + offset,read - offset,0);
+ if (wrote == -1)
+ {
+ log_write(0, LOG_MAIN|LOG_PANIC,
+ "spam acl condition: %s on spamd socket", strerror(errno));
+ close(spamd_sock);
+ fclose(mbox_file);
+ return DEFER;
+ }
if (offset + wrote != read) {
offset += wrote;
goto again;
Index: dnsdb.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/lookups/dnsdb.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- dnsdb.c 10 May 2005 10:19:11 -0000 1.11
+++ dnsdb.c 10 Jun 2005 13:29:36 -0000 1.12
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/lookups/dnsdb.c,v 1.11 2005/05/10 10:19:11 ph10 Exp $ */
+/* $Cambridge: exim/exim-src/src/lookups/dnsdb.c,v 1.12 2005/06/10 13:29:36 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -259,6 +259,8 @@
found = domain;
rc = dns_special_lookup(&dnsa, domain, type, &found);
+
+ DEBUG(D_lookup) debug_printf("Back in dnsdb_find\n");
if (rc == DNS_NOMATCH || rc == DNS_NODATA) continue;
if (rc != DNS_SUCCEED)