diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-29 13:44:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-29 13:44:08 +0100 |
commit | 6ccd44320e725ed542883491af7d6b17a2f4a6eb (patch) | |
tree | e70b731f2476d600d4e45aa1deb6adefea8eb416 /test/functional | |
parent | e175e9ba25514543382721981b53853ab321ed8e (diff) | |
download | rspamd-6ccd44320e725ed542883491af7d6b17a2f4a6eb.tar.gz rspamd-6ccd44320e725ed542883491af7d6b17a2f4a6eb.zip |
[Feature] Allow maps with multiple symbols and scores
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/cases/102_maps.robot | 26 | ||||
-rw-r--r-- | test/functional/configs/maps.conf | 8 | ||||
-rw-r--r-- | test/functional/configs/maps/multiple.list | 10 |
3 files changed, 42 insertions, 2 deletions
diff --git a/test/functional/cases/102_maps.robot b/test/functional/cases/102_maps.robot index 0a83283f6..aecc61b5c 100644 --- a/test/functional/cases/102_maps.robot +++ b/test/functional/cases/102_maps.robot @@ -63,4 +63,28 @@ MAP - FROM REGEXP MISS MAP - DEPENDS HIT ${result} = Scan Message With Rspamc ${MESSAGE} -i 147.243.1.47 --from user123@microsoft.com - Check Rspamc ${result} DEPS_MAP
\ No newline at end of file + Check Rspamc ${result} DEPS_MAP + +MAP - DEPENDS MISS + ${result} = Scan Message With Rspamc ${MESSAGE} -i 127.0.0.1 --from user123@microsoft.com + Check Rspamc ${result} DEPS_MAP inverse=1 rc_nocheck=1 + +MAP - MULSYM PLAIN + ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user1@example.com + Check Rspamc ${result} RCPT_MAP + +MAP - MULSYM SCORE + ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user2@example.com + Check Rspamc ${result} RCPT_MAP (10.0 + +MAP - MULSYM SYMBOL + ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user3@example.com + Check Rspamc ${result} SYM1 (1.0 + +MAP - MULSYM SYMBOL MISS + ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user4@example.com + Check Rspamc ${result} RCPT_MAP (1.0 + +MAP - MULSYM SYMBOL + SCORE + ${result} = Scan Message With Rspamc ${MESSAGE} --rcpt user5@example.com + Check Rspamc ${result} SYM1 (-10.0
\ No newline at end of file diff --git a/test/functional/configs/maps.conf b/test/functional/configs/maps.conf index d90440384..4b6331fae 100644 --- a/test/functional/configs/maps.conf +++ b/test/functional/configs/maps.conf @@ -53,6 +53,12 @@ multimap { filter = "email:addr"; regexp = true; map = "${TESTDIR}/configs/maps/regexp.list"; - require_symbols = "R_SPF_ALLOW & DNSBL_MAP & !FROM_MAP"; + require_symbols = "R_SPF_ALLOW & REGEXP_MAP & !FROM_MAP"; + } + RCPT_MAP { + type = "rcpt"; + filter = "email:addr"; + symbols = ["SYM1"]; + map = "${TESTDIR}/configs/maps/multiple.list"; } } diff --git a/test/functional/configs/maps/multiple.list b/test/functional/configs/maps/multiple.list new file mode 100644 index 000000000..24444f182 --- /dev/null +++ b/test/functional/configs/maps/multiple.list @@ -0,0 +1,10 @@ +#empty string +user1@example.com +#just score +user2@example.com 10 +#just symbol +user3@example.com SYM1 +#unknown symbol +user4@example.com SYM2 +#symbol + score +user5@example.com SYM1:-10.1 |