Symptoms
When attempting to use the "Free up email storage" tool inside the Manage section of the cPanel feature "Email Accounts", the error "A fatal error or timeout occurred while processing this directive." is reported. If you click the 'show' button it will display a message like the following.
Template::Exception:
[TYPE]=[undef]
[INFO]=[Mailboxes::get_mailbox_status_list(HASH(0x2dfce58)) failed: “/usr/bin/doveadm” reported error code “89” when it ended: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 78: ssl_cert: Can't open file /etc/dovecot/ssl/dovecot.crt: Permission denied
Description
In our version 94 release of the cPanel software, we upgraded Dovecot to version 2.3.11.3. Dovecot now stores SSL-related settings in the /etc/dovecot/ssl.conf file. To accommodate this change, the default template was updated to include this new section and configuration file. This error indicates that your Dovecot configuration is still set to read the old file location.
The update to v94 automatically disables any local templates that are correctly configured in order to accommodate this update and will then send a notification regarding this change. If you are not seeing the error and found this article due to these notifications, please see the article below instead.
Dovecot Local Configuration Template Errors
Workaround
If you are seeing this error, this indicates that the configuration file or template could not be updated normally for the new Dovecot 2.3 installation. In order to proceed, you will need to ensure that both files '/var/cpanel/templates/dovecot2.3/main.default' and '/etc/dovecot/dovecot.conf' can be rebuilt automatically by the cPanel software.
A common cause for these to not be changed automatically is the immutable trait being set on one or both files. This trait prevents the file from being modified in anyway. You can check for this trait by looking for an i character in the output of the below command.
lsattr /var/cpanel/templates/dovecot2.3/main.default /etc/dovecot/dovecot.conf
The expected output would be the following.
---------------- /var/cpanel/templates/dovecot2.3/main.default
---------------- /etc/dovecot/dovecot.conf
While immutable files would look like this.
----i--------e-- /var/cpanel/templates/dovecot2.3/main.default
----i--------e-- /etc/dovecot/dovecot.conf
You can remove the immutable trait with the following command.
chattr -i /var/cpanel/templates/dovecot2.3/main.default /etc/dovecot/dovecot.conf
Once this trait has been removed, you can automatically rebuild the template and configuration using the following command.
mv -v /var/cpanel/templates/dovecot2.3/main.default{,.broken.$( date +%Y%m%d )};mv -v /etc/dovecot/dovecot.conf{,.broken.$( date +%Y%m%d )}; /scripts/builddovecotconf
If you had any customizations, you will need to create an updated local template from this new default as outlined in the documentation Add Dovecot Settings before proceeding.
After verifying none of the above commands returned any errors and your desired customizations are in place, you will then need to restart the Dovecot service to apply the change. This can be done through the WHM interface or by running the following command.
/scripts/restartsrv_dovecot