aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2016-09-19 10:27:55 +0200
committerAndrew Lewis <nerf@judo.za.org>2016-09-19 15:03:05 +0200
commit4a09a0c772b6f73dda7c44d637771fd2596f1acc (patch)
tree18c105a5e4bc14f97aab7c40c22f2fc615e399f2 /test/functional
parent3c78823cc7f281030ced24030fe1ed5e2fe201c7 (diff)
downloadrspamd-4a09a0c772b6f73dda7c44d637771fd2596f1acc.tar.gz
rspamd-4a09a0c772b6f73dda7c44d637771fd2596f1acc.zip
[Test] Test DKIM permfail
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/115_dmarc.robot10
-rw-r--r--test/functional/messages/dmarc/bad_dkim1.eml17
-rw-r--r--test/functional/messages/dmarc/bad_dkim2.eml17
3 files changed, 44 insertions, 0 deletions
diff --git a/test/functional/cases/115_dmarc.robot b/test/functional/cases/115_dmarc.robot
index f2a93db02..01692b4b5 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
+DKIM PERMFAIL NXDOMAIN
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim2.eml
+ ... -i 37.48.67.26
+ Check Rspamc ${result} R_DKIM_PERMFAIL
+
+DKIM PERMFAIL BAD RECORD
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml
+ ... -i 37.48.67.26
+ Check Rspamc ${result} R_DKIM_PERMFAIL
+
*** Keywords ***
DMARC Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/dmarc.conf
diff --git a/test/functional/messages/dmarc/bad_dkim1.eml b/test/functional/messages/dmarc/bad_dkim1.eml
new file mode 100644
index 000000000..6b3f32ecc
--- /dev/null
+++ b/test/functional/messages/dmarc/bad_dkim1.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=yoni.za.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/bad_dkim2.eml b/test/functional/messages/dmarc/bad_dkim2.eml
new file mode 100644
index 000000000..fde6cbb6c
--- /dev/null
+++ b/test/functional/messages/dmarc/bad_dkim2.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=asdf.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
+
+