HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   PostFix and or Courier IMAP question (

jsb 3rd October 2005 01:19

PostFix and or Courier IMAP question
First off: Nice work guys. Great product!

The ubuntu how-to was very straight forward. Up and running in short order.

I would like to set up default Outbox, Sent Items and Draft directories. We will be using either Thunderbird or Evolution and maybe down the road a web interface such as squirrel mail. We will only be using IMAP.



falko 3rd October 2005 13:55

You can either have your users create those folders with their email client, or you create those folders with ISPConfig when you create a new user.
For the latter, you'd have to modify the function user_insert() in /root/ispconfig/scripts/lib/config.lib.php.

In line 654 you could insert something like this:
PHP Code:

exec("maildirmake ".$web_path."/user/".$user_username."/Maildir &> /dev/null");
exec("maildirmake -f Drafts ".$web_path."/user/".$user_username."/Maildir &> /dev/null"); 

That would for example create a Drafts directory within Maildir.

jsb 4th October 2005 01:32

Great, then repeat the second command for each additional directory.
Sure glad I asked. I didn't think this would have been handled through ispconfig.



timehost 10th January 2006 01:19

maildirmake not working
I changed the file as follows but it still doesnt create /cur /tmp and /new, thus the customers get an error when they create a user and try to check the account working.

exec("chown -R ".$user_username.":web".$web_doc_id." ".$web_path."/user/".$user_username." &> /dev/null");
exec("chmod -R 775 $web_path/user/$user_username");
exec("chmod 755 $web_path/user/$user_username");
exec("maildirmake ".$web_path."/user/".$user_username."/Maildir &> /dev/null");
exec("maildirmake -f cur ".$web_path."/user/".$user_username."/Maildir &> /dev/null");
exec("maildirmake -f new ".$web_path."/user/".$user_username."/Maildir &> /dev/null");
exec("maildirmake -f tmp ".$web_path."/user/".$user_username."/Maildir &> /dev/null");

timehost 10th January 2006 01:46

OK, i had to provide full path to the maildirmake command. Thanks.

All times are GMT +2. The time now is 09:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.