changeset 149:9581f6e62574

switch to second context wins in all cases
author carl
date Mon, 19 Feb 2007 15:57:24 -0800
parents 9330b8d6a56b
children a23ef169d322
files ChangeLog NEWS configure.in src/context.cpp tld.conf xml/dnsbl.in
diffstat 6 files changed, 23 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 30 16:27:49 2007 -0800
+++ b/ChangeLog	Mon Feb 19 15:57:24 2007 -0800
@@ -1,5 +1,10 @@
     $Id$
 
+5.28 2007-02-19
+    Change the conflict resolution algorithm to "second one wins" if we
+    have two contexts that both define env_to user@.  Update ICANN tld
+    list.
+
 5.27 2007-01-30
     Allow 'inherit' as an env_from target. Documentation cleanup
     from G.W. Haywood.
--- a/NEWS	Tue Jan 30 16:27:49 2007 -0800
+++ b/NEWS	Mon Feb 19 15:57:24 2007 -0800
@@ -1,6 +1,7 @@
     $Id$
 
-5.27 2007-01-30 Allow 'inherit' as an env_from target
+5.28 2007-02-19 Change conflict resolution to "second context wins". Update ICANN tld list,
+5.27 2007-01-30 Allow 'inherit' as an env_from target.
 5.26 2006-12-04 Fix bug at 5.23 that prevented seeing host names in the mail bodies
 5.25 2006-10-15 Dump the effective dnsbl list with the -c switch
 5.24 2006-10-15 Allow child and parent context to specify the same fully qualified env_to address
--- a/configure.in	Tue Jan 30 16:27:49 2007 -0800
+++ b/configure.in	Mon Feb 19 15:57:24 2007 -0800
@@ -1,6 +1,6 @@
 
 AC_PREREQ(2.59)
-AC_INIT(dnsbl,5.27,carl@five-ten-sg.com)
+AC_INIT(dnsbl,5.28,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
--- a/src/context.cpp	Tue Jan 30 16:27:49 2007 -0800
+++ b/src/context.cpp	Mon Feb 19 15:57:24 2007 -0800
@@ -420,20 +420,6 @@
 	context_map::iterator i = env_to.find(to);
 	if (i != env_to.end()) {
 		CONTEXTP  c = (*i).second;
-		int 	  s = strlen(to);
-		bool	 at = s && (to[s-1] == '@');
-		if (at && con->is_parent(c->get_parent())) {
-			if (debug_syslog) {
-				char oldname[maxlen];
-				char newname[maxlen];
-				char *oldn = c->get_full_name(oldname, maxlen);
-				char *newn = con->get_full_name(newname, maxlen);
-				char buf[maxlen*3];
-				snprintf(buf, maxlen*3, "both %s and %s claim envelope to %s, the first one wins", oldn, newn, to);
-				my_syslog(buf);
-			}
-			return; 	// don't take over user@ entries from your ancestors children
-		}
 		if ((c != con) && (c != con->get_parent())) {
 			if (debug_syslog) {
 				char oldname[maxlen];
--- a/tld.conf	Tue Jan 30 16:27:49 2007 -0800
+++ b/tld.conf	Mon Feb 19 15:57:24 2007 -0800
@@ -22,9 +22,10 @@
 travel
 
 #
-# extra country codes that are in the root as of 2006-12-12
+# extra (obsolete?) country codes that are in the root as of 2007-02-12
 #
-tp  # East Timor, obsolete
+yu  # Yugoslavia
+su  # soviet union
 
 #
 # iana root tlds from http://www.iana.org/cctld/cctld-whois.htm as of 2006-12-12
--- a/xml/dnsbl.in	Tue Jan 30 16:27:49 2007 -0800
+++ b/xml/dnsbl.in	Mon Feb 19 15:57:24 2007 -0800
@@ -656,16 +656,6 @@
                                 # so all mail TO these env_to addresses is accepted
     };
 
-    context abuse {
-        dnsbl_list xbl;
-        content off {};
-        env_to {
-            abuse@;             # no content filtering on abuse reports
-            postmaster@;        # ""
-        };
-        env_from unknown {};    # ignore all parent white/black listing
-    };
-
     context minimal {
         dnsbl_list sbl dul;
         content on {};
@@ -730,6 +720,18 @@
         };
     };
 
+    # this is at the end, so that these abuse@ and postmaster@ entries will
+    # override any conflicting entries inside the customer contexts.
+    context abuse {
+        dnsbl_list xbl;
+        content off {};
+        env_to {
+            abuse@;             # no content filtering on abuse reports
+            postmaster@;        # ""
+        };
+        env_from unknown {};    # ignore all parent white/black listing
+    };
+
     env_from unknown {
         dcc_from { include "/var/dcc/whitecommon"; };   # copy the dcc OK/MANY values (env_from, substitute mail_host) into this context
         abuse@              abuse;      # replies to abuse reports use the abuse context