summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Kistner <tom@duncanthrax.net>2005-06-10 13:29:36 +0000
committerTom Kistner <tom@duncanthrax.net>2005-06-10 13:29:36 +0000
commit8d7d227dbc331d56589022692d3eee214f7ab732 (patch)
treebda204212a1e705999fd5cfa85d02bb482357d23
parent2db98699739386432d423a1effc17994c88e0018 (diff)
Fix possible endless loop due to dying spamd
-rw-r--r--src/src/dns.c4
-rw-r--r--src/src/lookups/dnsdb.c4
-rw-r--r--src/src/spam.c10
3 files changed, 15 insertions, 3 deletions
diff --git a/src/src/dns.c b/src/src/dns.c
index c6cd7060f..e7381725f 100644
--- a/src/src/dns.c
+++ b/src/src/dns.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/dns.c,v 1.6 2005/05/10 10:19:11 ph10 Exp $ */
+/* $Cambridge: exim/src/src/dns.c,v 1.7 2005/06/10 13:29:36 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -556,6 +556,8 @@ for (i = 0; i < 10; i++)
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);
rr != NULL;
diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c
index 8133506b2..17bffba42 100644
--- a/src/src/lookups/dnsdb.c
+++ b/src/src/lookups/dnsdb.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.11 2005/05/10 10:19:11 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.12 2005/06/10 13:29:36 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -260,6 +260,8 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
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)
{
diff --git a/src/src/spam.c b/src/src/spam.c
index 3c70f6d99..564145931 100644
--- a/src/src/spam.c
+++ b/src/src/spam.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/spam.c,v 1.6 2005/05/10 22:39:20 tom Exp $ */
+/* $Cambridge: 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 @@ again:
}
#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;