wiki:Howto_Config

Version 3 (modified by philodox, 7 years ago) (diff)

Experience from Debian/Courier?-IMAP/Postfix/MySQL5/php5 setup.

Note that to add multiple mail hosts in main.inc.php you need to use a slightly different format from the default.

Here is the default format when installed:

$rcmail_configdefault_host? = 'localhost';

And if you want a dropdown list like it's explained in the comments you need something like this:

$rcmail_configdefault_host? = array('mail.example.com', 'webmail.example.com', 'ssl://mail.example.com:993');

Configuring For Courier-IMAP Support

Courier-IMAP strictly adheres to the IMAP4 standards. Therefore, it follows the IMAP namespacing guidelines. Under the standards, the namespace of "INBOX." is used to contain all private user created and user specific folders. The namespace of "shared." is used to store all public folders. Courier-IMAP uses this by default, and it is up to the Mail User Agent (MUA), such as RoundCube, Thunderbird, Outlook, etc., to properly reference the namespace while creating/modifying/storing in folders.

The default RC configuration files do not have this built in, or at least did not support my experience of Courier-IMAP/Postfix under Debian.

The common side effect of this is when a user tries to send a message; the message reaches the SMTP server and is sent to the recipient, however a "Sending Message" notification comes up and results in a time out after 2 minutes. (You can reference logs and see that it is occurring in a php file readin function). This is because the Sent folder is configured outside of the INBOX. namespace and RC does not have the ability to write the sent message to that folder. In addition, a user will not be able to move files from the Inbox folder to any of the Drafts, Junk, Trash, and Sent folders.

Configure main.inc.php and prepend a "INBOX." to any folder references in order to have RC correctly reference the IMAP namespace for private user folders.

The resulting lines will look like this: $rcmail_configdrafts_mbox? = 'INBOX.Drafts'; $rcmail_configjunk_mbox? = 'INBOX.Junk';

... [ apply same format to rest of lines ] ...

$rcmail_configdefault_imap_folders? = array('INBOX.', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash');

If this is correctly done, upon refresh of the main RC page you will see the Drafts, Sent, Junk, and Trash folders as subfolders of the Inbox.

If you have residual top level folders of Drafts, Sent, Junk, Trash, you can delete them by going to Personal Settings -> Folders. If the top level folders do not show up (they will not have INBOX. in the name) you must change the following line in main.inc.php to FALSE:

$rcmail_configprotect_default_folders? = FALSE;

This will allow you to delete top level folders. Change back to TRUE when you are done in order to prevent users from accidentally deleting the default folders.