Author Topic: Dovecot Namespace Not Working  (Read 499 times)

Offline kittonian

  • Newbie
  • *
  • Posts: 4
Dovecot Namespace Not Working
« on: July 16, 2021, 10:19:43 AM »
We use Dovecot for our IMAP server and have never run into the issue that we have with RoundCube. It is a simple dot (.) delimiter but RoundCube is displaying $ instead of actually separating folders and sub-folders. For example, I have INBOX$Sent instead of a folder called Inbox with a sub-folder called Sent.

I have tried modifying the defaults.inc.php as follows:

$config['imap_delimiter'] = "."; (also tried '.')
$config['imap_vendor'] = 'dovecot';
$config['imap_force_caps'] = true;
$config['imap_force_lsub'] = true;
$config['imap_force_ns'] = true;

Nothing seems to change. I've made sure to logout and then login again just to ensure that the config is being re-read. Really need to resolve this and would appreciate any assistance.

I attached a screenshot because it also seems that while RoundCube is not respecting the actual dot delimiter from Dovecot, it is showing any folder name with a dot in it as a folder/subfolder (i.e. anything name.com for example).

FYI, this has never been an issue with any other webmail clients we've tried in the past, including NextCloud, Squirrelmail, etc. This is the first time I've ever seen this issue so it seems to be RoundCube specific.

Thanks!
« Last Edit: July 16, 2021, 05:15:41 PM by kittonian »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,678
    • http://SKaero.com/
Re: Dovecot Namespace Not Working
« Reply #1 on: July 16, 2021, 11:34:37 PM »
I have tried modifying the defaults.inc.php as follows:
Don't modify the defaults.inc.php copy the options into your config.inc.php and make the changes there.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,286
Re: Dovecot Namespace Not Working
« Reply #2 on: July 17, 2021, 01:17:29 AM »
Enable imap_debug and provide the log from the moment you log in.

Offline kittonian

  • Newbie
  • *
  • Posts: 4
Re: Dovecot Namespace Not Working
« Reply #3 on: July 17, 2021, 09:48:48 AM »
SOLVED

Turns out, because I'm using the ListEscape Dovecot plugin, my delimiter is $ not . I figured this out by connecting directly via openssl s_client and running a LIST command.
So, I edited the config.inc.php file and hard set the delimiter to '$'. Thank you SKaero for talking about making the changes there, because it turns out there was a delimiter line in there that was telling RC it was '.'. I modified that to be '$' and it started working correctly. However, that worked for the main login, but not the additional_imap plugin.

Additional_IMAP Solution:

To resolve this, first I tried editing the config and various php files to modify the delimiter, but nothing worked. Then I remembered that this plugin creates SQL tables and stores its data in the db. So, I logged into postgres and did the following:

select * from additional_imap;

This returned a record that showed a delimiter of "." in the preferences column. So, I changed it.

update additional_imap set preferences='a:9:{s:21:"show_real_foldernames";b:1;s:20:"lock_special_folders";b:1;s:11:"drafts_mbox";s:6:"Drafts";s:9:"sent_mbox";s:0:"";s:9:"junk_mbox";s:0:"";s:10:"trash_mbox";s:0:"";s:12:"archive_mbox";N;s:24:"sticky_notes_imap_folder";N;s:14:"imap_delimiter";s:1:"$";}' where id='2';

-------------------------------

Bottom line is that Roundcube should really be able to detect the $ delimiter as every other webmail solution I've tried handles it just fine (NextCloud, Squirrelmail, etc.).
Also, additional_imap needs an additional delimiter option of $ so that can be selected in the drop down list when configuring an additional imap account.

The good news is that it's all working now.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,628
Re: Dovecot Namespace Not Working
« Reply #4 on: July 17, 2021, 09:54:41 AM »
If you set imap_delimiter to null (the default) then Roundcube will detect it automatically. Unless you mean that auto detect is not working?
Code: [Select]
// If you know your imap's folder delimiter, you can specify it here.
// Otherwise it will be determined automatically
$config['imap_delimiter'] = null;
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline kittonian

  • Newbie
  • *
  • Posts: 4
Re: Dovecot Namespace Not Working
« Reply #5 on: July 17, 2021, 11:21:56 AM »
Correct. Auto-detect does not work for the $ delimiter. That was the whole issue.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,628
Re: Dovecot Namespace Not Working
« Reply #6 on: July 17, 2021, 11:40:29 AM »
You said you had it set to '.'. In your config file, rather than null.

Quote
Thank you SKaero for talking about making the changes there, because it turns out there was a delimiter line in there that was telling RC it was '.'

I am only talking about the Roundcube core. Not the Additional_IMAP plugin.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline kittonian

  • Newbie
  • *
  • Posts: 4
Re: Dovecot Namespace Not Working
« Reply #7 on: July 18, 2021, 10:56:26 AM »
There is no delimiter config line in the config.inc.php by default, or it is set to null (can't remember). I had changed it and forgot when I was investigating the issue.

Forget about additional_imap. I am specifically talking about the default Roundcube core, nothing more.

Even though an IMAP List command shows that the delimiter was $, Roundcube did not detect it properly. That's what I am reporting.