diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
commit | 133a45c109da5310add55824db21af5239951f93 (patch) | |
tree | ba6ac4c0a950a0dda56451944315d66409923918 /test/functional/configs/fuzzy.conf | |
parent | Initial commit. (diff) | |
download | rspamd-133a45c109da5310add55824db21af5239951f93.tar.xz rspamd-133a45c109da5310add55824db21af5239951f93.zip |
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/functional/configs/fuzzy.conf')
-rw-r--r-- | test/functional/configs/fuzzy.conf | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/test/functional/configs/fuzzy.conf b/test/functional/configs/fuzzy.conf new file mode 100644 index 0000000..8af1cfa --- /dev/null +++ b/test/functional/configs/fuzzy.conf @@ -0,0 +1,95 @@ +redis { + servers = "{= env.REDIS_ADDR =}:{= env.REDIS_PORT =}"; +} +lua = "{= env.TESTDIR =}/lua/test_coverage.lua"; +options = { + filters = "fuzzy_check"; + pidfile = "{= env.TMPDIR =}/rspamd.pid"; + control_socket = "{= env.TMPDIR =}/rspamd.sock mode=0600"; + url_tld = "{= env.TESTDIR =}/../lua/unit/test_tld.dat"; + dns { + retransmits = 10; + timeout = 2s; + } +} +logging = { + type = "file", + level = "debug" + filename = "{= env.TMPDIR =}/rspamd.log" +} +metric = { + name = "default", + actions = { + reject = 100500, + } + unknown_weight = 1 + symbol { + weight = 10.0; + name = "{= env.FLAG1_SYMBOL =}"; + } + symbol { + weight = -1.0; + name = "{= env.FLAG2_SYMBOL =}"; + } +} + +worker { + type = normal + bind_socket = "{= env.LOCAL_ADDR =}:{= env.PORT_NORMAL =}"; + count = 1 + task_timeout = 60s; +} + +worker { + type = controller + bind_socket = "{= env.LOCAL_ADDR =}:{= env.PORT_CONTROLLER =}"; + count = 1 + secure_ip = ["{= env.LOCAL_ADDR =}"]; + stats_path = "{= env.TMPDIR =}/stats.ucl"; +} + +worker { + count = 1; + backend = "{= env.FUZZY_BACKEND =}"; + bind_socket = "{= env.LOCAL_ADDR =}:{= env.PORT_FUZZY =}"; + type = "fuzzy"; + hashfile = "{= env.TMPDIR =}/fuzzy.db"; + allow_update = ["{= env.LOCAL_ADDR =}"]; + encrypted_only = {= env.FUZZY_ENCRYPTED_ONLY =}; + keypair { + privkey = "{= env.KEY_PVT1 =}"; + pubkey = "{= env.KEY_PUB1 =}"; + } +} + +fuzzy_check { + min_bytes = 100; + timeout = 1s; + retransmits = 10; + + rule { + min_bytes = 0; + min_length = 0; + algorithm = "{= env.FUZZY_ALGORITHM =}"; + servers = "{= env.LOCAL_ADDR =}:{= env.PORT_FUZZY =}"; + symbol = "R_TEST_FUZZY"; + max_score = 10.0; + mime_types = ["application/*"]; + read_only = false; + skip_unknown = true; + skip_hashes = "{= env.TMPDIR =}/skip_hash.map"; + fuzzy_key = {= env.FUZZY_KEY =}; + fuzzy_shingles_key = {= env.FUZZY_SHINGLES_KEY =}; +.include "{= env.FUZZY_INCLUDE =}"; + fuzzy_map = { + R_TEST_FUZZY_DENIED { + max_score = 10.0; + flag = {= env.FLAG1_NUMBER =}; + } + R_TEST_FUZZY_WHITE { + max_score = 1.0; + flag = {= env.FLAG2_NUMBER =}; + } + } + } +} |