Webclient uses individual databases or a single database to display the mail listings. Mail headers are written to the database and read by webclient to build the list.
There are times where the cache is not updated or out of sync. The symptoms are webclient can appear to have missing mail or display mail that has no content.
The following steps are to manually refresh the cache.
## Reset the WebCache:
Go to GroupWare > WebClient > DB settings, see if its set to SQLite or a DB server.
A - If its SQLite, browse to the accounts mailbox then rename the ~webmail\cache.db file.
B - If it's a DB server do the following:
When a centralized database is used there are not individual databases for every user, there is only one database which keeps the records for all users and the administrator should delete the records from this database.
First the administrator should connect to the database with some SQL manager. It is possible to use the manager distributed with the database or use IceWarp SQL Manager instead (in console System ~ Tools ~ SQL manager).
Next step is selecting the Webclient database. Locate the database under GroupWare > WebClient > General > DB Settings. Note the database information. For IceWarp SQL Manager the administrator should click on “Database” and input the information for connecting the database.
It is very important to delete the information of the user from the table ITEM first!
This query must be fully executed without errors before executing the next query. Otherwise some data may remain in the database and it may cause problems afterwards.
Administrator can perform the query again if it fails for some reason. When the query is executed without problems and 0 rows are affected, the administrator can be sure that no items for the account are longer cached in the database. In that case proceed to the second query.
1 query: deleting from “Items” table:
DELETE i FROM item AS i INNER JOIN folder on i.folder_id = folder.folder_id
WHERE folder.account_id = 'email@example.com'
2 query: deleting from “folder” Table
DELETE FROM folder WHERE folder.account_id = 'firstname.lastname@example.org'
## Reset the directory cache:
Go to System > Tools > SQL manager then select the directory cache DB.
Run the following queries where the username is the account name in question.
SELECT * FROM DirectoryCache WHERE search_path like '%username%'
If the output is correct, turn it into a delete and remove the asterisk (*):
DELETE FROM DirectoryCache WHERE search_path like '%username%'
Once completed, go under the account settings and refresh the cache.
You might find that in the variable %username%, it will return records for other domains with the same usernames. So you can modify it such as %domainname.com/username/%
SELECT * FROM DirectoryCache WHERE search_path like '%example.com\username%'
DELETE FROM DirectoryCache WHERE search_path like '%example.com\username%'
SELECT * FROM DirectoryCache WHERE search_path like '%example.com/username%'
DELETE FROM DirectoryCache WHERE search_path like '%example.com/username%'
NOTE: Some instances are stubborn to refresh, in that case, try to do this when the user is not logged in.
For the more stubborn ones, even try to do a restart of services just to be sure to clear any current threads. You want to ensure no data is being added back until after all the queries are run.