@@ -219,17 +219,18 @@ function update($event_name, $data) {
219219
220220 file_put_contents ($ sieve_file_isp , $ tpl ->grab ()) or $ app ->log ("Unable to write sieve filter file " , LOGLEVEL_WARN );
221221 if ( is_file ($ sieve_file_isp ) ) {
222- chown ($ sieve_file_isp ,$ mail_config ['mailuser_name ' ]);
223- chgrp ($ sieve_file_isp ,$ mail_config ['mailuser_group ' ]);
222+ $ app -> system -> chown ($ sieve_file_isp ,$ mail_config ['mailuser_name ' ], false );
223+ $ app -> system -> chgrp ($ sieve_file_isp ,$ mail_config ['mailuser_group ' ], false );
224224 }
225225 chdir ($ data ["new " ]["maildir " ]);
226226 //* create symlink to activate sieve script
227227 symlink ("sieve/ispconfig.sieve " , ".sieve " ) or $ app ->log ("Unable to create symlink to active sieve filter " , LOGLEVEL_WARN );
228228 if (is_link (".sieve " )) {
229- lchown (".sieve " ,$ mail_config ['mailuser_name ' ]);
230- lchgrp (".sieve " ,$ mail_config ['mailuser_group ' ]);
229+ $ app -> system -> chown (".sieve " ,$ mail_config ['mailuser_name ' ], true );
230+ $ app -> system -> chgrp (".sieve " ,$ mail_config ['mailuser_group ' ], true );
231231 }
232- exec ('chown ' .$ mail_config ['mailuser_name ' ].': ' .$ mail_config ['mailuser_group ' ].' ' .escapeshellcmd ($ sieve_file ));
232+ $ app ->system ->chown ($ sieve_file ,$ mail_config ['mailuser_name ' ],true );
233+ $ app ->system ->chgrp ($ sieve_file ,$ mail_config ['mailuser_group ' ],true );
233234
234235 unset($ tpl );
235236
0 commit comments