summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-09-10 14:27:15 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-09-10 14:27:15 +0100
commitec85b5f367893a9cdc99b1543bbcde849d92e7ef (patch)
treec657d3963b526bf32d0f883f48da14b80d98327a /src/plugins/lua
parente49a9382bee59c794293e036171be67f7016962e (diff)
downloadrspamd-ec85b5f367893a9cdc99b1543bbcde849d92e7ef.tar.gz
rspamd-ec85b5f367893a9cdc99b1543bbcde849d92e7ef.zip
[Minor] Remove priorities from idempotent filters
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/aws_s3.lua2
-rw-r--r--src/plugins/lua/clickhouse.lua1
-rw-r--r--src/plugins/lua/elastic.lua1
-rw-r--r--src/plugins/lua/greylist.lua2
-rw-r--r--src/plugins/lua/history_redis.lua1
-rw-r--r--src/plugins/lua/metadata_exporter.lua1
-rw-r--r--src/plugins/lua/milter_headers.lua1
-rw-r--r--src/plugins/lua/neural.lua1
-rw-r--r--src/plugins/lua/replies.lua1
9 files changed, 3 insertions, 8 deletions
diff --git a/src/plugins/lua/aws_s3.lua b/src/plugins/lua/aws_s3.lua
index 3bce7913c..a1b30e4ed 100644
--- a/src/plugins/lua/aws_s3.lua
+++ b/src/plugins/lua/aws_s3.lua
@@ -261,6 +261,6 @@ rspamd_config:register_symbol({
name = 'EXPORT_AWS_S3',
type = settings.fail_action and 'postfilter' or 'idempotent',
callback = s3_aws_callback,
- priority = 10,
+ priority = settings.fail_action and 10 or nil,
flags = 'empty,explicit_disable,ignore_passthrough,nostat',
}) \ No newline at end of file
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua
index b8f418abd..ce1749874 100644
--- a/src/plugins/lua/clickhouse.lua
+++ b/src/plugins/lua/clickhouse.lua
@@ -1467,7 +1467,6 @@ if opts then
name = 'CLICKHOUSE_COLLECT',
type = 'idempotent',
callback = clickhouse_collect,
- priority = 10,
flags = 'empty,explicit_disable,ignore_passthrough',
augmentations = {string.format("timeout=%f", settings.timeout)},
})
diff --git a/src/plugins/lua/elastic.lua b/src/plugins/lua/elastic.lua
index 5578d48ec..8d20720bc 100644
--- a/src/plugins/lua/elastic.lua
+++ b/src/plugins/lua/elastic.lua
@@ -517,7 +517,6 @@ if redis_params and opts then
name = 'ELASTIC_COLLECT',
type = 'idempotent',
callback = elastic_collect,
- priority = 10,
flags = 'empty,explicit_disable,ignore_passthrough',
augmentations = {string.format("timeout=%f", settings.timeout)},
})
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua
index ae2cd02f9..04e003a1b 100644
--- a/src/plugins/lua/greylist.lua
+++ b/src/plugins/lua/greylist.lua
@@ -515,12 +515,14 @@ if opts then
type = 'postfilter',
callback = greylist_set,
priority = 6,
+ augmentations = {string.format("timeout=%f", redis_params.timeout or 0.0)},
})
local id = rspamd_config:register_symbol({
name = 'GREYLIST_CHECK',
type = 'prefilter',
callback = greylist_check,
priority = 6,
+ augmentations = {string.format("timeout=%f", redis_params.timeout or 0.0)}
})
rspamd_config:register_symbol({
name = settings.symbol,
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua
index 35bfb9242..01645a410 100644
--- a/src/plugins/lua/history_redis.lua
+++ b/src/plugins/lua/history_redis.lua
@@ -290,7 +290,6 @@ if opts then
type = 'idempotent',
callback = history_save,
flags = 'empty,explicit_disable,ignore_passthrough',
- priority = 150,
augmentations = {string.format("timeout=%f", redis_params.timeout or 0.0)}
})
lua_redis.register_prefix(settings.key_prefix .. hostname, N,
diff --git a/src/plugins/lua/metadata_exporter.lua b/src/plugins/lua/metadata_exporter.lua
index c5f4ca148..8ccf9afe1 100644
--- a/src/plugins/lua/metadata_exporter.lua
+++ b/src/plugins/lua/metadata_exporter.lua
@@ -652,7 +652,6 @@ for k, r in pairs(settings.rules) do
name = 'EXPORT_METADATA_' .. k,
type = 'idempotent',
callback = gen_exporter(r),
- priority = 10,
flags = 'empty,explicit_disable,ignore_passthrough',
augmentations = {string.format("timeout=%f", r.timeout or 0.0)}
})
diff --git a/src/plugins/lua/milter_headers.lua b/src/plugins/lua/milter_headers.lua
index d83115fc5..913b71f54 100644
--- a/src/plugins/lua/milter_headers.lua
+++ b/src/plugins/lua/milter_headers.lua
@@ -692,6 +692,5 @@ rspamd_config:register_symbol({
name = 'MILTER_HEADERS',
type = 'idempotent',
callback = milter_headers,
- priority = 10,
flags = 'empty,explicit_disable,ignore_passthrough',
})
diff --git a/src/plugins/lua/neural.lua b/src/plugins/lua/neural.lua
index d5df56c2b..85894389e 100644
--- a/src/plugins/lua/neural.lua
+++ b/src/plugins/lua/neural.lua
@@ -962,7 +962,6 @@ rspamd_config:register_symbol({
name = 'NEURAL_LEARN',
type = 'idempotent,callback',
flags = 'nostat,explicit_disable,ignore_passthrough',
- priority = 5,
callback = ann_push_vector
})
diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index ee2e4987f..ef3643f66 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -302,7 +302,6 @@ if opts then
name = 'REPLIES_SET',
type = 'idempotent',
callback = replies_set,
- priority = 5,
group = 'replies',
flags = 'explicit_disable,ignore_passthrough',
})