]> source.dussan.org Git - rspamd.git/commitdiff
[Test] URL compose map
authorkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 28 Feb 2020 17:52:45 +0000 (20:52 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 28 Feb 2020 17:52:45 +0000 (20:52 +0300)
test/functional/cases/340_surbl.robot
test/functional/configs/maps/url_compose_map.list [new file with mode: 0644]
test/functional/configs/plugins.conf
test/functional/configs/surbl.conf
test/functional/messages/url11.eml [new file with mode: 0644]

index 8c7fcc3c1de16a33c799a726407bb15934c59e5d..092495d38c21f98e04ebbacad095ad73c0bc0c58 100644 (file)
@@ -147,10 +147,17 @@ SURBL IDN Punycode domain
   Should Not Contain  ${result.stdout}  DBL_PHISH
   Should Not Contain  ${result.stdout}  URIBL_BLACK
 
-SURBL html entity &shy
+SURBL html entity&shy
   ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/url10.eml
   Should Contain  ${result.stdout}  RSPAMD_URIBL
 
+SURBL url compose map
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/url11.eml
+  Should Contain  ${result.stdout}  RSPAMD_URIBL
+  Should Contain  ${result.stdout}  DBL_SPAM
+  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/maps/url_compose_map.list b/test/functional/configs/maps/url_compose_map.list
new file mode 100644 (file)
index 0000000..da65ffb
--- /dev/null
@@ -0,0 +1 @@
+*.dirty.sanchez.com
\ No newline at end of file
index 025f6c55f0b32db080b5c2c6b1d2b32f27661241..17f0048434d5d3156f345a7e38d664ba2660f8a3 100644 (file)
@@ -665,6 +665,11 @@ options = {
           type = a;
           replies = ["127.0.0.3"];
         },
+        {
+          name = "very.dirty.sanchez.com.test7.uribl";
+          type = a;
+          replies = ["127.0.0.2"];
+        },
         # TODO: add IPv6 tests
         ];
   }
index 1ebf2d97fd1f52eb6b7b3fe4c22e308a6023abac..764d5edd87f199465d0f19703fd6335ee2a5f6f0 100644 (file)
@@ -1,7 +1,10 @@
 surbl {
     "whitelist" = [
     "rspamd-test.com"
-  ]
+  ];
+    "url_compose_map" = [
+    "${TESTDIR}/configs/maps/url_compose_map.list",
+    ];
   rules {
     "RSPAMD_URIBL" {
       suffix = "test.uribl";
@@ -64,7 +67,12 @@ EOD;
 end
 EOD;
     }
-
+    "BAD_SUBDOMAIN" {
+      suffix = "test7.uribl";
+      check_dkim = true;
+      check_emails = false;
+      images = true;
+    }
   }
 }
 
diff --git a/test/functional/messages/url11.eml b/test/functional/messages/url11.eml
new file mode 100644 (file)
index 0000000..a757d01
--- /dev/null
@@ -0,0 +1,3 @@
+Content-Type: text/plain
+
+http://very.dirty.sanchez.com