]> source.dussan.org Git - rspamd.git/commitdiff
[Test] Try break greylisting tests 4911/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 5 Apr 2024 20:42:16 +0000 (22:42 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 5 Apr 2024 20:42:16 +0000 (22:42 +0200)
test/functional/cases/001_merged/290_greylist.robot
test/functional/configs/merged-local.conf

index 05ce3d3f0665beb1c78faa6bbc763058eea75b51..ece6a9b3fa93a79c6005ad19eb253911a4a4dcb4 100644 (file)
@@ -4,22 +4,48 @@ Resource        ${RSPAMD_TESTDIR}/lib/rspamd.robot
 Variables       ${RSPAMD_TESTDIR}/lib/vars.py
 
 *** Variables ***
-${MESSAGE}            ${RSPAMD_TESTDIR}/messages/spam_message.eml
-${SETTINGS_GREYLIST}  {symbols_enabled = [GREYLIST_CHECK, GREYLIST_SAVE], symbols = [FOUR_POINTS]}
+${MESSAGE}              ${RSPAMD_TESTDIR}/messages/spam_message.eml
+${MESSAGE2}             ${RSPAMD_TESTDIR}/messages/spam.eml
+${MESSAGE3}             ${RSPAMD_TESTDIR}/messages/freemail.eml
+${SETTINGS_GREYLIST}    {symbols_enabled = [GREYLIST_CHECK, GREYLIST_SAVE], symbols = [FOUR_POINTS]}
+${SETTINGS_NOGREYLIST}  {symbols_enabled = [GREYLIST_CHECK, GREYLIST_SAVE], symbols = [THREE_POINTS]}
+${SETTINGS_RESCORED}    {actions { greylist = 3 }, symbols_enabled = [GREYLIST_CHECK, GREYLIST_SAVE], symbols = [THREE_POINTS]}
+${SETTINGS_REJECTED}    {actions { greylist = 3 }, symbols_enabled = [GREYLIST_CHECK, GREYLIST_SAVE], symbols = [TWENTY_POINTS]}
 
 *** Test Cases ***
 GREYLIST NEW
   Scan File  ${MESSAGE}
   ...  Settings=${SETTINGS_GREYLIST}
   Expect Symbol With Option  GREYLIST  greylisted
+  Expect Action  soft reject
 
 GREYLIST EARLY
   Scan File  ${MESSAGE}
   ...  Settings=${SETTINGS_GREYLIST}
   Expect Symbol With Option  GREYLIST  greylisted
+  Expect Action  soft reject
+
+GREYLIST NOT GREYLISTED
+  Scan File  ${MESSAGE2}
+  ...  Settings=${SETTINGS_NOGREYLIST}
+  Do Not Expect Symbol  GREYLIST
+  Expect Action  no action
+
+GREYLIST REJECTED
+  Scan File  ${MESSAGE3}
+  ...  Settings=${SETTINGS_REJECTED}
+  Do Not Expect Symbol  GREYLIST
+  Expect Action  reject
+
+GREYLIST RESCORED
+  Scan File  ${MESSAGE2}
+  ...  Settings=${SETTINGS_RESCORED}
+  Expect Symbol With Option  GREYLIST  greylisted
+  Expect Action  soft reject
 
 GREYLIST PASS
   Sleep  4s  Wait greylisting timeout
   Scan File  ${MESSAGE}
   ...  Settings=${SETTINGS_GREYLIST}
   Expect Symbol With Option  GREYLIST  pass
+  Expect Action  no action
index 0708e3c0be3b1668ebf47034b09c138fd9971ebd..75b9f0554f448959a60d7c676d854141e6de98a3 100644 (file)
@@ -947,10 +947,16 @@ spf {
 
 symbols {
   FOUR_POINTS = {
-    score = 4.0,
+    score = 4.0
+  }
+  THREE_POINTS = {
+    score = 3.0
+  }
+  TWENTY_POINTS = {
+    score = 20.0
   }
   SYM1 = {
-    score = 1.0,
+    score = 1.0
   }
 }