Author Topic: Special Folders setting reverts  (Read 2505 times)

Offline cheeks

  • Newbie
  • *
  • Posts: 6
Special Folders setting reverts
« on: February 25, 2016, 08:50:59 PM »
I'm using roundcubemail-1.1.4 on debian with PHP5.6, using sqlite datbase.

When users change the special folders settings, they don't appear to be saved.  The pull-down menu lists all of the user's IMAP folders, and they can select one to assign as, e.g., Trash.  When we click Save, I have confirmed the new setting is saved to the users table in the database.  But when we log out and log back in, the folder selected for Trash will have reverted to the default.

I turned on sql debug, and I see the query which saves the new setting to the db (and verified the db contains the new setting).  After logout the new setting is still in place.  When the user logs in again, this query is issued:

Code: [Select]
[25-Feb-2016 17:06:44 -0700]: <fgu55b4q> [5] UPDATE "users" SET "preferences" = 'a:14:{s:10:"trash_mbox";s:5:"Trash";s:11:"drafts_mbox";s:6:"Drafts";s:9:"sent_mbox";s:4:"Sent";s:9:"junk_mbox";s:0:"";s:12:"preview_pane";b:0;s:17:"message_threading";a:2:s:15:"mail.AdvancedMD";b:0;s:5:"Trash";b:0;}s:17:"collapsed_folders";s:6:"&mail&";s:16:"message_sort_col";s:4:"date";s:18:"message_sort_order";s:4:"DESC";s:19:"attachment_reminder";b:1;s:11:"client_hash";s:32:"2499b5ed8649a02150a3fe5df72eb4f1";s:10:"dst_active";b:0;s:10:"prettydate";b:1;s:20:"default_imap_folders";a:5:{i:0;s:5:"INBOX";i:1;s:11:"mail/Drafts";i:2;s:9:"mail/Sent";i:3;s:9:"mail/Junk";i:4;s:10:"mail/Trash";}}', "language" = 'en_US' WHERE "user_id" = '1';

That reverts the trash_mbox setting to "Trash".

Any advice?  I am capable of debugging the code, but would appreciate a pointer toward the right module.

Thanks!

Mark

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,327
Re: Special Folders setting reverts
« Reply #1 on: February 26, 2016, 03:14:12 AM »
sound like your IMAP server is using the SPECIAL-USE extension. when a user logs in the IMAP server tells the client what the special folders are, this will override any configs in Roundcube.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline alec

  • Hero Member
  • *****
  • Posts: 1,165
Re: Special Folders setting reverts
« Reply #2 on: February 26, 2016, 03:17:45 AM »

Offline cheeks

  • Newbie
  • *
  • Posts: 6
Re: Special Folders setting reverts
« Reply #3 on: February 26, 2016, 07:11:51 PM »
Thank you both! The ticket was informative and I now understand what was happening.

I chose to have roundcube ignore the SPECIAL-USE capability, and my users are happy.

Thanks,

Mark

Offline sundial

  • Newbie
  • *
  • Posts: 1
Re: Special Folders setting reverts
« Reply #4 on: March 10, 2016, 04:45:51 AM »
More about this http://trac.roundcube.net/ticket/1490300
Regrettably, whoever is responsible for this feature in Roundcube, appear to have misunderstood RFC 6154 (https://tools.ietf.org/html/rfc6154).

RFC 6154 is pretty clear in that special-use mailboxes are advisory, not mandatory.

The work-around of disabling special-use support in Roundcube works, of course, but it's a work-around.

The proper fix is to have the user decide what they want.