commit 4985202: [Test] Moar surbl tests

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Aug 24 18:28:05 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-08-24 19:27:05 +0100
URL: https://github.com/rspamd/rspamd/commit/49852022963aba3dbce3591ac68fd2981b18710b (HEAD -> master)

[Test] Moar surbl tests

---
 test/functional/cases/340_surbl.robot | 11 +++++++++++
 test/functional/configs/plugins.conf  | 16 ++++++++++++++++
 test/functional/configs/surbl.conf    | 12 ++++++++++++
 3 files changed, 39 insertions(+)

diff --git a/test/functional/cases/340_surbl.robot b/test/functional/cases/340_surbl.robot
index 40ef9855c..d5391af07 100644
--- a/test/functional/cases/340_surbl.robot
+++ b/test/functional/cases/340_surbl.robot
@@ -41,6 +41,17 @@ SURBL Example.ru domain
   Should Not Contain  ${result.stdout}  DBL_PHISH
   Should Not Contain  ${result.stdout}  URIBL_BLACK
 
+SURBL Example.ru ZEN domain
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/url7.eml
+  Should Contain  ${result.stdout}  URIBL_SBL_CSS (
+  Should Contain  ${result.stdout}  URIBL_XBL (
+  Should Contain  ${result.stdout}  URIBL_PBL (
+  Should Not Contain  ${result.stdout}  URIBL_SBL (
+  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 05ff16a1e..fdff71523 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -564,6 +564,22 @@ options = {
           type = a;
           replies = ["127.0.0.12"];
         },
+        {
+          name = "example.ru";
+          type = a;
+          replies = ["8.8.8.8", "8.8.8.9"];
+        },
+        {
+          name = "8.8.8.8.test4.uribl";
+          type = a;
+          replies = ["127.0.0.4", "127.0.0.11"];
+        },
+        {
+          name = "9.8.8.8.test4.uribl";
+          type = a;
+          replies = ["127.0.0.3"];
+        },
+        # TODO: add IPv6 tests
         ];
   }
 }
diff --git a/test/functional/configs/surbl.conf b/test/functional/configs/surbl.conf
index 944ee747f..85074955c 100644
--- a/test/functional/configs/surbl.conf
+++ b/test/functional/configs/surbl.conf
@@ -38,5 +38,17 @@ EOD;
         URIBL_RED = 8;
       }
     }
+    "SPAMHAUS_ZEN_URIBL" {
+      suffix = "test4.uribl";
+      resolve_ip = true;
+      check_emails = true;
+      ips {
+        URIBL_SBL = "127.0.0.2";
+        URIBL_SBL_CSS = "127.0.0.3";
+        URIBL_XBL = ["127.0.0.4", "127.0.0.5", "127.0.0.6", "127.0.0.7"];
+        URIBL_PBL = ["127.0.0.10", "127.0.0.11"];
+        URIBL_DROP = "127.0.0.9";
+      }
+    }
   }
 }
\ No newline at end of file


More information about the Commits mailing list