Symptoms
-
/scripts/builddovecotconfreports the local template is invalid and renames it tomain.local.broken.<timestamp>:Expire plugin is still present in configuration file!-
Missing dovecot_config_version in configuration file!(Dovecot 2.4)
- This happens after copying
main.defaulttomain.localand following How do I enable the Dovecot mail_log plugin? or the rawlog steps. - Re-copying
main.defaulttomain.localrebuilds without errors, but the plugin is not enabled.
Cause
The /var/cpanel/templates/dovecot/main.default file is outdated. A previously broken main.local prevented main.default from being updated, and the old file still contains mail_plugins = $mail_plugins expire. Any main.local copied from it is rejected as invalid.
On Dovecot 2.4, /var/cpanel/templates/dovecot is a symlink to /var/cpanel/templates/dovecot2.3/. This is expected. The main.default file in both paths is the same file, and it is the template Dovecot 2.4 uses.
You can confirm the cause by checking the broken file or the current default for the expire plugin:
# grep expire /var/cpanel/templates/dovecot/main.default | grep plug
grep expire /var/cpanel/templates/dovecot/main.local.broken.* | grep plug
Resolution
- Log in to the server as the
rootuser via SSH or WHM / Home / Server Configuration / Terminal. -
Back up the current default template:
# cp -Rav /var/cpanel/templates/dovecot/main.default{,.backup.old}
-
Restore the current default template shipped with cPanel & WHM:
# cp -ax /usr/local/cpanel/src/templates/dovecot/main.default /var/cpanel/templates/dovecot/
-
Move aside any existing local template:
# mv -v /var/cpanel/templates/dovecot/main.local{,.old}
-
Create a new local template from the restored default:
# cp -v /var/cpanel/templates/dovecot/main.{default,local}
- Apply your settings. To enable the mail_log plugin, follow the steps in How do I enable the Dovecot mail_log plugin?. For rawlog, add
rawlog_dir = %h/rawlogunderprotocol imap {, create arawlogdirectory in the mailbox home directory, and set its owner to the cPanel account user. -
Rebuild the Dovecot configuration. The output should show only the
'local' template in usemessage:# /scripts/builddovecotconf
-
Restart Dovecot:
# /scripts/restartsrv_dovecot
Note: On cPanel 110, this still used Dovecot 2.3 servers; if rawlog files still do not appear, copy main.local to /var/cpanel/templates/dovecot2.2/, then rebuild and restart Dovecot.
Comments
0 comments
Please sign in to leave a comment.