When you search for an email in Roundcube (cPanel) and it doesn't appear in the results even though it exists in your mailbox, the problem almost always stems from the server not having properly indexed the messages. For example, if you try to locate an email with the subject "Invoice" and can't find it in the search, but when checking manually it is indeed in the inbox, it means the email indexes are corrupted or incomplete.
The main cause is corrupted or outdated FTS (Full Text Search) indexes in Dovecot's search engine. This can occur due to:
- Service interruptions during indexing
- Permission issues with system files
- High processing load during indexing processes
Step-by-step solution
Step 1: Access the server via SSH
Connect to the server as root user:
ssh root@your-server.com
Step 2: Run reindexing commands
For a specific account with few folders, execute:
# Rescan FTS indexes
doveadm fts rescan -u user@example.com
# Reindex inbox
doveadm index -u user@example.com -q INBOX
# Reindex sent mail
doveadm index -u user@example.com Sent
For accounts with multiple folders
If the account has many custom folders, use this command to index everything:
# Index ALL folders at once
doveadm index -u user@example.com -q "*"
What does each command do?
- doveadm fts rescan: Marks all emails for reindexing
- doveadm index -q INBOX: Rebuilds inbox index
- doveadm index Sent: Rebuilds sent mail index
- doveadm index -q "*": Indexes all folders automatically
To confirm the solution worked:
- Access the webmail of the affected account
- Perform a search for a term you know exists
- Verify that all expected results appear
- Test searches in different folders
Need additional help? Contact our technical support team for personalized assistance with your server.