]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Test DKIM permfail
authorAndrew Lewis <nerf@judo.za.org>
Mon, 19 Sep 2016 08:27:55 +0000 (10:27 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Mon, 19 Sep 2016 13:03:05 +0000 (15:03 +0200)
test/functional/cases/115_dmarc.robot
test/functional/messages/dmarc/bad_dkim1.eml [new file with mode: 0644]
test/functional/messages/dmarc/bad_dkim2.eml [new file with mode: 0644]

index f2a93db02c7ba3073e131ecfc448cf4684e30081..01692b4b5e1f828ab69251605e94fd61ba5b486a 100644 (file)
@@ -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 (file)
index 0000000..6b3f32e
--- /dev/null
@@ -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 (file)
index 0000000..fde6cbb
--- /dev/null
@@ -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
+
+