View Single Post
Old 23rd April 2009, 17:02
andypl andypl is offline
Senior Member
Join Date: Mar 2006
Location: Warsaw, Poland
Posts: 100
Thanks: 1
Thanked 5 Times in 4 Posts

Originally Posted by till View Post
Take a look in the file /usr/local/ispconfig/server/plugins-enabled/
I added these two lines to function user_insert

exec('mkdir -p '.escapeshellcmd($data['new']['maildir']).'/.Spam');
exec('mkdir -p '.escapeshellcmd($data['new']['maildir']).'/.NoSpam');

//* Create the maildir, if it doesn not exist, set permissions, set quota.
                if(!empty($maildomain_path) && !is_dir($maildomain_path)) {
                        exec("su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']);
                        exec('chown -R '.$mail_config['mailuser_name'].':'.$mail_config['mailuser_group'].' '.escapeshellcmd($data['new']['maildir']));
                        $app->log("Set ownership on ".escapeshellcmd($data['new']['maildir']),LOGLEVEL_DEBUG);
                        //* Create .Spam and .NoSpam folder
                        exec('mkdir -p '.escapeshellcmd($data['new']['maildir']).'/.Spam');
                        exec('mkdir -p '.escapeshellcmd($data['new']['maildir']).'/.NoSpam');
                        //* This is to fix the maildrop quota not being rebuilt after the quota is changed.
                        exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); // Avoid maildirmake quota b$
                        $app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLE$
but there does not create any directories.
Reply With Quote