# HG changeset patch
# User carl
# Date 1192322550 25200
# Node ID 505283ab296c55872659167497fe81332cff5ff6
# Parent  0e15a805d295f7c2c63b131c5c44e4b84b86ef32
smtp rejections take precendence over greylisting


diff -r 0e15a805d295 -r 505283ab296c ChangeLog
--- a/ChangeLog	Sun Oct 07 09:21:50 2007 -0700
+++ b/ChangeLog	Sat Oct 13 17:42:30 2007 -0700
@@ -1,5 +1,8 @@
     $Id$
 
+6.12 2007-10-13
+    SMTP rejections take precedence over greylisting.
+
 6.11 2007-10-07
     Add DCC filtering via dccifd. Drop to 60 seconds the time we will
     keep idle smtp verify sockets around. This needs to be about half
diff -r 0e15a805d295 -r 505283ab296c NEWS
--- a/NEWS	Sun Oct 07 09:21:50 2007 -0700
+++ b/NEWS	Sat Oct 13 17:42:30 2007 -0700
@@ -1,5 +1,6 @@
     $Id$
 
+6.12 2007-10-13 SMTP rejections take precedence over greylisting.
 6.11 2007-10-07 Add DCC filtering via dccifd. Fix static buffer referenced by multiple threads.
 6.10 2007-09-23 Don't whitelist addresses with embedded blanks, or the empty path.
 6.09 2007-09-06 Fix memory leak. Update timestamps when receiving from auto-whitelisted sender.
diff -r 0e15a805d295 -r 505283ab296c configure.in
--- a/configure.in	Sun Oct 07 09:21:50 2007 -0700
+++ b/configure.in	Sat Oct 13 17:42:30 2007 -0700
@@ -1,6 +1,6 @@
 
 AC_PREREQ(2.59)
-AC_INIT(dnsbl,6.11,carl@five-ten-sg.com)
+AC_INIT(dnsbl,6.12,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
diff -r 0e15a805d295 -r 505283ab296c src/dnsbl.cpp
--- a/src/dnsbl.cpp	Sun Oct 07 09:21:50 2007 -0700
+++ b/src/dnsbl.cpp	Sat Oct 13 17:42:30 2007 -0700
@@ -1183,11 +1183,6 @@
 		int  bulk = 0;
 		if (priv.want_dccgrey || priv.want_dccbulk) priv.dccifd->mlfi_eom(grey, bulk);
 
-		if (priv.want_dccgrey && grey) {
-			smfi_setreply(ctx, "452", "4.2.1", "temporary greylist embargoed");
-			rc = SMFIS_TEMPFAIL;
-		}
-		else {
 			char buf[maxlen];
 			string msg;
 			string_set alive;
@@ -1227,7 +1222,11 @@
 				}
 			}
 			if (!rejecting) {
-				rc = SMFIS_CONTINUE;
+			if (priv.want_dccgrey && grey) {
+				smfi_setreply(ctx, "452", "4.2.1", "temporary greylist embargoed");
+				rc = SMFIS_TEMPFAIL;
+			}
+			else rc = SMFIS_CONTINUE;
 			}
 			else if (!priv.have_whites) {
 				// can reject the entire message
@@ -1244,7 +1243,6 @@
 				rc = SMFIS_CONTINUE;
 			}
 		}
-	}
 	// reset for a new message on the same connection
 	mlfi_abort(ctx);
 	return rc;