changeset 123:ecd97e7eb1f0 stable-5-15

properly return error code with reject reason
author carl
date Wed, 15 Mar 2006 08:21:51 -0800
parents e8971c595845
children ea6f9c812faa
files ChangeLog NEWS configure.in src/dnsbl.cpp
diffstat 4 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 13 08:45:54 2006 -0800
+++ b/ChangeLog	Wed Mar 15 08:21:51 2006 -0800
@@ -1,5 +1,9 @@
     $Id$
 
+5.15 2006-03-15
+    bug fix - we failed to properly set the return code to indicate the
+    reason when rejecting mail for content filtering.
+
 5.14 2006-03-13
     fix typo in the default config file and documentation for using
     multi.surbl.org
--- a/NEWS	Mon Mar 13 08:45:54 2006 -0800
+++ b/NEWS	Wed Mar 15 08:21:51 2006 -0800
@@ -1,5 +1,6 @@
     $Id$
 
+5.15 2006-03-15 bug fix, failed to set reason code when rejecting mail from content filtering
 5.14 2006-03-13 fix typo in default config and documentation for using multi.surbl.org
 5.13 2006-03-12 patch from Jeff Evans <jeffe@tricab.com> to add SURBL/URIBL lookups
 5.12 2006-01-08 use larger resolver buffer to accomodate spammers with many name servers
--- a/configure.in	Mon Mar 13 08:45:54 2006 -0800
+++ b/configure.in	Wed Mar 15 08:21:51 2006 -0800
@@ -1,7 +1,7 @@
 AC_INIT(configure.in)
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(dnsbl,5.14)
+AM_INIT_AUTOMAKE(dnsbl,5.15)
 AC_PATH_PROGS(BASH, bash)
 
 AC_LANG_CPLUSPLUS
--- a/src/dnsbl.cpp	Mon Mar 13 08:45:54 2006 -0800
+++ b/src/dnsbl.cpp	Wed Mar 15 08:21:51 2006 -0800
@@ -995,12 +995,12 @@
 		}
 		bool rejecting = alive.empty(); // if alive is empty, we must have set msg above in acceptable_content()
 		if (!rejecting) {
-			char *msg;
-			if (check_hosts(priv, random, limit, msg, host, ip)) {
+			char *fmt;
+			if (check_hosts(priv, random, limit, fmt, host, ip)) {
 				char adr[sizeof "255.255.255.255"];
 				adr[0] = '\0';
 				inet_ntop(AF_INET, (const u_char *)&ip, adr, sizeof(adr));
-				snprintf(buf, sizeof(buf), msg, host, adr);
+				snprintf(buf, sizeof(buf), fmt, host, adr);
 				msg = buf;
 				rejecting = true;
 			}