Virtual server - change domain name - results in dovecot config problem

####### SYS INFO

Operating system Debian Linux 9 | Webmin version 1.881 | Usermin version 1.741 | Virtualmin version 6.03 | Dovecot IMAP/POP3 Server Version 2.2.27

####### ACTION

Virtualmin -> Server configuration - Change Domain Name | Change from example.com to example2.com

####### RESULT

Successful domain change of virtual server example.com to example2.com | Successful change of home directory and username/UID

####### ISSUE

Dovecot server keeps using old domain name for certificate paths in /etc/dovecot/dovecot.conf

local_name example.com {
  ssl_cert = </home/example.com/ssl.cert
  ssl_key = </home/example.com/ssl.key
  ssl_ca = </etc/letsencrypt/live/example.com-0009/chain.pem
}

example.com is not being changed to example2.com therefore dovecot stops hangs (process running, but not processing logins)

####### TEMPORARY SOLUTION

Config file has to be edited manually and paths fixed.

####### PROPOSED FIX

Add dovecot config "sed" for domain name after chaning virtual server domain name. | Add restart of dovecot service after config change.

Status: 
Active

Comments