From 062e610ae7a0d6a9e339e4334a5e97b1298ffe83 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 31 May 2024 15:50:29 +0200 Subject: [PATCH] trigger antispam config-rebuild if dkim-flag changed for domain or a new domain with dkim=1 has been created Signed-off-by: Michael Kaufmann --- lib/Froxlor/Api/Commands/Domains.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Froxlor/Api/Commands/Domains.php b/lib/Froxlor/Api/Commands/Domains.php index 52e204e7..2dfbfb94 100644 --- a/lib/Froxlor/Api/Commands/Domains.php +++ b/lib/Froxlor/Api/Commands/Domains.php @@ -831,6 +831,9 @@ class Domains extends ApiCommand implements ResourceEntity Cronjob::inserttask(TaskId::REBUILD_VHOST); // Using nameserver, insert a task which rebuilds the server config Cronjob::inserttask(TaskId::REBUILD_DNS); + if ($dkim == '1') { + Cronjob::inserttask(TaskId::REBUILD_RSPAMD); + } $this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, "[API] added domain '" . $domain . "'"); @@ -1675,6 +1678,10 @@ class Domains extends ApiCommand implements ResourceEntity Cronjob::inserttask(TaskId::REBUILD_VHOST); } + if ($dkim != $result['dkim']) { + Cronjob::inserttask(TaskId::REBUILD_RSPAMD); + } + if ($speciallogfile != $result['speciallogfile'] && $speciallogverified != '1') { $speciallogfile = $result['speciallogfile']; }