diff options
author | Andrew Lewis <nerf@judo.za.org> | 2023-09-11 11:13:47 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2023-09-11 11:13:47 +0200 |
commit | 076ca2c763876307b45980a52db420af96fff629 (patch) | |
tree | ca831e1ab51251b4daec1ec42ab6a7e32c6820f5 /test/functional | |
parent | 67c8b53122b6538f66cee813b9ec6d1cbe86211e (diff) | |
download | rspamd-076ca2c763876307b45980a52db420af96fff629.tar.gz rspamd-076ca2c763876307b45980a52db420af96fff629.zip |
[Feature] rbl: support checking numeric URLs in isolation
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/cases/001_merged/300_rbl.robot | 5 | ||||
-rw-r--r-- | test/functional/configs/merged-local.conf | 5 | ||||
-rw-r--r-- | test/functional/configs/merged-override.conf | 4 | ||||
-rw-r--r-- | test/functional/messages/numeric_urls.eml | 3 |
4 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/cases/001_merged/300_rbl.robot b/test/functional/cases/001_merged/300_rbl.robot index 094eec409..c0e7fde95 100644 --- a/test/functional/cases/001_merged/300_rbl.robot +++ b/test/functional/cases/001_merged/300_rbl.robot @@ -75,3 +75,8 @@ SELECTORS COMBINED ... Settings={symbols_enabled = [RBL_SELECTOR_MULTIPLE]} Expect Symbol With Option RBL_SELECTOR_MULTIPLE example.org:sel_from Expect Symbol With Option RBL_SELECTOR_MULTIPLE example.org:sel_helo + +NUMERIC URLS + Scan File ${RSPAMD_TESTDIR}/messages/numeric_urls.eml + ... Settings={symbols_enabled = [URIBL_NUMERIC]} + Expect Symbol With Exact Options URIBL_NUMERIC 4.3.2.1:url diff --git a/test/functional/configs/merged-local.conf b/test/functional/configs/merged-local.conf index 27738dd5e..82d609730 100644 --- a/test/functional/configs/merged-local.conf +++ b/test/functional/configs/merged-local.conf @@ -876,6 +876,11 @@ options = { replies = ["127.0.0.2"]; }, { + name = "4.3.2.1.test9.uribl"; + type = a; + replies = ["127.0.0.2"]; + }, + { name = "8.8.8.8.test9.uribl"; type = a; replies = ["127.0.0.2"]; diff --git a/test/functional/configs/merged-override.conf b/test/functional/configs/merged-override.conf index 74d9b441f..04b879db6 100644 --- a/test/functional/configs/merged-override.conf +++ b/test/functional/configs/merged-override.conf @@ -298,6 +298,10 @@ rbl { RSPAMD_EMAILBL = "127.0.0.2"; } } + URIBL_NUMERIC { + checks = ["numeric_urls"]; + rbl = "test9.uribl"; + } URIBL_NOCONTENT { rbl = "test9.uribl"; ignore_defaults = true; diff --git a/test/functional/messages/numeric_urls.eml b/test/functional/messages/numeric_urls.eml new file mode 100644 index 000000000..139a52c66 --- /dev/null +++ b/test/functional/messages/numeric_urls.eml @@ -0,0 +1,3 @@ +Content-type: text/plain
+
+numeric http://1.2.3.4 and not http://example.org ok
|