commit a8f11e5: test uribll in image
korgoth1
vladislav.stakhov at gmail.com
Fri Aug 30 14:07:05 UTC 2019
Author: korgoth1
Date: 2019-08-30 16:34:49 +0300
URL: https://github.com/rspamd/rspamd/commit/a8f11e58cb9c7c668ac8ad4bb5dbfebb650ceda0
test uribll in image
---
test/functional/cases/210_clickhouse/clickhouse.pyc | Bin 0 -> 4539 bytes
test/functional/cases/340_surbl.robot | 8 ++++++++
test/functional/configs/surbl.conf | 14 ++++++++++++++
test/functional/messages/urlimage.eml | 5 +++++
test/functional/util/dummy_killer.pyc | Bin 0 -> 1553 bytes
5 files changed, 27 insertions(+)
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
Binary files /dev/null and b/test/functional/cases/210_clickhouse/clickhouse.pyc 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
Binary files /dev/null and b/test/functional/util/dummy_killer.pyc differ
More information about the Commits
mailing list