]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Add augmentation for aws_s3 plugin
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 11 Sep 2022 19:04:38 +0000 (20:04 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 11 Sep 2022 19:04:38 +0000 (20:04 +0100)
src/plugins/lua/aws_s3.lua

index bd53dac50da2dc424081e298ca1979f8c9c89f5d..60981df9e8fcc6035c6da59a86c6c67462bba039 100644 (file)
@@ -257,10 +257,13 @@ if not settings.upstreams then
   return
 end
 
+local is_postfilter = settings.fail_action ~= nil
+
 rspamd_config:register_symbol({
   name = 'EXPORT_AWS_S3',
-  type = settings.fail_action and 'postfilter' or 'idempotent',
+  type = is_postfilter and 'postfilter' or 'idempotent',
   callback = s3_aws_callback,
-  priority = settings.fail_action and lua_util.symbols_priorities.high or nil,
+  augmentations = {string.format("timeout=%f", settings.s3_timeout)},
+  priority = is_postfilter and lua_util.symbols_priorities.high or nil,
   flags = 'empty,explicit_disable,ignore_passthrough,nostat',
 })
\ No newline at end of file