Problem
Systems with an enabled MTA (mail transfer agent) service - postfix, sendmail, exim, or opensmtpd - upgraded from previous releases to Fedora 42 or later may wind up in a state where any update to the MTA package causes the service to be disabled.
Cause
This problem is related to the ‘alternatives’ system provided by the chkconfig package. MTA packages use the ‘alternatives’ system so that you can install whichever MTA you like and have it as the provider of commands like mailq and sendmail that have become generic over the years. This means we don’t have to make one MTA the “standard” for Fedora.
It seems that systems with an MTA installed which are upgraded to Fedora 42 or later may wind up in a state where the relevant configuration file (/var/lib/alternatives/mta) contains multiple entries for the same MTA. We don’t know yet exactly how this happens, but suspect it’s related to the sbin merge Change from Fedora 42. You can see if you are in this state by running alternatives --display mta | grep priority. If it shows multiple results for the same binary, you likely have the problem.
When the MTA packages are installed or updated, alternatives is run to update the current state. At that time, alternatives intends to run systemctl preset on the service for the “currently active” MTA, and systemctl disable on the services for all other MTAs. If there are multiple entries for the current MTA, it will run systemctl preset on the first entry, but systemctl disable on the subsequent entries, so the service winds up disabled.
Related Issues
Bugzilla report: #2363937
Workarounds
There are pending updates with a proposed fix for this: FEDORA-2025-aa88a0d00b for Fedora 43 and FEDORA-2025-bbaef37b87 for Fedora 42. These should reach updates-testing soon and you should then be able to install them. They make alternatives ignore duplicate entries in the configuration file, which should avoid the problem.
Otherwise, you can remove the duplicate entries from the configuration file by hand, but please back up the file first and be careful, the file is not intended for human editing and it’s easy to get it wrong. The first set of lines in the file, up to the first empty line, define the capability itself (mta in this case). After the empty line come the providers of it; there is no empty line between provider definitions.
Each provider definition starts with the main binary on its own line, then a priority value and a name on the next line, then the subsidiary files on following lines. The final line should be for the smtpd man page. So a typical entry for postfix starts like this:
/usr/bin/sendmail.postfix
60 postfix
/etc/pam.d/smtp.postfix
and ends like this:
/usr/share/man/man8/smtpd.postfix.8.gz
If you mess up editing the file you will break alternatives completely, so please do keep the backup handy!