Author Topic: How to disable parent folder (subfolder) creation  (Read 3350 times)

Offline rchk

  • Newbie
  • *
  • Posts: 2
How to disable parent folder (subfolder) creation
« on: August 14, 2013, 10:04:38 PM »
Hello, I am building webmail site with RC 0.9.2.

In the Folder management UI, it allow user to create new folder under another one by selecting "Parent Folder".
My IMAP server don't support subfolder. I know I can enable it by adding the following config.
$rcmail_config['imap_root'] = 'INBOX';
$rcmail_config['imap_delimiter'] = '#';

But I don't want to enable it, because the "subfolders" will appear strange folder while user using other IMAP client, e.g. Thunderbird.

How can I disable parent folder (subfolder) option from Roundcude, let user only can create folder in top level ?
I don't want to hack the codes, is there an option in config file can disable it?

I made search in forum and google still can't find the solution.

Many thanks!!  :)

Offline jenelso2

  • Newbie
  • *
  • Posts: 1
Re: How to disable parent folder (subfolder) creation
« Reply #1 on: April 30, 2015, 03:08:36 PM »
Just wanted to respond to this as I couldn't find any answers anywhere either.  We are using Roundcube 0.9.5.

Change the following to disable sub-folder creation if your IMAP doesn't allow it:

program/steps/settings/edit_folder.inc - line number 115
Change - $exceptions = array($mbox_imap);
To - $exceptions = $storage->list_folders();

This will fill the parent folder list with just "---" instead of the list of folders, seems to work good for us.

Good luck.