]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Moar surbl tests
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 24 Aug 2019 18:27:05 +0000 (19:27 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 24 Aug 2019 18:27:05 +0000 (19:27 +0100)
test/functional/cases/340_surbl.robot
test/functional/configs/plugins.conf
test/functional/configs/surbl.conf

index 40ef9855c9990930c29c8bbc705c55f11b23cd5c..d5391af07dd53d44783646004fc8eb12f11a4e66 100644 (file)
@@ -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
index 05ff16a1e90b9f507c35ea07d773b64d7c481343..fdff71523a074fab546b49ac6c7b130b95d2c677 100644 (file)
@@ -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
         ];
   }
 }
index 944ee747fdcf2e6f84b4bea0c4c3408717c56599..85074955c409bee524e8431342b8650b898d19ab 100644 (file)
@@ -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