From 8f6dc30fef1f81d25f21342f08682653e8b16de2 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Tue, 27 Sep 2016 15:28:25 +0200 Subject: [PATCH] [Test] Extend SPF tests --- test/functional/cases/115_dmarc.robot | 15 +++++++++++++++ test/functional/configs/plugins.conf | 3 +++ 2 files changed, 18 insertions(+) diff --git a/test/functional/cases/115_dmarc.robot b/test/functional/cases/115_dmarc.robot index 289572992..583786e64 100644 --- a/test/functional/cases/115_dmarc.robot +++ b/test/functional/cases/115_dmarc.robot @@ -82,11 +82,21 @@ SPF DNSFAIL UNRESOLVEABLE INCLUDE ... -i 37.48.67.26 -F x@openarena.za.net Check Rspamc ${result} R_SPF_DNSFAIL +SPF DNSFAIL FAILED INCLUDE + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... -i 8.8.8.8 -F x@fail2.org.org.za + Check Rspamc ${result} R_SPF_DNSFAIL + SPF ALLOW UNRESOLVEABLE INCLUDE ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml ... -i 8.8.8.8 -F x@openarena.za.net Check Rspamc ${result} R_SPF_ALLOW +SPF ALLOW FAILED INCLUDE + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... -i 8.8.4.4 -F x@fail2.org.org.za + Check Rspamc ${result} R_SPF_ALLOW + SPF NA NA ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml ... -i 8.8.8.8 -F x@za @@ -107,6 +117,11 @@ SPF PERMFAIL UNRESOLVEABLE REDIRECT ... -i 8.8.8.8 -F x@cacophony.za.org Check Rspamc ${result} R_SPF_PERMFAIL +SPF DNSFAIL FAILED REDIRECT + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml + ... -i 8.8.8.8 -F x@fail1.org.org.za + Check Rspamc ${result} R_SPF_DNSFAIL + SPF PERMFAIL ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml ... -i 8.8.8.8 -F x@xzghgh.za.org diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf index 1e0309082..05fd4c33c 100644 --- a/test/functional/configs/plugins.conf +++ b/test/functional/configs/plugins.conf @@ -3,6 +3,9 @@ options = { url_tld = "${URL_TLD}" pidfile = "${TMPDIR}/rspamd.pid" lua_path = "${TESTDIR}/../../contrib/lua-fun/?.lua" + dns { + nameserver = ["8.8.8.8", "8.8.4.4"]; + } } logging = { type = "file", -- 2.39.5