Dovecot Configuration Template Errors

Operating System & Version
CentOS 7
cPanel & WHM Version
Latest

davorg

Well-Known Member
May 13, 2013
46
6
58
cPanel Access Level
Root Administrator
Today on 4 servers, every hour I get this notification:

Configuration file /var/cpanel/templates/dovecot/main.local is invalid: Expire plugin is still present in configuration file!

I diffed files:

diff -u main.default main.local.broken.1636375895.1Jbd6dZqUTLIQM8a
--- main.default 2021-03-11 01:40:54.597082859 +0000
+++ main.local.broken.1636375895.1Jbd6dZqUTLIQM8a 2021-11-08 12:51:35.148828689 +0000
@@ -1144,16 +1144,16 @@
##

passdb {
- driver = dict
- args = /usr/local/cpanel/etc/dovecot/cpauthd-dict.conf
+ driver = pam
+ args = [% IF allow_domainowner_mail_pass %]dovecot_imunify_domainowner[% ELSE %]dovecot_imunify[% END %]
result_internalfail = continue
result_failure = [% IF allow_domainowner_mail_pass %]continue[% ELSE %]return-fail[% END %]
}
[% IF allow_domainowner_mail_pass %]
passdb {
- driver = dict
+ driver = pam
skip = authenticated
- args = /usr/local/cpanel/etc/dovecot/cpauthd-dict-domain_owner_mail_pass.conf
+ args = [% IF allow_domainowner_mail_pass %]dovecot_imunify_domainowner[% ELSE %]dovecot_imunify[% END %]
result_internalfail = continue
result_failure = return-fail
}

how to get rid of this warning?
 

davorg

Well-Known Member
May 13, 2013
46
6
58
cPanel Access Level
Root Administrator
Hello! Upon investigation, it seems this issue can arise due to a variety of problems. If you are able to, could you open a support ticket using the link in my signature? If you can't, your web hosting provider should be able to. Provide me the ticket ID once done.
Ticket ID is 94381674.
 

volex

Member
PartnerNOC
Feb 5, 2008
20
10
53
cPanel Access Level
DataCenter Provider
This is Immunify360 error - Internal Record number DEF-14226 - for now it is resolved in Immunify360 5.4 Beta


I have disabled notification for this warning in cPanel Notification section.
Thanks for the update, seems to be a different issue here as I'm on Imunify 5.11 currently but will keep investigating.
 

Rectifier

Registered
Nov 11, 2021
3
1
3
Australia
cPanel Access Level
Root Administrator
While Imunify360's "Exim+Dovecot brute-force attack protection" is what is causing the alert every hour for the reporter in this thread (when it tries to modify the main.local to enable this feature), I don't think it's actually at fault here.

If you simply copy the main.default template to main.local and then run /scripts/builddovecotconf, you'll see the same error.

Bash:
[root@cpanel dovecot2.3]# pwd
/var/cpanel/templates/dovecot2.3
[root@cpanel dovecot2.3]# ls
main.default
main.default.outdated.2019-03-08T05:32:37Z.25393066
main.default.outdated.2019-07-31T01:53:17Z.03172302
main.default.outdated.2020-02-18T20:10:52Z.90333521
main.default.outdated.2020-10-01T23:04:47Z.09602690
main.default.outdated.2021-03-03T00:07:17Z.68279559
[root@cpanel dovecot2.3]# cp main.default main.local
[root@cpanel dovecot2.3]# ls
main.default
main.default.outdated.2019-03-08T05:32:37Z.25393066
main.default.outdated.2019-07-31T01:53:17Z.03172302
main.default.outdated.2020-02-18T20:10:52Z.90333521
main.default.outdated.2020-10-01T23:04:47Z.09602690
main.default.outdated.2021-03-03T00:07:17Z.68279559
main.local
[root@cpanel dovecot2.3]# /scripts/builddovecotconf
info [builddovecotconf] 'local' template in use (/var/cpanel/templates/dovecot/main.local)
info [builddovecotconf] Configuration file /var/cpanel/templates/dovecot/main.local is invalid: Expire plugin is still present in configuration file!
info [builddovecotconf] 'local' template in use (/var/cpanel/templates/dovecot/main.local)
The local template file '/var/cpanel/templates/dovecot/main.local' is invalid. The system will rename it to /var/cpanel/templates/dovecot/main.local.broken.1636664222.FiBNLjS8p1O19yCP.
[root@cpanel dovecot2.3]# ls
main.default
main.default.outdated.2019-03-08T05:32:37Z.25393066
main.default.outdated.2019-07-31T01:53:17Z.03172302
main.default.outdated.2020-02-18T20:10:52Z.90333521
main.default.outdated.2020-10-01T23:04:47Z.09602690
main.default.outdated.2021-03-03T00:07:17Z.68279559
main.local.broken.1636664222.FiBNLjS8p1O19yCP
If you diff those two files, they are identical (as they should be).
 

Rectifier

Registered
Nov 11, 2021
3
1
3
Australia
cPanel Access Level
Root Administrator
The ticket is resolved now. The main.default template was not updated during the update to cPanel 100.

Support replaced the default template with one from source and the builddovecotconf script working fine for me now. Imunify360's "Exim+Dovecot brute-force attack protection" is now also able to be turned on without triggering that alert every hour.
 
  • Like
Reactions: volex