We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c794a5 commit fe869a1Copy full SHA for fe869a1
server/plugins-available/mail_plugin_dkim.inc.php
@@ -123,9 +123,10 @@ function check_system($data) {
123
124
if (!is_dir($mail_config['dkim_path'])) {
125
$app->log('DKIM Path '.$mail_config['dkim_path'].' not found - (re)created.', LOGLEVEL_DEBUG);
126
- $amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
+ if($app->system->is_user('amavis')) { $amavis_user='amavis'; }
127
+ elseif ($app->system->is_user('vscan')) { $amavis_user='vscan'; }
128
+ else { $amavis_user=''; }
129
if(!empty($amavis_user)) {
- $amavis_user=rtrim($amavis_user, ":");
130
mkdir($mail_config['dkim_path'], 0750, true);
131
exec('chown '.$amavis_user.' /var/lib/amavis/dkim');
132
unset($amavis_user);
0 commit comments