View Single Post
  #5  
Old 23rd April 2009, 16:02
andypl andypl is offline
Member
 
Join Date: Mar 2006
Location: Radom, Poland
Posts: 85
Thanks: 1
Thanked 1 Time in 1 Post
Default

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

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

Code:
//* 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