Permission problem in creating mail domain directory with Dovecot
From version 3.0.3/SVN (not with 3.0.2.2) there is a permission problem when I create a new mailbox in new domain. The domain directory under /var/vmail is created with root owner and 700 permission and then dovecot can't access to users subdirecroy (created correctly with vmail owner) because lost "x" permission on parent directory. I don't known if there is the same problem also with courier.
I modified function user_insert in mail_plugin.inc.php like this:
//* Create the mail domain directory, if it does not exist
if(!empty($base_path) && !is_dir($base_path)) {
exec("su -c 'mkdir -p ".escapeshellcmd(base_path)."' ".
mail_config['mailuser_name']);
$app->log('Created Domain Directory: '.$base_path,LOGLEVEL_DEBUG);
if($mail_config['pop3_imap_daemon'] == 'dovecot') {
exec('chown -R '.mail_config['mailuser_name'].':'.
mail_config['mailuser_group'].' '.escapeshellcmd($base_path));
$app->log('Set ownership of : '.$base_path,LOGLEVEL_DEBUG);
}
}
Old ISPConfig version (3.0.2.1 and 3.0.2.2) create domain folder with 755. I don't known if it's better chmod 755 or chown vmail. Thanks, Alberto