From 03677971af95908e7b6a7f961d310acd6688a70d Mon Sep 17 00:00:00 2001 From: korgoth1 Date: Fri, 30 Aug 2019 21:07:25 +0300 Subject: [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(-) create mode 100644 test/functional/messages/mailadr.eml (limited to 'test/functional') 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 +Send email \ No newline at end of file -- cgit v1.2.3