Introduction
You may determine that it is necessary to restore the Dovecot configuration to the default configuration used in cPanel & WHM. Customizations to Dovecot are made utilizing the Dovecot "main.local" template file as outlined in our documentation.
Procedure
The file that contains these customizations is located here:
/var/cpanel/templates/dovecot2.3/main.local
Create a safe place to move the file to keep a backup in case you need it. You can do so with this command, for example:
mkdir /root/backupconfig/
You can utilize a different directory name or path if preferred.
Move the file to the new location to both back it up and disable the customizations. Utilizing the path in the example above:
mv /var/cpanel/templates/dovecot2.3/main.local /root/backupconfig/
With the customization moved, it is time to rebuild the Dovecot configuration using the default configurations. You can do so by running this command:
/scripts/builddovecotconf
Finally, to ensure that the running Dovecot service is utilizing the new configuration, restart the service. You can restart Dovecot with this command:
/scripts/restartsrv_dovecot