Skip to content

Commit

Permalink
trigger antispam config-rebuild if dkim-flag changed for domain or a …
Browse files Browse the repository at this point in the history
…new domain with dkim=1 has been created

Signed-off-by: Michael Kaufmann <[email protected]>
  • Loading branch information
d00p committed May 31, 2024
1 parent 5dc9aa3 commit 062e610
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Froxlor/Api/Commands/Domains.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,9 @@ public function add()
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 . "'");

Expand Down Expand Up @@ -1675,6 +1678,10 @@ public function update()
Cronjob::inserttask(TaskId::REBUILD_VHOST);
}

if ($dkim != $result['dkim']) {
Cronjob::inserttask(TaskId::REBUILD_RSPAMD);
}

if ($speciallogfile != $result['speciallogfile'] && $speciallogverified != '1') {
$speciallogfile = $result['speciallogfile'];
}
Expand Down

0 comments on commit 062e610

Please sign in to comment.