In some cases, certain email accounts may not be able to search within their own emails. When attempting to search your emails, you may encounter the error:
Server Error (OK)
If you encounter the error above when certain email users are searching their inbox, it usually means that the email account's dovecot.index files are corrupted. Luckily, it is possible to rebuild these files the next time the email account logs in.
There is a built-in cPanel script to remove and rebuild the dovecot index files, which is further documented, here. To proceed, please run this command as 'root' on the server's command line or terminal:
Please note: you must replace "username" with the username of the cPanel account that manages the email account that is facing this error.
/usr/local/cpanel/scripts/remove_dovecot_index_files --user username
Once the above command is run, sign in to the email account to rebuild the index files and attempt to search.
If the above does not resolve the issue, there is another similar error that must be resolved by moving and rebuilding the user SQLite database: