diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-10-04 16:22:37 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-10-04 16:29:45 +0200 |
commit | 6069b963704a240d83e4fd0d3c516b73dab5a37f (patch) | |
tree | 433b9bbee6a2fe268b0ede95fbf0fc6168da6195 /test | |
parent | d7d8e603ee984d33c014baf2464c7c754b7dbeb8 (diff) | |
download | rspamd-6069b963704a240d83e4fd0d3c516b73dab5a37f.tar.gz rspamd-6069b963704a240d83e4fd0d3c516b73dab5a37f.zip |
[Test] Add some missing testcases for DKIM/DMARC
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/cases/115_dmarc.robot | 22 | ||||
-rw-r--r-- | test/functional/messages/dmarc/bad_dkim3.eml | 17 | ||||
-rw-r--r-- | test/functional/messages/dmarc/dmarc_tmpfail.eml | 17 |
3 files changed, 56 insertions, 0 deletions
diff --git a/test/functional/cases/115_dmarc.robot b/test/functional/cases/115_dmarc.robot index 2a7d72580..04ba5823d 100644 --- a/test/functional/cases/115_dmarc.robot +++ b/test/functional/cases/115_dmarc.robot @@ -67,6 +67,16 @@ DMARC SUBDOMAIN PASS SPF RELAXED ALIGNMENT ... -i 37.48.67.26 --from foo@mom.za.org Check Rspamc ${result} DMARC_POLICY_ALLOW +DMARC DNSFAIL + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/dmarc_tmpfail.eml + ... -i 37.48.67.26 --from foo@mom.za.org + Check Rspamc ${result} DMARC_DNSFAIL + +DMARC NA NXDOMAIN + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/utf.eml + ... -i 37.48.67.26 --from foo@mom.za.org + Check Rspamc ${result} DMARC_NA + DKIM PERMFAIL NXDOMAIN ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim2.eml ... -i 37.48.67.26 @@ -77,6 +87,17 @@ DKIM PERMFAIL BAD RECORD ... -i 37.48.67.26 Check Rspamc ${result} R_DKIM_PERMFAIL +DKIM TEMPFAIL SERVFAIL + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim3.eml + ... -i 37.48.67.26 + Check Rspamc ${result} R_DKIM_TEMPFAIL + Should Contain ${result.stdout} DMARC_DNSFAIL + +DKIM NA NOSIG + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/utf.eml + ... -i 37.48.67.26 + Check Rspamc ${result} R_DKIM_NA + SPF PERMFAIL UNRESOLVEABLE INCLUDE ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml ... -i 37.48.67.26 -F x@fail3.org.org.za @@ -86,6 +107,7 @@ 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 + Should Contain ${result.stdout} DMARC_DNSFAIL SPF ALLOW UNRESOLVEABLE INCLUDE ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml diff --git a/test/functional/messages/dmarc/bad_dkim3.eml b/test/functional/messages/dmarc/bad_dkim3.eml new file mode 100644 index 000000000..40dc525c9 --- /dev/null +++ b/test/functional/messages/dmarc/bad_dkim3.eml @@ -0,0 +1,17 @@ +Date: Tue, 09 Aug 2016 10:01:27 +0200 +Message-ID: <20160809100127@rspamd.tk> +From: Rspamd <foo@rspamd.tk> +To: foo@rspamd.tk +Subject: hello +Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes +MIME-Version: 1.0 +Content-Disposition: inline +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dnssec-failed.org; s=testdkim1; + t=1470729879; h=from:subject:date:message-id:to:mime-version:content-type; + bh=7HkRgYnNru3SR2EWfgWU8yhM0MOH6ZZrPoEIgNIh8wc=; + b=kTIV4jcgv9sWFh2JFrS/+PcNxiloituqjmHHqeJOTfa+/9C+Er8BjnMysTJyYVq36Gnv0OZDgLr3Yy4YP5Lzbt1M9ZdN5cJqO7yn1N7wyaGfkt++b09rIYBy5Dkk7OWyP3cDThqDzv8C9heSvqBSEsirFsbt3Wx2g/hWiJlnjew= + + +hello + + diff --git a/test/functional/messages/dmarc/dmarc_tmpfail.eml b/test/functional/messages/dmarc/dmarc_tmpfail.eml new file mode 100644 index 000000000..1c8db5b82 --- /dev/null +++ b/test/functional/messages/dmarc/dmarc_tmpfail.eml @@ -0,0 +1,17 @@ +Date: Tue, 09 Aug 2016 10:01:27 +0200 +Message-ID: <20160809100127@rspamd.tk> +From: Rspamd <foo@dnssec-failed.org> +To: foo@rspamd.tk +Subject: hello +Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes +MIME-Version: 1.0 +Content-Disposition: inline +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rspamd.tk; s=testdkim; + t=1470729879; h=from:subject:date:message-id:to:mime-version:content-type; + bh=7HkRgYnNru3SR2EWfgWU8yhM0MOH6ZZrPoEIgNIh8wc=; + b=kTIV4jcgv9sWFh2JFrS/+PcNxiloituqjmHHqeJOTfa+/9C+Er8BjnMysTJyYVq36Gnv0OZDgLr3Yy4YP5Lzbt1M9ZdN5cJqO7yn1N7wyaGfkt++b09rIYBy5Dkk7OWyP3cDThqDzv8C9heSvqBSEsirFsbt3Wx2g/hWiJlnjew= + + +hello + + |