]> source.dussan.org Git - rspamd.git/commitdiff
[Test] WHITELIST_SURBL for check
authorkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 6 Sep 2019 10:29:02 +0000 (13:29 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 6 Sep 2019 10:29:02 +0000 (13:29 +0300)
test/functional/cases/340_surbl.robot
test/functional/configs/surbl.conf
test/functional/messages/whitelist.eml [new file with mode: 0644]

index a0cc4f9432ae68895293db112f271127be0ad2d9..232914932461d0fa401214fbfaecd971417bf680 100644 (file)
@@ -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
index 9752dcd1f7cbec23ba146356d18d12ca2696df2b..a4f22bb9f55002556f965aa66bc5002dc95baba4 100644 (file)
@@ -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 (file)
index 0000000..9b3ba25
--- /dev/null
@@ -0,0 +1,4 @@
+Content-Type: text/plain
+
+http://rspamd.com
+http://test.rspamd.example.com