Server deletion not properly cleaning dovecot config file.

Hi, when deleting a virtual server in Virtualmin Pro, the dovecot ended up broken, users unable to fetch their mails. Mail client spouting errors about "protocol unsupported" or "connexion reset".

Those messages showed up in logs :

dovecot: config: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 348: ssl_cert: Can't open file /home/<xxx>/ssl.cert: No such file or directory
dovecot: master: Error: service(config): command startup failed, throttling for 60 secs
dovecot: pop3-login: Fatal: Error reading configuration: read(/var/run/dovecot/config) failed: Connection reset by peer

The lines pertaining to the deleted virtual host were still in dovecot config file while all data, including the cert, were of course deleted. So it failed to start and the whole mail service was down. Manually deleting the leftover lines solved the issue and dovecot is humming happily.

Quite critical issue.

Status: 
Fixed (pending)

Comments

Thanks for pointing this out - this will be fixed in the next Virtualmin release.

Status: Fixed ยป Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Dovecot fail still occurring for me. Webmin 1.932 Virtualmin 6.08 Centos 7

gscerb, thanks for letting us know -- could you open up a new support request on that issue though?

There, let us know what error or issue you're seeing specifically, including the full error that you're seeing -- then Jamie will be able to look into the exact cause an issue a fix for that. Thanks!

A few people have reported this issue with Dovecot, but I've yet to re-produce it reliably.

Does it happen every time you delete a domain?

Same happened to me. Using the latest version webmin 1.942

I had to manually delete lines from /etc/dovect/dovecot.conf

local_name deleted-domain.ltd { ssl_cert = </home/deleted-domain/ssl.cert ssl_key = </home/deleted-domain/ssl.key ssl_ca = </home/deleted-domain/ssl.ca }

It happens to me when deleting a disabled virtual server.

We did find the cause of this eventually, and it will be fixed in the 6.09 and later releases.

I've just deleted a virtual server and dovecot refused to start because of left over in the dovecot.conf file. Running Virtualmin 6.09 Pro. Should it be fixed in this version or only in 6.10?

I deleted another domain yesterday, today I got this:

Cron <root@server161> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

/etc/cron.daily/logrotate:
error: stat of /var/log/virtualmin/murraysvacationrentals.com_access_log failed: No such file or directory
error: stat of /var/log/virtualmin/murraysvacationrentals.com_error_log failed: No such file or directory
run-parts: /etc/cron.daily/logrotate exited with return code 1

I hope you can resolve this, eventually.

Ilia's picture
Submitted by Ilia on Sat, 05/30/2020 - 05:59

I've just deleted a virtual server and dovecot refused to start because of left over in the dovecot.conf file. Running Virtualmin 6.09 Pro. Should it be fixed in this version or only in 6.10?

What Virtualmin package version are you running exactly? What is the output of the following command:

yum list |grep virtual-server |grep 6\.0
dovecot refused to start because of left over in the dovecot.conf file.

What was the leftover exactly?

What Virtualmin package version are you running exactly? What is the output of the following command:

wbm-virtual-server.noarch 3:6.09-3 @virtualmin-universal

What was the leftover exactly?
local_name exampledomain.com {
ssl_cert = </home/exampledomain/ssl.cert
ssl_key = </home/exampledomain/ssl.key
}
local_name www.exampledomain.com {
ssl_cert = </home/exampledomain/ssl.cert
ssl_key = </home/exampledomain/ssl.key
}
local_name mail.exampledomain.com {
ssl_cert = </home/exampledomain/ssl.cert
ssl_key = </home/exampledomain/ssl.key
}

It will be fixed in 6.10