I recently deleted a few thousand emails to speed things up in Emclient (POP3). But I believe my backup directory has not changed in size, and it still takes several minutes to refresh and for new messages to download. Is there a utility or something I can run to optimize the database to speed things up?
See this thread below.
Note: - Before running the database utility in the link above, backup eM Client via “Menu / Backup” incase you need to restore for any reason. You can see when the backup is complete via show operations in the dropdown next to refresh.
Also close eM Client before running the utility.
I have tried clicking on the link in the thread that you mentioned, to download the executable repair utility. Nothing is happening, and I get a small 7K file downloaded which does nothing. Is there a better link to download this utility?
The utility is meant for older versions of eM Client.
In more recent versions, do the following:
Close eM Client and open a Windows Command Prompt. Not a powershell, but a command prompt.
Paste in this command including the leading "
"C:\Program Files (x86)\eM Client\MailClient.exe" /dbrepair /rebuildall
When that is done, restart eM Client.
This doesn’t work for me. When I enter the command and press return, emclient starts up, saying it didn’t shut down properly, checking for corrupted database, etc. When the checks are finished and emclient opens, I do another backup but the backup is the same size as before.
I’ve repeated the process twice, with the same result.
I realise this thread is fairly old, so maybe there’s a different way now? Thanks.
Ed, I was also trying to figure out how to compress my main database after removing a lot of emails and followed the same instructions from Gary, above. I also saw the eM Client window reporting that it had not shut down properly and checking for a corrupted database. I think this is the intended process that the command line instruction runs. In my case, the eM Client folder increased in size once the utility had completed (!) On closer inspection, I noted that the database check had created backup files of every database file in the folder (filename extension .dat-bak) at the top level and in every sub-folder containing a database. After checking that I could still open eM Client and that all my emails appeared to be present, I moved all of these backup files out of their respective folders and will delete them altogether in a week or so, if no problems are discovered. Removal of the backup files (copies of the database before the databases were rebuilt and compressed) reduced the size of my eM Client folder to the size expected.
In summary, the process proposed by Gary worked for me and triggered the database check/rebuild that you described, but produces backup files in the same folders as the original files. You need to remove these (search for all .dat-bak files in the eM Client folder) in order for your folder size to decrease. I was running this on v10, so the process is still valid.
Which eM Client folder, there are many in the \AppData\Roaming\eMClient tree.
And is there an option to back up without continously creating these .bak files which are huge?
SO… I had a back up directory size of about 26GB. Last month, I deleted more than 50% of the emails in my INBOX, and I now have about 25,000 emails remaining. I then did another back up, deleted the excess .dat-bak files, and yet another back up after that. I am still at a back up size of 26GB.
Why would this be?
I also deleted a lot of mails, emptied all trashes an run the command
MailClient.exe /dbrepair /rebuildall
After deleting the bak-files the required space in the folder(s) of eM Client went down as expected.
The backup-file reflects more or less the space I use on the mailserver itself for my mails.
Doesn’t that “script” also create “duplicate” temp/backup files and they need to be deleted as well?
Since nobody responded, I will edit my post to include this bat file I created to remove the bak files. Substitute UserName with your Windows profile name:
@echo off
taskkill /IM MailClient.exe /F
echo Deleting .dat-bak files from eM Client database folder…
del /s /q “C:\Users\UserName\AppData\Roaming\eM Client*.dat-bak”
echo Cleanup complete.
pause
How would I do this on macOS?
How would I do this on macOS?
I presume this would be the Mac equivalent by “first closing eM Client” and then “opening the Terminal app via either Launchpad or Utilities” on the Mac. Then Paste and run the following command. /Applications/eM\ Client.app/Contents/MacOS/eM\ Client /dbrepair /rebuildall
Yes you will get .bak files afterwards as @ll7977 advised but you just delete those later.
What is considered “Older Versions” of EMclient ??? I am using 8.2
I checked that folder manually, and it shows NO .dat-bak file. However, there is a HUGE 35GB file named mail_data.dat. That would NOT be reduced using the script above. For years I’ve been playing with this. Any additional clues would be appreciated.
My BACK UP directory size has grown to about 31GB. Last month, I deleted more than 50% of the emails in my INBOX, and I now have significantly les emails remaining. I emptied the trash, and I then performed the rebuild command utility. I then did another back up, deleted the excess .dat-bak files, and yet another back up after that. I am still at a back up size of 31GB. Why would this be?
For a few years, I’ve been working on this ongoing problem of trying to free up the bloated space in the mail_data.dat file. We’ve all seen it… The incoming mail folder gets cleaned up with thousands of emails deleted,. Yet the mail data folder does not reduce in size. I have tried the rebuild command and that does not work. I have tried restoring from a backup and that does not work. I delete the *.bak files and no change.
I realize this version (8.2.17) is no longer being supported. However, has anybody tried simply deleting the mail data folder, opening email client, and simply rebuilding the inbox (as well as archive folders) by importing from a folder of exported individual emails that was created prior to deleting that mail_data file? I would think that that would force the mail_data folder to rebuild itself in a lean and efficient way without all of the bloated spaces taking up tens of gigabytes of space.
I’d love to here if anyone has any thoughts as to whether this might work.
For a few years, I’ve been working on this ongoing problem of trying to free up the bloated space in the mail_data.dat file. We’ve all seen it… The incoming mail folder gets cleaned up with thousands of emails deleted,. Yet the mail data folder does not reduce in size. I have tried the rebuild command and that does not work. I have tried restoring from a backup and that does not work. I delete the *.bak files and no change
However, has anybody tried simply deleting the mail data folder
I would not recommend you delete anything inside the hidden database folder if that’s what you were thinking to do, as you could risk loosing everything.
I’d suggest to “create a whole new database” and start new to see if that fixes the database size problem.
So if you haven’t already tried, “create a folder on the desktop” and export any pop, archive or local folder mail etc you need “if you have those” to that desktop folder via “Menu / File / Export”.
Then “close eM Client” and then “go to the hidden database folder” below and “rename your current database” to eg: eM Client-Old .
Hidden database folder
(Windows)
C:\Users\username\AppData\Roaming\eM Client
(Mac)
/Users/username/Library/Application Support/eM Client
Then reopen eM Client and setup as new, and then once setup and working, “import any exported pop, archive and local folder mail etc” from your desktop folder via “Menu / File / Import”. Then see what the database size is then once everything is fully synced / cached locally.
Yes it might take a bit of time to resync everything again, but it might be the only way to see if your current database is the problem.
Apart from a new database, suggest you maybe think about upgrading to the latest V10 or even try the new V11 Beta which also has a lot of new options and is free to try atm untill it’s released.
Alternatively you could contact official support via the logging a ticket on the VIP support page.
Thank you. Yes, of course I would not delete my original mail database permanently. I simply meant I would move it aside and force emclient to start a new inbox which I would then import previously stored emails to create a new mail database moving forward.
I will try that, and I will also explore the newer versions.