In Roundcube Webmail, accidentally clicking on the Subject column header triggers an expensive mailbox-wide sort operation. On large mail folders with thousands of messages, sorting by subject can freeze the UI and create heavy server load. Here is how to disable sorting on the Subject column while keeping date and status sorting intact.
File:
program/steps/mail/func.inc • Target: Subject header click handler
Step-by-Step Fix
- Open
program/steps/mail/func.incin your text editor. - Search for
./#sort(typically around line 440–445). - Locate the
onclickattribute generation:'onclick' => 'return ' . JS_OBJECT_NAME . ".command('sort','" . $col . "',this)" - Replace it with a no-op handler for the subject column (or globally):
'onclick' => 'return true'
Save the file. Clicking the Subject column header will no longer initiate slow sorting queries.