From: Andrew Lewis Date: Mon, 19 Sep 2016 08:27:55 +0000 (+0200) Subject: [Test] Test DKIM permfail X-Git-Tag: 1.4.0~406^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a09a0c772b6f73dda7c44d637771fd2596f1acc;p=rspamd.git [Test] Test DKIM permfail --- 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 +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 +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 + +