Fix/rebuild email indexing

ohjohnsen

Member
Nov 19, 2017
6
0
1
Norway
cPanel Access Level
Website Owner
I'm renting a webhotel from a Norwegian host, who uses cPanel version 84.0.21. And a couple of days ago I moved my family's email accounts from GSuite accounts to email accounts in cPanel. After searching here and there I ended up using MS Outlook, by adding both GSuite and cPanel accounts and copying emails from one to the other. Immediately the emails were available in Roundcube and on my phone. But I see now that the index has become corrupted. The order of the emails are completely jumbled, suddenly jumping a couple of years back in time. But the emails are all there, just in the wrong order.

Now, I'm a programmer and not a webhotel administrator. But I've searched a bit and found references to Dovecot index files needing to be rebuilt. Several pages are referring to a remove_dovecot_index_files that I don't seem to have available. Other pages are suggesting just deleting the dovecot files, saying that the files will be regenerated at next login. I've tested deleting the files for my own account's Archive folder, which I found here: ~/mail/domain.no/user/mailboxes/Archive/dbox-Mails.
* dovecot.index
* dovecot.index.backup
* dovecot.index.cache
* dovecot.index.index.log
* dovecot.index.index.log.2

But the only file that gets rebuilt is the dovecot.index.log file. And in both Roundcube and cPanel email management the emails are supposedly gone. The disk usage drops from some GB to some MB, even though the files listed above just totals around 34MB (dovecot.index.cache being the largest at 31MB).

Any ideas here? I tried contacting my host for help, but they said they couldn't do anything about this.
 

ohjohnsen

Member
Nov 19, 2017
6
0
1
Norway
cPanel Access Level
Website Owner
On a side note, I see that a migration done around 5 years ago has not gone as it should either. According to the listing in Roundcube, the earliest emails I have are from 2015, but when opening an email at random I see it's from much earlier (2010, 2011, 2012 etc). Any chance to fix this as well?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,274
1,285
313
Houston
So that script is there and it would definitely be the way to resolve this but it wouldn't be available to you as a website owner. Your hosting provider would need to investigate why the index files are becoming corrupted as that's an issue and potentially run that script as they'd have root access to do so I realize they told you they can't do anything about this but there's no way you'd be able to without root access to the system. If they're unsure how to resolve this they're more than welcome to open a ticket with us but it'd need to be from them as they would be able to provide the necessary access.