&`fail`& keyword causes a &'forced expansion failure'& &-- see section
&<<SECTforexpfai>>& for an explanation of what this means.
-The supported DNS record types are A, CNAME, MX, NS, PTR, SRV, and TXT, and,
-when Exim is compiled with IPv6 support, AAAA (and A6 if that is also
+.new
+The supported DNS record types are A, CNAME, MX, NS, PTR, SPF, SRV, and TXT,
+and, when Exim is compiled with IPv6 support, AAAA (and A6 if that is also
configured). If no type is given, TXT is assumed. When the type is PTR,
the data can be an IP address, written as normal; inversion and the addition of
&%in-addr.arpa%& or &%ip6.arpa%& happens automatically. For example:
+.wen
.code
${lookup dnsdb{ptr=192.168.4.5}{$value}fail}
.endd
white space is ignored.
.cindex "TXT record" "in &(dnsdb)& lookup"
-For TXT records with multiple items of data, only the first item is returned,
+.cindex "SPF record" "in &(dnsdb)& lookup"
+.new
+For TXT and SPF records with multiple items of data, only the first item is returned,
unless a separator for them is specified using a comma after the separator
-character followed immediately by the TXT record item separator. To concatenate
+character followed immediately by the TXT/SPF record item separator. To concatenate
items without a separator, use a semicolon instead.
+.wen
.code
${lookup dnsdb{>\n,: txt=a.b.example}}
${lookup dnsdb{>\n; txt=a.b.example}}
non-compliant senders.
Analysis and variant patch by Todd Lyons.
-NM/04 Bugzilla 1237 - fix cases where printf format usage no indicated
+NM/04 Bugzilla 1237 - fix cases where printf format usage not indicated
Bug report from Lars Müller <lars@samba.org> (via SUSE),
Patch from Dirk Mueller <dmueller@suse.com>
PP/26 Added EXPERIMENTAL_OCSP for OpenSSL.
+PP/27 Applied dnsdb SPF support patch from Janne Snabb.
+
Exim version 4.77
-----------------
"socket activation", but forcing the activated socket to fd 0. We're
interested in adding more support for modern variants.
-10. ${eval } now uses 64-bit values on supporting platforms. A new "G" suffux
+10. ${eval } now uses 64-bit values on supporting platforms. A new "G" suffix
for numbers indicates multiplication by 1024^3.
11. The GnuTLS support has been revamped; the three options gnutls_require_kx,
See "experimental-spec.txt" for more details.
+13. ${lookup dnsdb{ }} supports now SPF record types. They are handled
+ identically to TXT record lookups.
+
Version 4.77
------------
case T_AAAA: return US"AAAA";
case T_A6: return US"A6";
case T_TXT: return US"TXT";
+ case T_SPF: return US"SPF";
case T_PTR: return US"PTR";
case T_SOA: return US"SOA";
case T_SRV: return US"SRV";
#define T_SRV 33
#endif
+/* Many systems do not have T_SPF. */
+
+#ifndef T_SPF
+#define T_SPF 99
+#endif
+
/* It seems that some versions of arpa/nameser.h don't define *any* of the
T_xxx macros, which seem to be non-standard nowadays. Just to be on the safe
side, put in definitions for all the ones that Exim uses. */
#define T_TXT 16
#endif
+/* Many systems do not have T_SPF. */
+#ifndef T_SPF
+#define T_SPF 99
+#endif
+
/* Table of recognized DNS record types and their integer values. */
static const char *type_names[] = {
"mxh",
"ns",
"ptr",
+ "spf",
"srv",
"txt",
"zns"
T_MXH, /* Private type for "MX hostnames" */
T_NS,
T_PTR,
+ T_SPF,
T_SRV,
T_TXT,
T_ZNS /* Private type for "zone nameservers" */
if (ptr != 0) yield = string_cat(yield, &size, &ptr, outsep, 1);
- if (type == T_TXT)
+ if (type == T_TXT || type == T_SPF)
{
if (outsep2 == NULL)
{