Author Topic: Can't see and subscribed to default folders (trash, sent, drafts, junk)  (Read 11119 times)

Offline Guiyome

  • Newbie
  • *
  • Posts: 4
Hi there,

I got an issue about getting the list of the default folders within Roundcube (.Trash, .Sent, .Junk, .Drafts). I only have the INBOX folder.
I don't see the default folders in subscribed folders list or anywhere else.
So I can't delete emails or get a copy of sent emails as I can't configure the needed folders.

If I use Outlook on Windows or Mail on Mac, I get all the folders that I can't see in Roundcube.

So if any of you have an idea or lead about what I should modify on my configuration, I will appreciate because I'm going mad about it  :D


I use dovecot 1.2.15 and roudcube 0.8.5 on the server.
When creating a new mailbox with ispconfig 3, the maildir folder is as followed:

Quote
drwx------ 10 vmail vmail 4096  7 mars  18:52 .
drwx------  3 vmail vmail 4096  7 mars  18:52 ..
-rwxr--r--  1 vmail vmail   47  7 mars  18:52 courierimapsubscribed
drwx------  2 vmail vmail 4096  7 mars  18:52 cur
-rw-------  1 vmail vmail    8  7 mars  18:52 dovecot-uidvalidity
-rw-------  1 vmail vmail    0  7 mars  18:52 dovecot-uidvalidity.5138d3c5
drwx------  5 vmail vmail 4096  7 mars  18:52 .Drafts
drwx------  5 vmail vmail 4096  8 mars  10:19 INBOX
drwx------  5 vmail vmail 4096  7 mars  18:52 .Junk
-rw-------  1 vmail vmail   14  7 mars  18:52 maildirsize
drwx------  2 vmail vmail 4096  7 mars  18:52 new
drwx------  5 vmail vmail 4096  7 mars  18:52 .Sent
-rw-------  1 vmail vmail    0  7 mars  18:52 subscriptions
drwx------  2 vmail vmail 4096  7 mars  18:52 tmp
drwx------  5 vmail vmail 4096  7 mars  18:52 .Trash


Content of courierimapsubscribed is by default:

Quote
INBOX.Sent
INBOX.Drafts
INBOX.Trash
INBOX.Junk

And roundcube config is defined like this:

Quote
$rcmail_config['imap_ns_personal'] = NULL;
$rcmail_config['imap_ns_other'] = NULL;
$rcmail_config['imap_ns_shared'] = NULL;
 
$rcmail_config['imap_force_caps'] = false;
$rcmail_config['imap_force_lsub'] = false;
$rcmail_config['imap_force_ns'] = true;
 
$rcmail_config['drafts_mbox'] = '.Drafts';
$rcmail_config['junk_mbox'] = '.Junk';
$rcmail_config['sent_mbox'] = '.Sent';
$rcmail_config['trash_mbox'] = '.Trash';
 
$rcmail_config['default_folders'] = array('INBOX', '.Drafts', '.Sent', '.Junk', '.Trash');
 
$rcmail_config['create_default_folders'] = false;
$rcmail_config['protect_default_folders'] = true;

I tried many of the solutions I found here on the forum without any success.

Below, some of changes I did trying to get it works. I did them one by one then I tried to mix them but nothing successful.

I changed the content of courierimapsubscribed:

Quote
.Sent
.Drafts
.Trash
.Junk

I changed the Roundcube config with different solutions :
Quote
$rcmail_config['imap_ns_personal'] = ".";

Quote
$rcmail_config['imap_ns_personal'] = "INBOX.";

Quote
$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
$rcmail_config['junk_mbox'] = 'INBOX.Junk';
$rcmail_config['sent_mbox'] = 'INBOX.Sent';
$rcmail_config['trash_mbox'] = 'INBOX.Trash';
 
