diff -U4 -r exim-4.67/doc/spec.txt exim-4.67+dnslist-match/doc/spec.txt --- exim-4.67/doc/spec.txt 2007-04-17 14:06:40.000000000 +0100 +++ exim-4.67+dnslist-match/doc/spec.txt 2007-06-03 09:54:04.000000000 +0100 @@ -9565,8 +9565,13 @@ When a client host is found to be on a DNS (black) list, the list's domain name is put into this variable so that it can be included in the rejection message. +$dnslist_match + + When a client host is found to be on a DNS (black) list, the key used for + the lookup which matched is placed in this variable. + $dnslist_text When a client host is found to be on a DNS (black) list, the contents of any associated TXT record are placed in this variable. diff -U4 -r exim-4.67/src/expand.c exim-4.67+dnslist-match/src/expand.c --- exim-4.67/src/expand.c 2007-04-17 14:06:39.000000000 +0100 +++ exim-4.67+dnslist-match/src/expand.c 2007-06-03 09:55:04.000000000 +0100 @@ -413,8 +413,9 @@ { "dk_status", vtype_dk_verify, NULL }, { "dk_testing", vtype_dk_verify, NULL }, #endif { "dnslist_domain", vtype_stringptr, &dnslist_domain }, + { "dnslist_match", vtype_stringptr, &dnslist_match }, { "dnslist_text", vtype_stringptr, &dnslist_text }, { "dnslist_value", vtype_stringptr, &dnslist_value }, { "domain", vtype_stringptr, &deliver_domain }, { "domain_data", vtype_stringptr, &deliver_domain_data }, diff -U4 -r exim-4.67/src/globals.c exim-4.67+dnslist-match/src/globals.c --- exim-4.67/src/globals.c 2007-04-17 14:06:39.000000000 +0100 +++ exim-4.67+dnslist-match/src/globals.c 2007-06-03 09:54:28.000000000 +0100 @@ -520,8 +520,9 @@ uschar *dns_ipv4_lookup = NULL; int dns_retrans = 0; int dns_retry = 0; uschar *dnslist_domain = NULL; +uschar *dnslist_match = NULL; uschar *dnslist_text = NULL; uschar *dnslist_value = NULL; tree_node *domainlist_anchor = NULL; int domainlist_count = 0; diff -U4 -r exim-4.67/src/globals.h exim-4.67+dnslist-match/src/globals.h --- exim-4.67/src/globals.h 2007-04-17 14:06:39.000000000 +0100 +++ exim-4.67+dnslist-match/src/globals.h 2007-06-03 09:54:42.000000000 +0100 @@ -299,8 +299,9 @@ extern uschar *dns_ipv4_lookup; /* For these domains, don't look for AAAA (or A6) */ extern int dns_retrans; /* Retransmission time setting */ extern int dns_retry; /* Number of retries */ extern uschar *dnslist_domain; /* DNS (black) list domain */ +extern uschar *dnslist_match; /* DNS (black) list match */ extern uschar *dnslist_text; /* DNS (black) list text message */ extern uschar *dnslist_value; /* DNS (black) list IP address */ extern tree_node *domainlist_anchor; /* Tree of defined domain lists */ extern int domainlist_count; /* Number defined */ diff -U4 -r exim-4.67/src/verify.c exim-4.67+dnslist-match/src/verify.c --- exim-4.67/src/verify.c 2007-04-17 14:06:40.000000000 +0100 +++ exim-4.67+dnslist-match/src/verify.c 2007-06-03 09:56:34.000000000 +0100 @@ -3027,8 +3027,9 @@ iplist, bitmask, match_type, defer_return); if (rc == OK) { dnslist_domain = string_copy(domain_txt); + dnslist_match = string_copy(sender_host_address); HDEBUG(D_dnsbl) debug_printf("=> that means %s is listed at %s\n", sender_host_address, dnslist_domain); } if (rc != FAIL) return rc; /* OK or DEFER */ @@ -3061,8 +3062,9 @@ if (rc == OK) { dnslist_domain = string_copy(domain_txt); + dnslist_match = string_copy(keydomain); HDEBUG(D_dnsbl) debug_printf("=> that means %s is listed at %s\n", keydomain, dnslist_domain); return OK; }