diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-28 12:39:48 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-28 12:39:48 +0000 |
commit | 71499b6811fdd2df0ecc7581120b83a0935b1370 (patch) | |
tree | cad2a2047d2ebf52b18980a2ffcff239be18196b /test/functional | |
parent | 772f3bb7ac6bba9fa9c885f0880c93c58cb59f5b (diff) | |
download | rspamd-71499b6811fdd2df0ecc7581120b83a0935b1370.tar.gz rspamd-71499b6811fdd2df0ecc7581120b83a0935b1370.zip |
[Test] Add tests for pct=0 case
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/cases/115_dmarc.robot | 5 | ||||
-rw-r--r-- | test/functional/configs/plugins.conf | 5 | ||||
-rw-r--r-- | test/functional/messages/dmarc/pct_none.eml | 17 |
3 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/cases/115_dmarc.robot b/test/functional/cases/115_dmarc.robot index c68927115..93bce71da 100644 --- a/test/functional/cases/115_dmarc.robot +++ b/test/functional/cases/115_dmarc.robot @@ -77,6 +77,11 @@ DMARC NA NXDOMAIN ... -i 37.48.67.26 --from foo@mom.za.org Check Rspamc ${result} DMARC_NA +DMARC PCT ZERO + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/pct_none.eml + ... -i 37.48.67.26 --from foo@mom.za.org + Check Rspamc ${result} DMARC_POLICY_SOFTFAIL + DKIM PERMFAIL NXDOMAIN ${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim2.eml ... -i 37.48.67.26 diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf index ecff3eabf..b34f66208 100644 --- a/test/functional/configs/plugins.conf +++ b/test/functional/configs/plugins.conf @@ -243,6 +243,11 @@ options = { rcode = 'nxdomain'; }, { + name = "_dmarc.zero_pct.com", + type = "txt"; + replies = ["v=DMARC1; p=reject; sp=quarantine; pct=0"]; + }, + { name = "example.com", type = "txt"; replies = ["$Id: example.com 4415 2015-08-24 20:12:23Z davids $", "v=spf1 -all"]; diff --git a/test/functional/messages/dmarc/pct_none.eml b/test/functional/messages/dmarc/pct_none.eml new file mode 100644 index 000000000..50fe33106 --- /dev/null +++ b/test/functional/messages/dmarc/pct_none.eml @@ -0,0 +1,17 @@ +Date: Tue, 09 Aug 2016 10:01:27 +0200 +Message-ID: <20160809100128@rspamd.tk> +From: Rspamd <foo@zero_pct.com> +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 + + |