SPF: handle DNS NO_DATA return. Bug 2499
authorWolfgang Breyha <wbreyha@gmx.net>
Thu, 2 Jan 2020 13:16:52 +0000 (13:16 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Thu, 2 Jan 2020 13:16:52 +0000 (13:16 +0000)
src/src/spf.c
test/scripts/4600-SPF/4601
test/stdout/4601

index 1015d77ac03fabbef0fe5dfa386b4307e72c0933..a8318dcda87590c2cdde44f7ada3f622a070e852 100644 (file)
@@ -77,6 +77,7 @@ switch (dns_rc = dns_lookup(dnsa, US domain, rr_type, NULL))
   case DNS_SUCCEED:    srr.herrno = NETDB_SUCCESS;     break;
   case DNS_AGAIN:      srr.herrno = TRY_AGAIN;         break;
   case DNS_NOMATCH:    srr.herrno = HOST_NOT_FOUND;    break;
+  case DNS_NODATA:     srr.herrno = NO_DATA;           break;
   case DNS_FAIL:
   default:             srr.herrno = NO_RECOVERY;       break;
   } 
index 77258a8e884e5f95b91c93e2949a061dd2f80412..96f06a6d12fa2a7807399f148d70bc0178a15632 100644 (file)
@@ -30,6 +30,7 @@ killdaemon
 # - and not crash with non-spf txt records
 # v=spf1 is casr-insensitive
 exim -be
+none      ${lookup {fred@v6.test.ex} spf {HOSTIPV4}}
 temperror ${lookup {fred@test.again.dns} spf {HOSTIPV4}}
 permerror ${lookup {fred@double.example.com} spf {8.8.8.8}}
 permerror ${lookup {fred@doubleplus.example.com} spf {8.8.8.8}}
index de4df33ae0716ff30bae757601a00a789d60928b..cbb4cf502092cfe824420c675c98254edadc1ca4 100644 (file)
@@ -26,6 +26,7 @@ Connecting to 127.0.0.1 port 1224 ... connected
 <<< 250 Accepted
 >>> quit
 End of script
+> none      none
 > temperror temperror
 > permerror permerror
 > permerror permerror