Roundcube Community Forum

 

Dev-to-Dev: How does Roundcube know system folders from custom folders?

Started by JAB Creations, February 24, 2025, 08:08:25 PM

Previous topic - Next topic

JAB Creations

On my server Roundcube seems to know which folders are system folders and which are custom. I'm going through the code though... I'm a bit lost. Is it a static list? A detection of a mail server provider type? Here is an example of what I get via PHP's IMAP extension (yes, I know it's no longer maintained):

0 = INBOX
1 = INBOX.Test 123
2 = INBOX.Archive
3 = INBOX.spam
4 = INBOX.Trash
5 = INBOX.Sent
6 = INBOX.Drafts

So array item 1 is the only custom folder here. But how does Roundcube make that determination?

SKaero

I believe Roundcube follows RFC 6154 https://www.rfc-editor.org/rfc/rfc6154 its handled in <RC root>/program/lib/Roundcube/rcube.php with the special use names being changeable in the config, you can see them in <RC root>/config/defaults.inc.php with config options that have "_mbox" in them.

JAB Creations

@SKaero Thank you for the quick reply and an official reference.