Skip to content

Commit 097ad60

Browse files
author
Carsten Schoene
committed
fix: create sieve directory / change to maildir before symlinking
1 parent 3d3f470 commit 097ad60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/plugins-available/maildeliver_plugin.inc.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ function update($event_name, $data) {
205205

206206
$tpl->setVar('addresses', $address_str);
207207

208+
if ( ! is_dir($data["new"]["maildir"].'/sieve/') ) {
209+
$app->system->mkdirpath($data["new"]["maildir"].'/sieve/', 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
210+
}
211+
208212
file_put_contents($sieve_file_isp, $tpl->grab());
213+
chdir($data["new"]["maildir"]);
209214
//* create symlink to activate sieve script
210215
symlink("sieve/ispconfig.sieve", ".sieve") or $app->log("Unable to create symlink to active sieve filter", LOGLEVEL_WARN);
211216
unset($tpl);

0 commit comments

Comments
 (0)