From 265403e110f98a0cc6a928ed98f0ceadb2f962da Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 26 Dec 2023 12:45:58 +0100 Subject: [PATCH] revert "Significantly lower ratelimit" --- cmdeploy/src/cmdeploy/__init__.py | 11 ++++------- cmdeploy/src/cmdeploy/rspamd/ratelimit.conf | 9 --------- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 cmdeploy/src/cmdeploy/rspamd/ratelimit.conf diff --git a/cmdeploy/src/cmdeploy/__init__.py b/cmdeploy/src/cmdeploy/__init__.py index 3a36167..cbcd41f 100644 --- a/cmdeploy/src/cmdeploy/__init__.py +++ b/cmdeploy/src/cmdeploy/__init__.py @@ -459,13 +459,10 @@ def _configure_rspamd(dkim_selector: str, mail_domain: str) -> bool: ) need_restart |= redis_conf.changed - ratelimit_conf = files.put( - name="enable rate limiting", - src=importlib.resources.files(__package__).joinpath("rspamd/ratelimit.conf"), - dest="/etc/rspamd/local.d/ratelimit.conf", - user="root", - group="root", - mode="644", + ratelimit_conf = files.file( + name="disable rate limiting", + path="/etc/rspamd/local.d/ratelimit.conf", + present=False, ) need_restart |= ratelimit_conf.changed diff --git a/cmdeploy/src/cmdeploy/rspamd/ratelimit.conf b/cmdeploy/src/cmdeploy/rspamd/ratelimit.conf deleted file mode 100644 index f9b7912..0000000 --- a/cmdeploy/src/cmdeploy/rspamd/ratelimit.conf +++ /dev/null @@ -1,9 +0,0 @@ -rates { - user = { - bucket = { - burst = 60; - rate = "40 / 1min"; - } - } -} -whitelisted_user = "/etc/rspamd/local.d/whitelisted_users_ratelimit.map";