Skip to content

Commit ca4248c

Browse files
author
Till Brehm
committed
Merge branch 'rspamd_password' into 'stable-3.1'
installer should store encrypted rspamd password See merge request ispconfig/ispconfig3!1081
2 parents bad49e1 + 5494772 commit ca4248c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

install/lib/installer_base.lib.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1805,7 +1805,12 @@ public function configure_rspamd() {
18051805

18061806
$tpl = new tpl();
18071807
$tpl->newTemplate('rspamd_worker-controller.inc.master');
1808-
$tpl->setVar('rspamd_password', $mail_config['rspamd_password']);
1808+
$rspamd_password = $mail_config['rspamd_password'];
1809+
$crypted_password = trim(exec('rspamadm pw -p ' . escapeshellarg($rspamd_password)));
1810+
if($crypted_password) {
1811+
$rspamd_password = $crypted_password;
1812+
}
1813+
$tpl->setVar('rspamd_password', $rspamd_password);
18091814
wf('/etc/rspamd/local.d/worker-controller.inc', $tpl->grab());
18101815
chmod('/etc/rspamd/local.d/worker-controller.inc', 0644);
18111816
}

0 commit comments

Comments
 (0)