aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-23 15:00:27 +0100
committerGitHub <noreply@github.com>2019-09-23 15:00:27 +0100
commita5d48398dd407ee981d58ea037cbbd685e250de8 (patch)
tree707c467d449f9c11ab38e57a27a12e421d33e3ed /test/functional
parent94955b169fb8e17aff88a772d3ea9fff1be9fcb9 (diff)
parent9a77fefe6512423df49bc47292994b0ed13cac4c (diff)
downloadrspamd-a5d48398dd407ee981d58ea037cbbd685e250de8.tar.gz
rspamd-a5d48398dd407ee981d58ea037cbbd685e250de8.zip
Merge pull request #3050 from korgoth1/master
[Test] EMAIL BL
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/340_surbl.robot16
-rw-r--r--test/functional/configs/plugins.conf10
-rw-r--r--test/functional/configs/surbl.conf16
-rw-r--r--test/functional/messages/emailbltext.eml4
-rw-r--r--test/functional/messages/replyto.eml5
-rw-r--r--test/functional/messages/replyto2.eml5
6 files changed, 56 insertions, 0 deletions
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index 4e1558ecd..87d02dd29 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -98,6 +98,22 @@ WHITELIST
Should Not Contain ${result.stdout} DBL_SPAM (
Should Not Contain ${result.stdout} RSPAMD_URIBL_IMAGES (
+EMAILBL full adress & domain only
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/emailbltext.eml
+ Should Contain ${result.stdout} RSPAMD_EMAILBL_FULL (
+ Should Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY (
+
+EMAILBL REPLY TO full adress
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/replyto.eml
+ Should Contain ${result.stdout} RSPAMD_EMAILBL_FULL (
+ Should Not Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY (
+
+EMAILBL REPLY TO domain only
+ ${result} = Scan Message With Rspamc ${TESTDIR}/messages/replyto2.eml
+ Should Contain ${result.stdout} RSPAMD_EMAILBL_DOMAINONLY (
+ Should Not Contain ${result.stdout} RSPAMD_EMAILBL_FULL (
+
+
*** 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 cb5d50609..bb4b97e1d 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -540,6 +540,16 @@ options = {
replies = ["127.0.0.2"];
},
{
+ name = "user.emailbl.com.test5.uribl";
+ type = a;
+ replies = ["127.0.0.2"];
+ },
+ {
+ name = "baddomain.com.test6.uribl";
+ type = a;
+ replies = ["127.0.0.2"];
+ },
+ {
name = "example.com.test2.uribl";
type = a;
replies = ["127.0.1.2"];
diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf
index a4f22bb9f..823aec25c 100644
--- a/test/functional/configs/surbl.conf
+++ b/test/functional/configs/surbl.conf
@@ -64,5 +64,21 @@ EOD;
end
EOD;
}
+ "RSPAMD_EMAILBL_FULL" {
+ suffix = "test5.uribl";
+ check_emails = true;
+ emails_domainonly = false;
+ urls = false;
+ replyto = true;
+ images = false;
+ }
+ "RSPAMD_EMAILBL_DOMAINONLY" {
+ suffix = "test6.uribl";
+ check_emails = true;
+ emails_domainonly = true;
+ urls = false;
+ replyto = true;
+ images = false;
+ }
}
} \ No newline at end of file
diff --git a/test/functional/messages/emailbltext.eml b/test/functional/messages/emailbltext.eml
new file mode 100644
index 000000000..6ae877d59
--- /dev/null
+++ b/test/functional/messages/emailbltext.eml
@@ -0,0 +1,4 @@
+Content-Type: text/plain
+
+user@emailbl.com
+user@baddomain.com \ No newline at end of file
diff --git a/test/functional/messages/replyto.eml b/test/functional/messages/replyto.eml
new file mode 100644
index 000000000..234bc59e0
--- /dev/null
+++ b/test/functional/messages/replyto.eml
@@ -0,0 +1,5 @@
+Reply-to: user@emailbl.com
+From: xxx@abrakadabra.com
+Content-Type: text/plain
+
+salkdmaslkd \ No newline at end of file
diff --git a/test/functional/messages/replyto2.eml b/test/functional/messages/replyto2.eml
new file mode 100644
index 000000000..2813f03cd
--- /dev/null
+++ b/test/functional/messages/replyto2.eml
@@ -0,0 +1,5 @@
+Reply-to: user@baddomain.com
+From: xxx@abrakadabra.com
+Content-Type: text/plain
+
+salkdmaslkd \ No newline at end of file