commit 0367797: [Test] uribl in mail address
korgoth1
vladislav.stakhov at gmail.com
Fri Aug 30 18:21:04 UTC 2019
Author: korgoth1
Date: 2019-08-30 21:07:25 +0300
URL: https://github.com/rspamd/rspamd/commit/03677971af95908e7b6a7f961d310acd6688a70d
[Test] uribl in mail address
---
test/functional/cases/340_surbl.robot | 9 +++++++++
test/functional/configs/plugins.conf | 5 +++++
test/functional/configs/surbl.conf | 10 +++++++++-
test/functional/messages/mailadr.eml | 4 ++++
4 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index a533afdf5..58be332f8 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -60,6 +60,15 @@ SURBL Example.com domain image false
Should Not Contain ${result.stdout} DBL_PHISH (
Should Not Contain ${result.stdout} URIBL_BLACK (
+SURBL @example.com mail
+ ${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 (
+
*** 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
@@ -544,6 +544,11 @@ options = {
type = a;
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;
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 at example.com">Send email</a>
\ No newline at end of file
More information about the Commits
mailing list