From: korgoth1 Date: Fri, 6 Sep 2019 10:29:02 +0000 (+0300) Subject: [Test] WHITELIST_SURBL for check X-Git-Tag: 2.0~231^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb35d6e29dabacbb13f2733952d98fb271303637;p=rspamd.git [Test] WHITELIST_SURBL for check --- diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot index a0cc4f943..232914932 100644 --- a/test/functional/cases/340_surbl.robot +++ b/test/functional/cases/340_surbl.robot @@ -92,6 +92,10 @@ SURBL example.com encoded url in subject Should Not Contain ${result.stdout} DBL_PHISH ( Should Not Contain ${result.stdout} URIBL_BLACK ( +WHITELIST + ${result} = Scan Message With Rspamc ${TESTDIR}/messages/whitelist.eml + Should Contain ${result.stdout} RSPAMD_URIBL ( + *** 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 9752dcd1f..a4f22bb9f 100644 --- a/test/functional/configs/surbl.conf +++ b/test/functional/configs/surbl.conf @@ -1,4 +1,7 @@ surbl { + "whitelist" = [ + "rspamd-test.com" + ] rules { "RSPAMD_URIBL" { suffix = "test.uribl"; @@ -18,7 +21,6 @@ EOD; no_ip = true; check_emails = true; check_dkim = true; - ips = { # spam domain DBL_SPAM = "127.0.1.2"; @@ -26,7 +28,6 @@ EOD; DBL_PHISH = "127.0.1.4"; } } - "URIBL_MULTI" { suffix = "test3.uribl"; check_dkim = true; diff --git a/test/functional/messages/whitelist.eml b/test/functional/messages/whitelist.eml new file mode 100644 index 000000000..9b3ba2551 --- /dev/null +++ b/test/functional/messages/whitelist.eml @@ -0,0 +1,4 @@ +Content-Type: text/plain + +http://rspamd.com +http://test.rspamd.example.com