Commit f5b95824 authored by Marius Burkard's avatar Marius Burkard
Browse files

- use crypted password for rspamd UI if possible

parent 7f9a53e5
......@@ -217,9 +217,15 @@ class postfix_server_plugin {
if($mail_config['content_filter'] == 'rspamd' && ($mail_config['rspamd_password'] != $old_ini_data['mail']['rspamd_password'] || $mail_config['content_filter'] != $old_ini_data['mail']['content_filter'])) {
$app->load('tpl');
$rspamd_password = $mail_config['rspamd_password'];
$crypted_password = trim(exec('rspamadm pw -p ' . escapeshellarg($rspamd_password)));
if($crypted_password) {
$rspamd_password = $crypted_password;
}
$tpl = new tpl();
$tpl->newTemplate('rspamd_worker-controller.inc.master');
$tpl->setVar('rspamd_password', $mail_config['rspamd_password']);
$tpl->setVar('rspamd_password', $rspamd_password);
$app->system->file_put_contents('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
$app->services->restartServiceDelayed('rspamd', 'reload');
}
......
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