summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-30 19:16:43 +0100
committerGitHub <noreply@github.com>2019-08-30 19:16:43 +0100
commit0c9d6fa13b904f775ae421549d6145c1ebaf8ab3 (patch)
treeaa2b2a5e7a4b54ab11843d1718aa9a2195953fc1
parent2f988241c2763cb0e27d91ce312989f6f0a9577c (diff)
parentb8f697f622858510630a086ca243f8c375ef3075 (diff)
downloadrspamd-0c9d6fa13b904f775ae421549d6145c1ebaf8ab3.tar.gz
rspamd-0c9d6fa13b904f775ae421549d6145c1ebaf8ab3.zip
Merge pull request #3023 from korgoth1/master
[Test] Uribl in mail address
-rw-r--r--test/functional/cases/340_surbl.robot18
-rw-r--r--test/functional/configs/plugins.conf5
-rw-r--r--test/functional/configs/surbl.conf10
-rw-r--r--test/functional/messages/mailadr.eml4
-rw-r--r--test/functional/messages/mailadr2.eml4
5 files changed, 40 insertions, 1 deletions
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index a533afdf5..d4bbc2848 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -60,6 +60,24 @@ SURBL Example.com domain image false
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
+SURBL @example.com mail html
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/mailadr.eml
+ Should Contain ${result.stdout} URIBL_IN_MAIL (
+ Should Not Contain ${result.stdout} RSPAMD_URIBL
+ 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 (
+
+SURBL @example.com mail text
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/mailadr2.eml
+ Should Contain ${result.stdout} URIBL_IN_MAIL (
+ Should Not Contain ${result.stdout} RSPAMD_URIBL
+ 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/plugins.conf b/test/functional/configs/plugins.conf
index d3394ef17..ac68ec5cb 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -545,6 +545,11 @@ options = {
replies = ["127.0.1.2"];
},
{
+ name = "user.example.com.test2.uribl";
+ type = a;
+ replies = ["127.0.1.5"];
+ },
+ {
name = "example.net.test2.uribl";
type = a;
replies = ["127.0.1.4"];
diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf
index 967c170ae..6acf73275 100644
--- a/test/functional/configs/surbl.conf
+++ b/test/functional/configs/surbl.conf
@@ -1,4 +1,3 @@
-
surbl {
rules {
"RSPAMD_URIBL" {
@@ -64,5 +63,14 @@ EOD;
end
EOD;
}
+ "URIBL_IN_MAIL" {
+ suffix = "test2.uribl";
+ no_ip = true;
+ check_emails = true;
+
+ ips = {
+ URIBL_IN_MAIL = "127.0.1.5";
+ }
+ }
}
} \ No newline at end of file
diff --git a/test/functional/messages/mailadr.eml b/test/functional/messages/mailadr.eml
new file mode 100644
index 000000000..bad36c511
--- /dev/null
+++ b/test/functional/messages/mailadr.eml
@@ -0,0 +1,4 @@
+Content-Type: text/html
+
+helo
+<a href="mailto:user@example.com">Send email</a> \ No newline at end of file
diff --git a/test/functional/messages/mailadr2.eml b/test/functional/messages/mailadr2.eml
new file mode 100644
index 000000000..3a2b9346f
--- /dev/null
+++ b/test/functional/messages/mailadr2.eml
@@ -0,0 +1,4 @@
+Content-Type: text/plain
+
+hello
+user@example.com \ No newline at end of file