Are you really talking about just Webmin? (And not Virtualmin?)
There is no default configuration with Webmin. Webmin manages whatever configuration file it finds in the configured location.
Please read all of what I’m about to say before doing anything, because I’m about to say some things that if you go off half-cocked, you could break things much more dramatically than currently.
If it’s a Virtualmin configuration, it is modified slightly during installation of Virtualmin. The changes Virtualmin makes can be found here: Virtualmin-Config/lib/Virtualmin/Config/Plugin/Postfix.pm at master · virtualmin/Virtualmin-Config · GitHub
Or, from a freshly installed Postfix package you could run virtualmin config-system -i Postfix
But, you should not freshly install Postfix, because that would blow away your virtual
maps and any other maps that have been setup since you installed. On a production system, your first instinct should never be “let’s reinstall this”, because on a production system, you probably have a bunch of custom configuration that will not be reproduced by performing the Virtualmin initial configuration.
It depends on what you changed and where as to what file(s) need “fixing”, but you certainly don’t want to blow away virtual
and any other maps that are in use (which maps are used depends on your configuration, if you’re using sender dependent relays or something else, you may have several things that are not going to be found in a fresh install+Virtualmin configuration stage).
So, if you must reinstall, the right way to do it on an RPM-based OS (this will be different on a deb-based OS) is:
- Find out what’s been modified from the original Postfix installation.
rpm -V postfix
- Move all the modified files out of the way (it will be at least four files, maybe more, depending on your own customizations).
- Use
dnf reinstall postfix
to put it back in place. Do not uninstall it!
- Use
virtualmin config-system -i Postfix
- Use
virtualmin config-system -i SASL
Copy back any map files (this is at least virtual
, but may be others). Compare main.cf
and master.cf
to see if there’s any other configuration you want to keep from the old. Obviously don’t copy whatever was broken before.
“Reinstall” should be a word that strikes fear into your heart on a production system, and is a last resort if you can’t selectively restore a backup from before the problem started. Merely getting a default Virtualmin configuration probably will cause new problems.