Maintenance scripts

Maintenance scripts

Before running maintenance scripts, it is very important that you back up the database. The scripts may make large moditfications to the database.

To run a script, copy the content, place it in a file with the extension .vbs. After this, double click on the file in the Windows Explorer to run the script.

The scripts will automatically stop hMailServer before the maintenance operation and start it again afterwards.

Reset folder UIDs

This script goes through all IMAP folders and updates the current UID's assigned with them. Only run this script if you have problems with new messages not showing up until a service restart.

Before you can use this script, you need to replace <password> with your Administrator password. After the script has completed, a message box with the text Done will be shown.

   Dim obApp
   Set obApp = CreateObject("hMailServer.Application")
   
   Call obApp.Authenticate("Administrator", "<password>")
   Call obApp.Stop()
   Call obApp.Utilities.PerformMaintenance(1)
   Call obApp.Start()

   MsgBox "Done"


 

Search documentation