Message Threading for RoundCube Webmail

RoundCube WebMail Message Threading

Threading support has now been added to the Roundcube SVN. See: http://trac.roundcube.net/browser/branches/devel-threads/THREADS for the current status and this post for the original announcement by ALEC.

Current version (2009/09/23):
Christopher January, Vladislav Bogdanov and Nathan Kinkade
Patch against SVN r2976: roundcubemail-thread-20090923.patch
New files: skins/default/images/icons
Snapshot (SVN r2976): roundcubemail-trunk-r2976-thead-20090923.tar.bz2
For a list of changes since the last release see Vladislav’s post to the roundcube-dev mailing list.

Previous version (2009/07/06):
Patch against SVN: roundcubemail-threading-20090706.patch
Snapshot (SVN 2009-07-06): roundcubemail-threading-20090706.tar.bz2

Previous version (2009/06/16):
Patch against 0.2.2: roundcubemail-0.2.2-threading-20090616.patch
Patch against SVN: roundcubemail-threading-20090616.patch
Snapshot (SVN 2009-06-16): roundcubemail-threading-20090616.tar.bz2

Previous version (2009/03/17):
Patch: roundcubemail-threading-20090317-1.patch
Path from 2009/02/25 snapshot: roundcubemail-threading-20090225-6-20090317-1.patch
Snapshot: roundcubemail-threading-20090317-1.tar.bz2

Previous version (2009/02/25):
Patch: roundcubemail-threading-20090225-6.patch
Snapshot: roundcubemail-threading-20090225-6.tar.bz2

Older individual patches can be found at the end of the page. I haven’t had time to update these yet.

CHANGELOG
2009/02/23 (Chris January )
----------

- Add support for IMAP THREADS command
- Threaded message view with expandos.
- Add option to enable message threading.

Done:

  • Send IMAP THREADS command and parse response.
  • Sort thread tree.
  • Threaded message view with message indentation and expandos.
  • Page by threads, not messages.
  • Client-side expand/collapse of threads.
  • Thread expansion persists across changing pages, checking for new messages, etc.
  • Cache thread tree.
  • Make check for recent work with threads.
  • Turn message threading on and off per mailbox.
  • Integrated with message cache.
  • New icon for read root messages with unread children.
  • Make sort by date use the date of the most recent message in the thread (use Dovecot, set imap_thread_algorithm in config/main.inc.php to X-REFERENCES2 and click the Date column until the sort order arrow disappears). With thanks to Nathan Kinkade.
  • Make default expansion configurable. With thanks to Nathan Kinkade and Vladislav Bogdanov

To do:

  • Make thread expansion persist on the server (in the database)???

Older individual patches (23/2/2009)

mail.css.patch
Adds CSS styles for the message list expandos.
js.patch
Depends on: mail.css.patch
Client-side JavaScript to support message threading.
imap.inc.patch
Add support for IMAP THREADS command.
settings.patch
Add option to enable message threading.
mysql.initial.sql.patch
Add threads table to the MySQL database for caching threads.
localization.patch
Strings to support message threading (en_US and en_GB).
func.inc.patch
Depends on: js.patch
Add support for sending thread information with message lists (rcmail_message_list and rcmail_js_message_list).
rcube_imap.php.patch
Depends on imap.inc.patch, settings.patch, mysql.initial.sql.patch, localization.patch
Adds threading support to rcube_imap::_list_headers.
messagecount.patch
Depends on rcube_imap.php.patch
Changes message count to thread count when message threading is enabled.
check_recent.inc.patch
Depends on rcube_imap.php.patch
Updates the check-recent action to support threads.

