Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Webslice
ISPConfig 3
Commits
f5b95824
Commit
f5b95824
authored
Jul 12, 2019
by
Marius Burkard
Browse files
- use crypted password for rspamd UI if possible
parent
7f9a53e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/plugins-available/postfix_server_plugin.inc.php
View file @
f5b95824
...
...
@@ -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'
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment