From 3845f1039ed0c887b3634ab5dbfa201de88629e2 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Sun, 16 Mar 2008 08:29:42 -0400 Subject: [PATCH] Fixed a bug when maildirs are created. Updated the Debian installation instructions. --- server/plugins-available/mail_plugin.inc.php | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index e63d3f1..edc2483 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -61,9 +61,14 @@ function user_insert($event_name,$data) { global $app, $conf; + // get the config + $app->uses("getconf"); + $mail_config = $app->getconf->get_server_config($conf["server_id"], 'mail'); + // Create the maildir, if it does not exist if(!is_dir($data['new']['maildir'])) { exec('mkdir -p '.escapeshellcmd($data['new']['maildir'])); + exec('maildirmake '.escapeshellcmd($data['new']['maildir'])); exec('chown '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($data['new']['maildir'])); $app->log('Created Maildir: '.$data['new']['maildir'],LOGLEVEL_DEBUG); } -- Gitblit v1.9.1