After migrating from Debian 11 to Debian 12 (as described in the manual, with creating and restoring backups), I faced connection problems with different mail clients. Some were able to receive mail, but could not send, with others it was the other way round (send, but not receive).
Looking at netstat -tulpn I found out that Dovecot was only listening on IPv6, and Postfix only on IPv4!
The virtual Websites are working fine on both v4 and v6, in the Virtualmin Configuration/Network Settings both is set correctly, and I already tried to “Re-Check Configuration” and also did “Re-Run Install Wizard”, but nothing changed.
So, I started with Dovecot:
If I look at the Networking Configuration of Dovecot in Webmin, for the SSL and non-SSL Interfaces it says “All IPv4 and IPv6”, which results in “listen = [::]” in the dovecot.conf. Setting it by hand to “listen = *, ::” would make it listen properly on v4 and v6, so the settings from the config file and the configuration through Webmin somehow do not fit together…
Next with Postfix:
Looking at main.cf, there is no inet_interfaces set, which should mean that it defaults to “all” and should bind to v4 and v6 interfaces…
In the master.cf, I see a lot of lines with some ipv4:smtps …, and most of them are pretty outdated, e.g. pointing to SSL Certificates of old virtual domains that do not exist anymore!
Is there a way to somehow completely rebuild/refresh all those config files? It seems to me that Virtualmin does not touch them anymore…
I did recently an upgrade 11 to 12 in the test environment and I did not face this issue. In my case, IPv6 was disabled and it remained so after the upgrade. There were no changes in the configuration files.
When you upgraded from one version to another and it asked you if you were changing the existing configurations, did you accept?
I did not do an "live-"upgrade, but I set up a new system, and then restored the Virtualmin-Backup from the old system, as described here: Migrating To a New Server – Virtualmin
it is natural what happened. You installed Debian 12 on a new server, then you came up with the configuration from another server where Debian 11 was installed. It would have been preferable to make the upgrade from Debian 11 to 12. I did testing and there were no issues except with a few services, the configuration remained the same.
You can try yourself, make a backup of Debian 11 machine, you take it to a test environment, then you upgrade the version being careful to modify all the repositories accordingly, Virtualmin is essential. You will find that during the upgrade you will be asked if you keep the existing configurations and approve.
Ok, besides of Debian not being a rolling release, which makes me uncomfortable to “upgrade” it release after release, maybe I will try this…
But still:
The config files, as they are now, came with the backup. They have entries for virtual servers that do not even exist anymore.
When exactly are those files touched/updated/rebuilt by Virtualmin? At the moment, it seems like Virtualmin does not change them at all… Can I somehow purge them and have them created properly again?