summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2019-09-03 19:43:27 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2019-09-03 19:43:27 +0300
commit3b01bedc940deaa08c4a259f84ecdc182747bb95 (patch)
treefbde6961c1756ed2cb256140f5fe53573648815f /test
parent8a240656d8378ac20e4c4c3ae61d1a9c33488a20 (diff)
downloadrspamd-3b01bedc940deaa08c4a259f84ecdc182747bb95.tar.gz
rspamd-3b01bedc940deaa08c4a259f84ecdc182747bb95.zip
[Test] Url in subject
Diffstat (limited to 'test')
-rw-r--r--test/functional/cases/340_surbl.robot13
-rw-r--r--test/functional/messages/urlinsubject.eml7
-rw-r--r--test/functional/messages/urlinsubjectencoded.eml9
3 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index 8ed5222b9..a0cc4f943 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -78,6 +78,19 @@ SURBL @example.com mail text
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
+SURBL example.com not encoded url in subject
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/urlinsubject.eml
+ Should Contain ${result.stdout} RSPAMD_URIBL (
+ Should Contain ${result.stdout} DBL_SPAM (
+ Should Not Contain ${result.stdout} DBL_PHISH (
+ Should Not Contain ${result.stdout} URIBL_BLACK (
+
+SURBL example.com encoded url in subject
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/urlinsubjectencoded.eml
+ Should Contain ${result.stdout} RSPAMD_URIBL (
+ Should Contain ${result.stdout} DBL_SPAM (
+ Should Not Contain ${result.stdout} DBL_PHISH (
+ Should Not Contain ${result.stdout} URIBL_BLACK (
*** Keywords ***
Surbl Setup
diff --git a/test/functional/messages/urlinsubject.eml b/test/functional/messages/urlinsubject.eml
new file mode 100644
index 000000000..4f8a5a5a5
--- /dev/null
+++ b/test/functional/messages/urlinsubject.eml
@@ -0,0 +1,7 @@
+Content-Type: text/html; charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+Subject: http://example.com
+Date: Tue, 4 Sep 2019 23:25:01 +0000
+
+
+hello \ No newline at end of file
diff --git a/test/functional/messages/urlinsubjectencoded.eml b/test/functional/messages/urlinsubjectencoded.eml
new file mode 100644
index 000000000..3562b23e7
--- /dev/null
+++ b/test/functional/messages/urlinsubjectencoded.eml
@@ -0,0 +1,9 @@
+Content-Type: text/html; charset="utf-8"
+Content-Transfer-Encoding: quoted-printable
+Subject: =?utf-8?b?0J/QntCU0KLQktCV0KDQlNCY0KLQlSDQktCr0J/Qm9CQ0KLQoyAt?=
+ =?utf-8?q?_https=3A//example=2Ecom/nT6a--Check_out_our_New_=F0=9F=97=BA?=
+ =?utf-8?b?77iPIEdlb2dyYXBoeSBUaGVtZWQgU2V0IPCfj5TvuI8g?=
+Date: Tue, 4 Sep 2019 23:25:01 +0000
+
+
+hello \ No newline at end of file