Carsten Schoene
2014-01-01 86ad3973515b90ee44d2938bb75204f0b5727e0f
set correct ownership on sieve filter file and link
1 files modified
8 ■■■■ changed files
server/plugins-available/maildeliver_plugin.inc.php 8 ●●●● patch | view | raw | blame | history
server/plugins-available/maildeliver_plugin.inc.php
@@ -210,9 +210,15 @@
            }
            file_put_contents($sieve_file_isp, $tpl->grab());
            chown($sieve_file_isp,$mail_config['mailuser_name']);
            chgrp($sieve_file_isp,$mail_config['mailuser_group']);
            chdir($data["new"]["maildir"]);
            //* create symlink to activate sieve script
            symlink("sieve/ispconfig.sieve", ".sieve")  or $app->log("Unable to create symlink to active sieve filter", LOGLEVEL_WARN);
            symlink("sieve/ispconfig.sieve", ".sieve")  or $app->log("Unable to create symlink to active sieve filter", LOGLEVEL_WARN);
            if (is_link(".sieve")) {
                lchown($sieve_file_isp,$mail_config['mailuser_name']);
                lchgrp($sieve_file_isp,$mail_config['mailuser_group']);
            }
            unset($tpl);
        }