diff options
author | Phil Pennock <pdp@exim.org> | 2012-05-18 15:35:32 -0400 |
---|---|---|
committer | Phil Pennock <pdp@exim.org> | 2012-05-18 15:35:32 -0400 |
commit | 8ee4b30ec5b2767efb8d24b3dd9c2dda33679f0b (patch) | |
tree | 2163a553cd775fdc04c97d58e33e32a504a81f16 /src | |
parent | 619b2b25bb4e66b2b2a27d3cc84d6ba00ede0ba4 (diff) |
SPF multiple strings join on "".
Patch from Janne Snabb.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/lookups/dnsdb.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index 3fd9f981b..be090cf78 100644 --- a/src/src/lookups/dnsdb.c +++ b/src/src/lookups/dnsdb.c @@ -96,7 +96,8 @@ separator is newline. character used for multiple items of text in "TXT" records. Alternatively, if the next character is ';' then these multiple items are concatenated with no separator. With neither of these options specified, only the first item -is output. +is output. Similarly for "SPF" records, but the default for joining multiple +items in one SPF record is the empty string, for direct concatenation. (c) 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 @@ -163,6 +164,14 @@ if (*keystring == '>') while (isspace(*keystring)) keystring++; } +/* SPF strings should be concatenated without a separator, thus make +it the default if not defined (see RFC 4408 section 3.1.3). +Multiple SPF records are forbidden (section 3.1.2) but are currently +not handled specially, thus they are concatenated with \n by default. */ + +if (type == T_SPF && outsep2 == NULL) + outsep2 = US""; + /* Check for a defer behaviour keyword. */ if (strncmpic(keystring, US"defer_", 6) == 0) |