$rcmail_config['default_folders'] = array('INBOX', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash');

Quote
$rcmail_config['create_default_folders'] = true;


Many thanks for your help.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
I've not seen a problem like this before. but at a guess try this combination of settings in the rc config file:

Code: [Select]
$rcmail_config['imap_ns_personal'] = NULL;
$rcmail_config['imap_ns_other'] = NULL;
$rcmail_config['imap_ns_shared'] = NULL;
$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
$rcmail_config['junk_mbox'] = 'INBOX.Junk';
$rcmail_config['sent_mbox'] = 'INBOX.Sent';
$rcmail_config['trash_mbox'] = 'INBOX.Trash';
$rcmail_config['default_folders'] = array('INBOX', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash');

you said you use dovecot but you also have files from a courier-imap setup. so I guess you migrated from courier to dovecot in which case you still need to specify INBOX. in the folder settings. But there is no need to set a namespace.

I migrated from courier to dovecot long ago and the above settings work for me.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline Guiyome

  • Newbie
  • *
  • Posts: 4
I already did it before and I tried it again but it still doen't work ...
Thanks anyway.

I never used courrier, I only use dovecot.
So I don't know why I get those files from courrier-imap.
I'm trying to find where is the script form ispconfig which creates the mailbox to find it out.
« Last Edit: March 10, 2013, 03:19:32 PM by Guiyome »

Offline Guiyome

  • Newbie
  • *
  • Posts: 4
I found out why I have courier-imap files. Ispconfig creates both files, for dovecot and courier. I guess just in case we use one or the other ...
The file created for dovecot is "subscriptions" and it's the file modified by roundcube while adding/removing subscribed folders.


I just did a new test on a new mail box.
I rename folders ".Trash" to "INBOX.Trash", ".Sent" to "INBOX.Sent", ...

And I kept the following config ... and it works that way with renamed folders.

Quote
$rcmail_config['imap_ns_personal'] = NULL;
$rcmail_config['imap_ns_other'] = NULL;
$rcmail_config['imap_ns_shared'] = NULL;
$rcmail_config['drafts_mbox'] = 'INBOX.Drafts';
$rcmail_config['junk_mbox'] = 'INBOX.Junk';
$rcmail_config['sent_mbox'] = 'INBOX.Sent';
$rcmail_config['trash_mbox'] = 'INBOX.Trash';
$rcmail_config['default_folders'] = array('INBOX', 'INBOX.Drafts', 'INBOX.Sent', 'INBOX.Junk', 'INBOX.Trash');


But I don't know if I change folder names of existing mailbox I will have any troubles or not ...

So it seems that roundcube can't list folders starting with a dot (or doesn't show them).
Or maybe there is an option to turn on/off somewhere ...

Offline Guiyome

  • Newbie
  • *
  • Posts: 4
I found out what was wrong.

The mail configuration for Dovecot was with a specific option : mail_location = maildir:/var/virtualmailfolder/%d/%n/Maildir:LAYOUT=fs.
So Maildir folder is organised to be like this : Maildir/folder/ and Maildir/folder/subfolder

But Ispconfig created folders to be Maildir/.folder/  and Maildir/.folder.subfolder/

Therefore, Roundcube didn't read folders which began by a dot (.Trash, .Sent ...) because of Dovecot configuration, no matter what modification I could do within the Roundcube configuration file.


So I made it all right by changing Ispconfig creation script to add good folder names (Trash, Sent ...) and I change RoundCube configuration as followed :

Quote
$rcmail_config['imap_ns_personal'] = NULL;
$rcmail_config['imap_ns_other'] = NULL;
$rcmail_config['imap_ns_shared'] = NULL;
$rcmail_config['drafts_mbox'] = 'Drafts';
$rcmail_config['junk_mbox'] = 'Junk';
$rcmail_config['sent_mbox'] = 'Sent';
$rcmail_config['trash_mbox'] = 'Trash';
$rcmail_config['default_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');


Thanks JohnDoh for pushing me on good track to find it out !
Without trying to find why I had courier-imap file, I guess I'd be still digging !