1

Topic: IMAP Mailbox Structure

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Gentoo Base System release 2.1
- Related log if you're reporting an issue:
====

I would like to know how to change the automatically created IMAP mailbox structure as seen by a user in his e-mail client from:
INBOX
Drafts
Junk
Sent
Trash

to:
INBOX|
         -Drafts
         -Junk
         -Sent
         -Trash

I can temporarily change the mailbox structure in Evolution and Roundcube clients. restarting the mail client returns the default configuration.

Changing /etc/dovecot/dovecot.conf makes no difference.

    # Plugin: autocreate. Create and subscribe to default IMAP folders.
    autocreate = INBOX
    autocreate2 = Sent
    autocreate3 = Trash
    autocreate4 = Drafts
    autocreate5 = Junk
    autosubscribe = INBOX
    autosubscribe2 = Sent
    autosubscribe3 = Trash
    autosubscribe4 = Drafts

It used to work fine when I trialed a year ago iRedMail 0.8.1 on top of OpenSuse 12.1.

Thanks in advance for your assistance.

Hans

2

Re: IMAP Mailbox Structure

*) Just curious why you want this kind of mailbox structure?
*) With default iRedMail configurations, both Dovecot and Roundcube webmail will create default IMAP folders: INBOX, Sent, Trash, Drafts, Junk.

3 (edited by Hans_Linux 2013-03-26 13:51:47)

Re: IMAP Mailbox Structure

ZhangHuangbin wrote:

*) Just curious why you want this kind of mailbox structure?
*) With default iRedMail configurations, both Dovecot and Roundcube webmail will create default IMAP folders: INBOX, Sent, Trash, Drafts, Junk.

The reasons for this structure are to save Real Estate while the users dispaly in Evolotion and monitor several e-mail accounts:

Accounts (hidden sub directories)
+Inbox

Local Sales (show sub directories)
-Inbox
    -Drafts
    -Junk
    -Sent
    -Trash

Export Sales
+Inbox

Purchasing
+Inbox

Logistics
+Inbox

etc.

The users see immediately that an email has arrived, then click on the '+' beside "Inbox" to expand the relevant mailbox and show the sub-directories. Then take action and when done, click on '-' beside "Inbox" to hide the sub-directories. This has worked with the currenent external e-mail and web hoter since 1998 and when doing trials wit IredMail-0.8.1 on top of OpenSuse 12.1.

With IRedMail the view is like this:

Accounts (hidden sub directories)
+Inbox
-Drafts
-Junk
-Sent
-Trash

Local Sales (show sub directories)
-Inbox
    -Drafts
    -Junk
    -Sent
    -Trash
-Drafts
-Junk
-Sent
-Trash

Export Sales
+Inbox
-Drafts
-Junk
-Sent
-Trash

Purchasing
+Inbox
-Drafts
-Junk
-Sent
-Trash

Logistics
+Inbox
-Drafts
-Junk
-Sent
-Trash

etc.

This causes lots of problems as the full number of Inboxes can't be monitored with a glance and the users complain that the Drafts and Send messages have disappeared.

The additional non-hideable sub-directories can be removed, but will appear again on restarting the e-mail client.

There should be a configuration somewhere in the IRedmail installed scripts that disables the undesired sub directories.

4

Re: IMAP Mailbox Structure

You can configure "autocreate" and "autosubscribe" in Dovecot config file, and default imap folders in Roundcube webmail config file.

5

Re: IMAP Mailbox Structure

ZhangHuangbin wrote:

You can configure "autocreate" and "autosubscribe" in Dovecot config file, and default imap folders in Roundcube webmail config file.

Thanks, for pointing me into the right direction.

I was able to fix the problem by changing dovecot.conf to:

    autocreate = INBOX
    autocreate2 = INBOX/Sent
    autocreate3 = INBOX/Trash
    autocreate4 = INBOX/Drafts
    autocreate5 = INBOX/Junk
    autosubscribe = INBOX
    autosubscribe2 = INBOX/Sent
    autosubscribe3 = INBOX/Trash
    autosubscribe4 = INBOX/Drafts
    autosubscribe4 = INBOX/Junk

and using IMAP instead of IMAP+ protocol.

and for each user unsubscribing unwanted and subscribing the desired folders.