aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorkorgoth1 <vladislav.stakhov@gmail.com>2019-08-30 16:34:49 +0300
committerkorgoth1 <vladislav.stakhov@gmail.com>2019-08-30 16:34:49 +0300
commita8f11e58cb9c7c668ac8ad4bb5dbfebb650ceda0 (patch)
tree2dc3ae1c22f61abfd14b42f1b9e72f4753a84cc9 /test/functional
parentd1ad30ae1aad11e4bde0d889d9fd19b1fe41c499 (diff)
downloadrspamd-a8f11e58cb9c7c668ac8ad4bb5dbfebb650ceda0.tar.gz
rspamd-a8f11e58cb9c7c668ac8ad4bb5dbfebb650ceda0.zip
test uribll in image
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/210_clickhouse/clickhouse.pycbin0 -> 4539 bytes
-rw-r--r--test/functional/cases/340_surbl.robot8
-rw-r--r--test/functional/configs/surbl.conf14
-rw-r--r--test/functional/messages/urlimage.eml5
-rw-r--r--test/functional/util/dummy_killer.pycbin0 -> 1553 bytes
5 files changed, 27 insertions, 0 deletions
diff --git a/test/functional/cases/210_clickhouse/clickhouse.pyc b/test/functional/cases/210_clickhouse/clickhouse.pyc
new file mode 100644
index 000000000..e2b7d5f17
--- /dev/null
+++ b/test/functional/cases/210_clickhouse/clickhouse.pyc
Binary files differ
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index d5391af07..a533afdf5 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -52,6 +52,14 @@ SURBL Example.ru ZEN domain
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
+SURBL Example.com domain image false
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/urlimage.eml
+ Should Contain ${result.stdout} RSPAMD_URIBL_IMAGES
+ Should Not Contain ${result.stdout} DBL_SPAM (
+ Should Not Contain ${result.stdout} RSPAMD_URIBL (
+ Should Not Contain ${result.stdout} DBL_PHISH (
+ Should Not Contain ${result.stdout} URIBL_BLACK (
+
*** Keywords ***
Surbl Setup
${PLUGIN_CONFIG} = Get File ${TESTDIR}/configs/surbl.conf
diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf
index 85074955c..967c170ae 100644
--- a/test/functional/configs/surbl.conf
+++ b/test/functional/configs/surbl.conf
@@ -5,6 +5,7 @@ surbl {
suffix = "test.uribl";
check_dkim = true;
check_emails = true;
+ images = false;
process_script =<<EOD
function(url, suffix)
local cr = require "rspamd_cryptobox_hash"
@@ -50,5 +51,18 @@ EOD;
URIBL_DROP = "127.0.0.9";
}
}
+ "RSPAMD_URIBL_IMAGES" {
+ suffix = "test.uribl";
+ check_dkim = true;
+ check_emails = true;
+ images = true;
+ process_script =<<EOD
+ function(url, suffix)
+ local cr = require "rspamd_cryptobox_hash"
+ local h = cr.create(url):base32():sub(1, 32)
+ return string.format("%s.%s", h, suffix)
+end
+EOD;
+ }
}
} \ No newline at end of file
diff --git a/test/functional/messages/urlimage.eml b/test/functional/messages/urlimage.eml
new file mode 100644
index 000000000..6ae708890
--- /dev/null
+++ b/test/functional/messages/urlimage.eml
@@ -0,0 +1,5 @@
+Content-Type: text/html
+
+helo
+<body text="#000000" bgcolor="#FFFFFF">
+ <p><img src="https://example.com" alt=""moz-do-not-send="false" width="326" height="326" border="0"></a></p>
diff --git a/test/functional/util/dummy_killer.pyc b/test/functional/util/dummy_killer.pyc
new file mode 100644
index 000000000..55e7bac2f
--- /dev/null
+++ b/test/functional/util/dummy_killer.pyc
Binary files differ