]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Bad boundary+FreemailCC
authorkorgoth1 <vladislav.stakhov@gmail.com>
Sun, 29 Sep 2019 12:57:05 +0000 (15:57 +0300)
committerkorgoth1 <vladislav.stakhov@gmail.com>
Sun, 29 Sep 2019 12:57:05 +0000 (15:57 +0300)
test/functional/cases/102_multimap.robot
test/functional/configs/maps/domains.list.2
test/functional/configs/multimap.conf
test/functional/messages/freemailcc.eml [new file with mode: 0644]

index 594faf0b6e7381f61c2cd6904a23d4df89711ee5..b495b53940d658f5b1d85450b62dd1fb45ce693f 100644 (file)
@@ -21,6 +21,7 @@ ${URL3}         ${TESTDIR}/messages/url3.eml
 ${URL4}         ${TESTDIR}/messages/url4.eml
 ${URL5}         ${TESTDIR}/messages/url5.eml
 ${URL_TLD}      ${TESTDIR}/../lua/unit/test_tld.dat
+${FREEMAIL_CC}  ${TESTDIR}/messages/freemailcc.eml
 
 *** Test Cases ***
 MAP - DNSBL HIT
@@ -321,6 +322,10 @@ RCVD_AUTHED_TWO HIT / RCVD_AUTHED_ONE MISS
   Check Rspamc  ${result}  RCVD_AUTHED_TWO
   Should Not Contain  ${result.stdout}  RCVD_AUTHED_ONE
 
+FREEMAIL_CC
+  ${result} =  Scan Message With Rspamc  ${FREEMAIL_CC}
+  Check Rspamc  ${result}  FREEMAIL_CC (19.00)[test.com, test1.com, test2.com, test3.com, test4.com, test5.com, test6.com, test7.com, test8.com, test9.com, test10.com, test11.com, test12.com, test13.com, test14.com]
+
 *** Keywords ***
 Multimap Setup
   ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/multimap.conf
index 45cd0b2ec5bf1e07df5a28336d4cd61e8c6edf0b..15fb908302a88d7b8b5750cf2ddde64714d5ea44 100644 (file)
@@ -1,2 +1,16 @@
 rspamd-test.com
+test.com
+test2.com
+test3.com
+test4.com
+test5.com
+test6.com
+test7.com
+test8.com
+test9.com
+test10.com
+test11.com
+test12.com
+test13.com
+test14.com
 #other.com
index f003ec96eadd20bd335942ddb5406076b7a04fc9..804284b11dac2b33e8088b25f9b33bf78f7e8632 100644 (file)
@@ -18,6 +18,12 @@ multimap {
     filter = "email:domain";
     map = "${TESTDIR}/configs/maps/domains.list";
   }
+  FREEMAIL_CC {
+    type = "header";
+    header = "Cc";
+    filter = "email:domain";
+    map = "${TESTDIR}/configs/maps/domains.list.2";
+  }
   REGEXP_MAP {
     type = "from";
     filter = "email:addr";
diff --git a/test/functional/messages/freemailcc.eml b/test/functional/messages/freemailcc.eml
new file mode 100644 (file)
index 0000000..6926c6e
--- /dev/null
@@ -0,0 +1,10 @@
+Content-Type: multipart/mixed; boundary="===============3209040583106423479=="\r
+MIME-Version: 1.0\r
+From: test@example.org\r
+To: test@example.org\r
+CC: <testp@test.com>, <testp1@test1.com>, <testp2@test2.com>,<testp3@test3.com>,<testp4@test4.com>,<testp5@test5.com>,<testp6@test6.com>,<testp7@test7.com>,<testp8@test8.com>,<testp9@test9.com>,<testp10@test10.com>,<testp11@test11.com>,<testp12@test12.com>,<testp13@test13.com>,<testp14@test14.com>,<testp15@test.com>,<testp16@test.com>,<testp17@test.com>,<testp18@test.com>,<test19@test.com>\r
+Date: Thu, 26 Sep 2019 15:52:32 -0000\r
+Subject: Test message\r
+Message-ID: <156951315267.43830.14912869070271436609@example.org>\r
+\r
+skdjaskdjasd
\ No newline at end of file