21 Responses to “Message Threading for RoundCube Webmail”

  1. Nice project! I have been waiting for this function for a long time. I would like to wish you much succes on this enterprise :) !

  2. Hi, thanks a lot for your work on Roundcube, this feature is really useful.

    You have
    “Mark collapsed threads as unread if any child messages are unread.”
    on your To do list. I think it would be even better if you could tell the difference between an unread top-level message and a collapsed thread that has an unread mail in it – just like it is in Thunderbird: bold vs. underlined.

    Patrick.

  3. Good stuff! :) I saw you are exchanging ideas with Alec on the mailing list. Keep it up, and I’m pretty sure this could make it into core soon.

    Thanks for your hard work!

    Till

  4. is a nice feature,
    Thx for your work !!!

  5. Nice work! If the IMAP protocol allows that, it would be nice to be able to choose between tree view, like in the screenshot above, where you have to click on each email separately, and flat conversation view, where all emails are displayed together and sorted by date, like in gmail.

  6. I have found a little Bug when i move a Message from a folder to another (drag’n drop) the little moving box is empty original is in the moving box the selected message subject. Plz fix this

  7. Hi, I downloaded the latest patch (roundcubemail-threading-20090317-1.patch) to use with roundcube 0.2.1.

    The patch choked on program/steps/mail/check_recent.inc. I couldn’t really understand why, but that wasn’t such a big deal to edit according to the patch.

    Now, I see the “threaded” option in the Folders settings, but there is no save button on this page. Has anyone else had this problem?

  8. The patch is designed to apply against the trunk of the same date (i.e. 17/3/2009). It hasn’t been tested againast 0.2.1.

  9. Will this feature be integrated in the mainstream version of Roundcube at a short term?

  10. Can you port this to current svn ?
    Changeset 2629 breaks the threading.

    In the changeset 2629 is the function _list_header completly rewritten.

  11. many thanks chris ;) now works fine,
    my own port to 99 percent the same with yours are my port has a problem with message sorting offer more then one pages and now with your help and your patch i have found the solution.

    Thanks again great work !!!

  12. [...] can selected. and after reload all is ok I have patched RC with the threading hack from Chris atomice.com Message Threading for RoundCube Webmail and i think the problem can related to this. Can anyone help. __________________ My RoundCube [...]

  13. Hi Chris i think Changeset 2734 of RC is breaking from threading and after deleting messages some messages showing twice. See http://www.roundcubeforum.net/pending-issues/4648-same-new-messages-recognized-every-check-recent-messages.html#post20519 I hope you can help with this

  14. hi Chris again,
    i have now testet your Snapshot (SVN 2009-07-06) and the problem with duplicatet messages after deleting messages when more messages in inbox as showing on one page is still present with your aktuall snapshot.

    Details to reproduce this i show inbox with preview pane and my inbox has ~ 500 or more messages and i display 50 messages per page when i mark 10 or more messages with shift+page up/down and delete this next messages loads in to messagelist and now i mark also more then 10 messages with shift and delete … i make this two or three times and then come the problem thats messages in messagelist more then one showing and i can only one message of the duplicates selecting. The Problem comes are Sporadical most after second or third reloading messages into messagelist. The Problem is not in the RC 0.3 release i have testet the RC Trunk from Roundcube this problem comes from the slice or count in the rcube_imap.php and move_del.inc

    i have invest some hours in this bug and i can’t find a solution for this. Please Help many thanks !!!!

  15. I finally got around to setting this up on my roundcube server.. PERFECT. thanks ! :)

    One minor feature request – capture left/right cursor keys (in js I guess?) to expand/collapse threads would be awesome.

  16. I’ve tested
    Snapshot (SVN 2009-07-06): roundcubemail-threading 20090706.tar.bz2

    and unfortunately, I can’t make it work.

    I’m using dovecot, and it has got THREAD=REFS THREAD=REFERENCES capabilities.

    Nothing in logs or console, would you where I can have a look ? Is there any php or imap configuration to activate or change ?

    Thanks a lot for your amazing work, I’m really looking forward using threads in RC :)

  17. Hi,

    I tried the latest patch 20090923 against with the 0.3 Debian version, resolved 2 failed hunks and rebuilt the package. I don’t see any threads in the mail listing. I use sqlite. Do I need to use mysql?

  18. If you don’t use mysql you may need to copy the changes from SQL/mysql.initial.sql to SQL/sqlite.initial.sql.
    You also need to enable message threading on a per-folder basis in the Folder settings.

  19. I use the svn 0.2.2 roundcubemail-threading-20090616.tar.bz2 archive you posted.
    What do I need to do to upgrade to 0.3.1 and keep threads ?

  20. Very nice. I’ve just crossed my fingers and installed the devel-threads branch into my 0.3.1 install of RoundCube; everything appears to be working great so far.

    For other readers: (i.e., Eric above):

    I first backed up my RoundCube directory. I would have also backed up my MySQL RoundCube db, but after reviewing some of the code changes, judged it to not be necessary. That was foolish on my part; in this case it worked, but backing up would have been smarter.

    If you’re running 0.2.something, then follow the upgrade steps to a stock 0.3.1 install.

    Once you’re on 0.3.1: svn checkout https://svn.roundcube.net/branches/devel-threads/

    Copy the contents of the bin, program, and skins/default directories into your RoundCube install directory.

    Enjoy. So far the plugins I’ve activated seem to be working fine, and everything’s happy.

    YMMV of course.

  21. Threads now in RC svn trunk :)

Leave a Comment