Commit 4406a09a authored by Jesse Norell's avatar Jesse Norell
Browse files

missing check for a few rspamd custom templates

parent 99e2f0a4
......@@ -1868,7 +1868,11 @@ class installer_base {
);
foreach ($local_d as $f) {
$tpl = new tpl();
$tpl->newTemplate("rspamd_${f}.master");
if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master")) {
$tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_${f}.master");
} else {
$tpl->newTemplate("rspamd_${f}.master");
}
$tpl->setVar('dkim_path', $mail_config['dkim_path']);
$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
......@@ -1964,7 +1968,11 @@ class installer_base {
unset($server_ini_string);
$tpl = new tpl();
$tpl->newTemplate('rspamd_worker-controller.inc.master');
if (file_exists($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_worker-controller.inc.master")) {
$tpl->newTemplate($conf['ispconfig_install_dir']."/server/conf-custom/install/rspamd_worker-controller.inc.master");
} else {
$tpl->newTemplate("rspamd_worker-controller.inc.master");
}
$rspamd_password = $mail_config['rspamd_password'];
$crypted_password = trim(exec('rspamadm pw -p ' . escapeshellarg($rspamd_password)));
if($crypted_password) {
......
......@@ -295,7 +295,11 @@ class rspamd_plugin {
$app->load('tpl');
$tpl = new tpl();
$tpl->newTemplate('rspamd_users.inc.conf.master');
if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master")) {
$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_users.inc.conf.master");
} else {
$tpl->newTemplate("rspamd_users.inc.conf.master");
}
$tpl->setVar('record_identifier', 'ispc_' . $type . '_' . $entry_id);
$tpl->setVar('priority', $settings_priority);
......@@ -443,7 +447,12 @@ class rspamd_plugin {
}
} else {
$tpl = new tpl();
$tpl->newTemplate('rspamd_wblist.inc.conf.master');
if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_wblist.inc.conf.master")) {
$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_wblist.inc.conf.master");
} else {
$tpl->newTemplate("rspamd_wblist.inc.conf.master");
}
$tpl->setVar('list_scope', ($global_filter ? 'global' : 'spamfilter'));
$tpl->setVar('record_id', $record_id);
// add 30/40 to priority to avoid collisions and prefer white/blacklists above mailbox/domain spamfilter settings
......@@ -521,7 +530,11 @@ class rspamd_plugin {
);
foreach ($local_d as $f) {
$tpl = new tpl();
$tpl->newTemplate("rspamd_${f}.master");
if (file_exists($conf['rootpath']."/conf-custom/install/rspamd_${f}.master")) {
$tpl->newTemplate($conf['rootpath']."/conf-custom/install/rspamd_${f}.master");
} else {
$tpl->newTemplate("rspamd_${f}.master");
}
$tpl->setVar('dkim_path', $mail_config['dkim_path']);
$tpl->setVar('rspamd_redis_servers', $mail_config['rspamd_redis_servers']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment