commit b38a829: [Test] WHITELIST_SURBL

korgoth1 vladislav.stakhov at gmail.com
Mon Sep 9 19:28:06 UTC 2019


Author: korgoth1
Date: 2019-09-08 19:40:00 +0300
URL: https://github.com/rspamd/rspamd/commit/b38a8298263120c857a95522decd31d09cb42504

[Test] WHITELIST_SURBL


 lualib/lua_magic/init.lua              | 198 +++++++++++++++++++--
 lualib/lua_magic/patterns.lua          | 302 ++++++++++++++++++++++++++++++++-
 lualib/lua_magic/types.lua             | 113 +++++++++++-
 src/lua/lua_trie.c                     |   2 +-
 test/functional/cases/340_surbl.robot  |   3 +-
 test/functional/configs/plugins.conf   |  10 ++
 test/functional/messages/whitelist.eml |   2 -
 7 files changed, 600 insertions(+), 30 deletions(-)

diff --combined test/functional/cases/340_surbl.robot
index 232914932,a0cc4f943..ee80577cf
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@@ -92,10 -92,6 +92,11 @@@ SURBL example.com encoded url in subjec
    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 (
++  Should Not Contain  ${result.stdout}  RSPAMD_URIBL (
++  Should Not Contain  ${result.stdout}  DBL_SPAM (
 +
  *** Keywords ***
  Surbl Setup
    ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/surbl.conf
diff --combined test/functional/configs/plugins.conf
index ac68ec5cb,ac68ec5cb..839e14257
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@@ -579,6 -579,6 +579,16 @@@ options = 
            type = a;
            replies = ["127.0.0.4", "127.0.0.11"];
          },
++        {
++          name = "rspamd-test.com.test.uribl";
++          type = a;
++          replies = ["127.0.0.2"];
++        },
++        {
++          name = "rspamd-test.com.test2.uribl";
++          type = a;
++          replies = ["127.0.1.2"];
++        },
          {
            name = "9.8.8.8.test4.uribl";
            type = a;
diff --combined test/functional/messages/whitelist.eml
index 24686a247,3a2b9346f..aa19512a1
--- a/test/functional/messages/whitelist.eml
+++ b/test/functional/messages/whitelist.eml
@@@ -1,5 -1,4 +1,3 @@@
  Content-Type: text/plain
  
- http://rspamd.com
- http://test.rspamd.example.com
 -hello
 -user at example.com
 +http://rspamd-test.com


More information about the Commits mailing list