]> source.dussan.org Git - rspamd.git/commitdiff
[Test] uribl in mail address
authorkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 30 Aug 2019 18:07:25 +0000 (21:07 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Fri, 30 Aug 2019 18:07:25 +0000 (21:07 +0300)
test/functional/cases/340_surbl.robot
test/functional/configs/plugins.conf
test/functional/configs/surbl.conf
test/functional/messages/mailadr.eml [new file with mode: 0644]

index a533afdf50a4d7a482c7f0188bb8aa20db8e5578..58be332f8279285905b658feb9446a6d2690d081 100644 (file)
@@ -60,6 +60,15 @@ SURBL Example.com domain image false
   Should Not Contain  ${result.stdout}  DBL_PHISH (
   Should Not Contain  ${result.stdout}  URIBL_BLACK (
 
+SURBL @example.com mail
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/mailadr.eml
+  Should Contain  ${result.stdout}  URIBL_IN_MAIL (
+  Should Not Contain  ${result.stdout}  RSPAMD_URIBL
+  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 d3394ef17525740787e38f27488c3edad2946506..ac68ec5cbc3f477be0af760376c850fc0816f4a2 100644 (file)
@@ -544,6 +544,11 @@ options = {
           type = a;
           replies = ["127.0.1.2"];
         },
+        {
+          name = "user.example.com.test2.uribl";
+          type = a;
+          replies = ["127.0.1.5"];
+        },
         {
           name = "example.net.test2.uribl";
           type = a;
index 967c170ae2727930a1fa43122c86baa1ecc63a1c..6acf73275f10d02f3e7eb7aad75b30518716c537 100644 (file)
@@ -1,4 +1,3 @@
-
 surbl {
   rules {
     "RSPAMD_URIBL" {
@@ -64,5 +63,14 @@ EOD;
 end
 EOD;
     }
+    "URIBL_IN_MAIL" {
+      suffix = "test2.uribl";
+      no_ip = true;
+      check_emails = true;
+
+      ips = {
+      URIBL_IN_MAIL = "127.0.1.5";
+      }
+      }
   }
 }
\ No newline at end of file
diff --git a/test/functional/messages/mailadr.eml b/test/functional/messages/mailadr.eml
new file mode 100644 (file)
index 0000000..bad36c5
--- /dev/null
@@ -0,0 +1,4 @@
+Content-Type: text/html
+
+helo
+<a href="mailto:user@example.com">Send email</a>
\ No newline at end of file