Commit 2b05c201 authored by Florian Schaal's avatar Florian Schaal

make sure the amavis-user can always access the dkim-dir

parent d57ffdc6
The remote API documentation is in the remote_client/API-docs subfolder.
\ No newline at end of file
The remote API documentation is in the remoting_client/API-docs subfolder.
......@@ -123,7 +123,15 @@ 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);
mkdir($mail_config['dkim_path'], 0750, true);
$amavis_user=exec('grep -o "^amavis:\|^vscan:" /etc/passwd');
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;
} else {
mkdir($mail_config['dkim_path'], 0755, true);
}
}
if (!is_writeable($mail_config['dkim_path'])) {
......
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