From: Philip Hazel Date: Mon, 12 Sep 2005 13:39:31 +0000 (+0000) Subject: Added log selector "unknown_in_list". X-Git-Tag: exim-4_53~31 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/1130bfb0c80bb04fa0873a075758a8abb84f607a Added log selector "unknown_in_list". --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 08907ffa7..5b1c2fa4c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.219 2005/09/12 10:49:30 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.220 2005/09/12 13:39:31 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -159,6 +159,9 @@ PH/38 When log_selector = +received_sender was set, and the addition of the less than full, an overflow happened when the terminating "\n" was subsequently added. +PH/39 Added a new log selector, "unknown_in_list", which provokes a log entry + when the result of a list match is failure because a DNS lookup failed. + Exim version 4.52 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 15cf0b44d..85be6dc06 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.67 2005/09/12 10:08:53 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.68 2005/09/12 13:39:31 ph10 Exp $ New Features in Exim -------------------- @@ -142,6 +142,10 @@ PH/10 There is a new ACL control called "suppress_local_fixups". This applies (3) Remotely submitted, no fixups applied: the default. (4) Remotely submitted, fixups applied: use control = submission. +PH/11 There is a new log selector, "unknown_in_list", which provokes a log + entry when the result of a list match is failure because a DNS lookup + failed. + Exim version 4.52 ----------------- diff --git a/src/src/globals.c b/src/src/globals.c index a4e37fb4e..78ba19654 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/globals.c,v 1.36 2005/09/12 10:08:54 ph10 Exp $ */ +/* $Cambridge: exim/src/src/globals.c,v 1.37 2005/09/12 13:39:31 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -676,7 +676,8 @@ bit_table log_options[] = { { US"subject", LX_subject }, { US"tls_certificate_verified", LX_tls_certificate_verified }, { US"tls_cipher", LX_tls_cipher }, - { US"tls_peerdn", LX_tls_peerdn } + { US"tls_peerdn", LX_tls_peerdn }, + { US"unknown_in_list", LX_unknown_in_list } }; int log_options_count = sizeof(log_options)/sizeof(bit_table); diff --git a/src/src/macros.h b/src/src/macros.h index 432da931c..57ceceaac 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/macros.h,v 1.18 2005/08/01 13:20:28 ph10 Exp $ */ +/* $Cambridge: exim/src/src/macros.h,v 1.19 2005/09/12 13:39:31 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -390,6 +390,7 @@ set all the bits in a multi-word selector. */ #define LX_tls_certificate_verified 0x80010000 #define LX_tls_cipher 0x80020000 #define LX_tls_peerdn 0x80040000 +#define LX_unknown_in_list 0x80080000 #define L_default (L_connection_reject | \ L_delay_delivery | \ diff --git a/src/src/match.c b/src/src/match.c index 100e4c0cb..18787e8ac 100644 --- a/src/src/match.c +++ b/src/src/match.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/match.c,v 1.8 2005/08/01 13:20:28 ph10 Exp $ */ +/* $Cambridge: exim/src/src/match.c,v 1.9 2005/09/12 13:39:31 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -720,7 +720,12 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) { HDEBUG(D_lists) debug_printf("%s %s (%s)\n", ot, include_unknown? "yes":"no", error); - if (!include_unknown) return FAIL; + if (!include_unknown) + { + if ((log_extra_selector & LX_unknown_in_list) != 0) + log_write(0, LOG_MAIN, "list matching forced to fail: %s", error); + return FAIL; + } log_write(0, LOG_MAIN, "%s: accepted by +include_unknown", error); return OK; } @@ -811,7 +816,12 @@ while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer))) != NULL) HDEBUG(D_lists) debug_printf("%s %s (%s)\n", ot, include_unknown? "yes":"no", error); (void)fclose(f); - if (!include_unknown) return FAIL; + if (!include_unknown) + { + if ((log_extra_selector & LX_unknown_in_list) != 0) + log_write(0, LOG_MAIN, "list matching forced to fail: %s", error); + return FAIL; + } log_write(0, LOG_MAIN, "%s: accepted by +include_unknown", error); return OK; }