Commit fe869a17 authored by Florian Schaal's avatar Florian Schaal

use $app->system->is_user instead of exec passwd

parent 4c794a56
......@@ -123,9 +123,10 @@ class mail_plugin_dkim {
if (!is_dir($mail_config['dkim_path'])) {
$app->log('DKIM Path '.$mail_config['dkim_path'].' not found - (re)created.', LOGLEVEL_DEBUG);
$amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
if($app->system->is_user('amavis')) { $amavis_user='amavis'; }
elseif ($app->system->is_user('vscan')) { $amavis_user='vscan'; }
else { $amavis_user=''; }
if(!empty($amavis_user)) {
$amavis_user=rtrim($amavis_user, ":");
mkdir($mail_config['dkim_path'], 0750, true);
exec('chown '.$amavis_user.' /var/lib/amavis/dkim');
unset($amavis_user);
......
Markdown is supported
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