-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.46 2004/12/20 14:57:05 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.47 2004/12/20 15:24:27 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
just the host names, not the priorities.
(3) It is now possible to give a list of domains (or IP addresses) to be
- looked up.
+ looked up. The behaviour when one of the lookups defers can be
+ controlled by a keyword.
(4) It is now possible to specify the separator character for use when
multiple records are returned.
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.20 2004/12/17 14:52:44 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.21 2004/12/20 15:24:27 ph10 Exp $
New Features in Exim
--------------------
single item are handled.
The dnsdb lookup fails only if all the DNS lookups fail. If there is a
- temporary DNS error for any of them, the remaining lookups are still done,
- and only if none of them succeed does the dnsdb lookup defer. As long as at
- least one of the DNS lookups yields some data, the dnsdb lookup succeeds.
+ temporary DNS error for any of them, the behaviour is controlled by
+ an optional keyword followed by a comma that may appear before the record
+ type. The possible keywords are "defer_strict", "defer_never", and
+ "defer_lax". With "strict" behaviour, any temporary DNS error causes the
+ whole lookup to defer. With "never" behaviour, a temporary DNS error is
+ ignored, and the behaviour is as if the DNS lookup failed to find anything.
+ With "lax" behaviour, all the queries are attempted, but a temporary DNS
+ error causes the whole lookup to defer only if none of the other lookups
+ succeed. The default is "lax", so the following lookups are equivalent:
+
+ ${lookup dnsdb{defer_lax,a=one.host.com:two.host.com}}
+ ${lookup dnsdb{a=one.host.com:two.host.com}}
+
+ Thus, in the default case, as long as at least one of the DNS lookups
+ yields some data, the dnsdb lookup succeeds.
15. It is now possible to specify the character to be used as a separator when
a dnsdb lookup returns data from more than one DNS record. The default is a
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.8 2004/12/20 14:57:05 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.9 2004/12/20 15:24:28 ph10 Exp $
EXIM ACKNOWLEDGEMENTS
Patch for more daemon exiwhat information
Patch for -dd
Patch for mxh lookup type in dnsdb
+ Patch for defer_foo in dndsb
Giuliano Gavazzi Patches for OSX compilation
Dominic Germain Patch for exiqgrep MacOS X bug
Oliver Gorwits $load_average patch
-/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.5 2004/11/25 14:31:28 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.6 2004/12/20 15:24:28 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
separator character that is used when multiple records are found. The default
separator is newline.
-(b) If the next sequence of characters is a sequence of letters and digits
+(b) If the next sequence of characters is 'defer_FOO' followed by a comma,
+the defer behaviour is set to FOO. The possible behaviours are: 'strict', where
+any defer causes the whole lookup to defer; 'lax', where a defer causes the
+whole lookup to defer only if none of the DNS queries succeeds; and 'never',
+where all defers are as if the lookup failed. The default is 'lax'.
+
+(c) If the next sequence of characters is a sequence of letters and digits
followed by '=', it is interpreted as the name of the DNS record type. The
-default is "A".
+default is "TXT".
-(c) Then there follows list of domain names. This is a generalized Exim list,
+(d) Then there follows list of domain names. This is a generalized Exim list,
which may start with '<' in order to set a specific separator. The default
separator, as always, is colon. */
int size = 256;
int ptr = 0;
int sep = 0;
+int defer_mode = PASS;
int type = T_TXT;
int failrc = FAIL;
uschar *outsep = US"\n";
while (isspace(*keystring)) keystring++;
}
+/* Check for a defer behaviour keyword. */
+
+if (strncmpic(keystring, US"defer_", 6) == 0)
+ {
+ keystring += 6;
+ if (strncmpic(keystring, US"strict", 6) == 0)
+ {
+ defer_mode = DEFER;
+ keystring += 6;
+ }
+ else if (strncmpic(keystring, US"lax", 3) == 0)
+ {
+ defer_mode = PASS;
+ keystring += 3;
+ }
+ else if (strncmpic(keystring, US"never", 5) == 0)
+ {
+ defer_mode = OK;
+ keystring += 5;
+ }
+ else
+ {
+ *errmsg = US"unsupported dnsdb defer behaviour";
+ return DEFER;
+ }
+ while (isspace(*keystring)) keystring++;
+ if (*keystring++ != ',')
+ {
+ *errmsg = US"dnsdb defer behaviour syntax error";
+ return DEFER;
+ }
+ while (isspace(*keystring)) keystring++;
+ }
+
/* If the keystring contains an = this must be preceded by a valid type name. */
if ((equals = Ustrchr(keystring, '=')) != NULL)
if (rc == DNS_NOMATCH || rc == DNS_NODATA) continue;
if (rc != DNS_SUCCEED)
{
- failrc = DEFER;
- continue;
+ if (defer_mode == DEFER) return DEFER; /* always defer */
+ else if (defer_mode == PASS) failrc = DEFER; /* defer only if all do */
+ continue; /* treat defer as fail */
}
/* Search the returned records */