]> source.dussan.org Git - rspamd.git/commitdiff
[Test] EMAIL BL 3050/head
authorkorgoth1 <vladislav.stakhov@gmail.com>
Sun, 22 Sep 2019 19:07:25 +0000 (22:07 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Sun, 22 Sep 2019 19:07:25 +0000 (22:07 +0300)
test/functional/cases/340_surbl.robot
test/functional/configs/plugins.conf
test/functional/configs/surbl.conf
test/functional/messages/emailbltext.eml [new file with mode: 0644]
test/functional/messages/replyto.eml [new file with mode: 0644]
test/functional/messages/replyto2.eml [new file with mode: 0644]

index 4e1558ecd4d3b1bc6983975cd3666e762e320aa2..87d02dd2996bc2bed5406855bbab5547c5a8971f 100644 (file)
@@ -98,6 +98,22 @@ WHITELIST
   Should Not Contain  ${result.stdout}  DBL_SPAM (
   Should Not Contain  ${result.stdout}  RSPAMD_URIBL_IMAGES (
 
+EMAILBL full adress & domain only
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/emailbltext.eml
+  Should Contain  ${result.stdout}  RSPAMD_EMAILBL_FULL (
+  Should Contain  ${result.stdout}  RSPAMD_EMAILBL_DOMAINONLY (
+
+EMAILBL REPLY TO full adress
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/replyto.eml
+  Should Contain  ${result.stdout}  RSPAMD_EMAILBL_FULL (
+  Should Not Contain  ${result.stdout}  RSPAMD_EMAILBL_DOMAINONLY (
+
+EMAILBL REPLY TO domain only
+  ${result} =  Scan Message With Rspamc  ${TESTDIR}/messages/replyto2.eml
+  Should Contain  ${result.stdout}  RSPAMD_EMAILBL_DOMAINONLY (
+  Should Not Contain  ${result.stdout}  RSPAMD_EMAILBL_FULL (
+
+
 *** Keywords ***
 Surbl Setup
   ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/surbl.conf
index cb5d5060981cf5d3f289f67a09e7e376a9e2a5e1..bb4b97e1d45fa299c219c202e020ef0d0bd9ce61 100644 (file)
@@ -539,6 +539,16 @@ options = {
           type = a;
           replies = ["127.0.0.2"];
         },
+        {
+          name = "user.emailbl.com.test5.uribl";
+          type = a;
+          replies = ["127.0.0.2"];
+        },
+        {
+          name = "baddomain.com.test6.uribl";
+          type = a;
+          replies = ["127.0.0.2"];
+        },
         {
           name = "example.com.test2.uribl";
           type = a;
index a4f22bb9f55002556f965aa66bc5002dc95baba4..823aec25c0e544b31bcea59dff44e1004e80f8e2 100644 (file)
@@ -64,5 +64,21 @@ EOD;
 end
 EOD;
     }
+    "RSPAMD_EMAILBL_FULL" {
+      suffix = "test5.uribl";
+      check_emails = true;
+      emails_domainonly = false;
+      urls = false;
+      replyto = true;
+      images = false;
+      }
+    "RSPAMD_EMAILBL_DOMAINONLY" {
+      suffix = "test6.uribl";
+      check_emails = true;
+      emails_domainonly = true;
+      urls = false;
+      replyto = true;
+      images = false;
+    }
   }
 }
\ No newline at end of file
diff --git a/test/functional/messages/emailbltext.eml b/test/functional/messages/emailbltext.eml
new file mode 100644 (file)
index 0000000..6ae877d
--- /dev/null
@@ -0,0 +1,4 @@
+Content-Type: text/plain
+
+user@emailbl.com
+user@baddomain.com
\ No newline at end of file
diff --git a/test/functional/messages/replyto.eml b/test/functional/messages/replyto.eml
new file mode 100644 (file)
index 0000000..234bc59
--- /dev/null
@@ -0,0 +1,5 @@
+Reply-to: user@emailbl.com
+From: xxx@abrakadabra.com
+Content-Type: text/plain
+
+salkdmaslkd
\ No newline at end of file
diff --git a/test/functional/messages/replyto2.eml b/test/functional/messages/replyto2.eml
new file mode 100644 (file)
index 0000000..2813f03
--- /dev/null
@@ -0,0 +1,5 @@
+Reply-to: user@baddomain.com
+From: xxx@abrakadabra.com
+Content-Type: text/plain
+
+salkdmaslkd
\ No newline at end of file