Florian Schaal
2014-08-03 2b05c2015216e9bd7d164ba4b5c2d93ad01a2dc8
make sure the amavis-user can always access the dkim-dir
2 files modified
12 ■■■■ changed files
docs/Remote_API_docs.txt 2 ●●● patch | view | raw | blame | history
server/plugins-available/mail_plugin_dkim.inc.php 10 ●●●●● patch | view | raw | blame | history
docs/Remote_API_docs.txt
@@ -1,3 +1,3 @@
The remote API documentation is in the remote_client/API-docs subfolder.
The remote API documentation is in the remoting_client/API-docs subfolder.
server/plugins-available/mail_plugin_dkim.inc.php
@@ -123,7 +123,15 @@
            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'])) {