Bug 2371119 - /usr/bin/sendmail symlink missing after dnf system upgrade from f40
Summary: /usr/bin/sendmail symlink missing after dnf system upgrade from f40
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: postfix
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-09 11:47 UTC by Georg Sauthoff
Modified: 2025-08-04 20:36 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Georg Sauthoff 2025-06-09 11:47:10 UTC
I've upgraded my Fedora 40 systems to Fedora 42 using DNF system-upgrade.
Postfix was installed before the upgrade and working fine.
After the upgrade the symlink /usr/bin/sendmail is missing and programs like maildrop complain about /usr/bin/sendmail not being available.

Reproducible: Always

Steps to Reproduce:
1. install fedora f40 and install postfix
2. `dnf system-upgrade ...` to f42
3. ls -l /usr/bin/sendmail
Actual Results:
ls: cannot access '/usr/bin/sendmail': No such file or directory

Expected Results:
lrwxrwxrwx. 1 root root 30 2025-06-09 00:20 /usr/bin/sendmail -> /etc/alternatives/mta-sendmail

Additional Information:
Involved package versions:

rpm -q alternatives postfix
alternatives-1.33-1.fc42.x86_64
postfix-3.9.1-5.fc42.x86_6

Alternatives invocation in the postfix scriptlet:


rpm -q --scripts postfix-3.9.1-5.fc42.x86_64 | grep 'alternatives.*install' -A10
alternatives --install /usr/bin/sendmail mta /usr/bin/sendmail.postfix 60 \
        --follower /usr/bin/mailq mta-mailq /usr/bin/mailq.postfix \
        --follower /usr/bin/newaliases mta-newaliases /usr/bin/newaliases.postfix \
        --follower /etc/pam.d/smtp mta-pam /etc/pam.d/smtp.postfix \
        --follower /usr/bin/rmail mta-rmail /usr/bin/rmail.postfix \
        --follower /usr/lib/sendmail mta-sendmail /usr/lib/sendmail.postfix \
        $ALTERNATIVES_DOCS \
        --initscript postfix

Alternative state after the upgrade:

First level:

rpm -q --scripts postfix-3.9.1-5.fc42.x86_64 | grep 'alternatives.*install' -A7  | grep / | sed 's/^[^-]\+--/--/' | awk '{print $2}' | xargs ls -l
ls: cannot access '/usr/bin/sendmail': No such file or directory
lrwxrwxrwx. 1 root root 25 Jul 13  2022 /etc/pam.d/smtp -> /etc/alternatives/mta-pam
lrwxrwxrwx. 1 root root 27 Jul 13  2022 /usr/bin/mailq -> /etc/alternatives/mta-mailq
lrwxrwxrwx. 1 root root 32 Jul 13  2022 /usr/bin/newaliases -> /etc/alternatives/mta-newaliases
lrwxrwxrwx. 1 root root 27 Jul 13  2022 /usr/bin/rmail -> /etc/alternatives/mta-rmail
lrwxrwxrwx. 1 root root 30 Jul 13  2022 /usr/lib/sendmail -> /etc/alternatives/mta-sendmail

Next level:
rpm -q --scripts postfix-3.9.1-5.fc42.x86_64 | grep 'alternatives.*install' -A7  | grep / | sed 's/^[^-]\+--/--/' | awk '{print $2}' | xargs ls -l | grep alternatives | awk '{print $NF}' | xargs ls -l
ls: cannot access '/usr/bin/sendmail': No such file or directory
lrwxrwxrwx. 1 root root 22 Jul 13  2022 /etc/alternatives/mta-mailq -> /usr/bin/mailq.postfix
lrwxrwxrwx. 1 root root 27 Jul 13  2022 /etc/alternatives/mta-newaliases -> /usr/bin/newaliases.postfix
lrwxrwxrwx. 1 root root 23 Jul 13  2022 /etc/alternatives/mta-pam -> /etc/pam.d/smtp.postfix
lrwxrwxrwx. 1 root root 22 Jul 13  2022 /etc/alternatives/mta-rmail -> /usr/bin/rmail.postfix
lrwxrwxrwx. 1 root root 25 Jul 13  2022 /etc/alternatives/mta-sendmail -> /usr/lib/sendmail.postfix

Alternatives available:

ls /etc/alternatives/mta* -l
lrwxrwxrwx. 1 root root 26 2022-07-13 10:04 /etc/alternatives/mta -> /usr/sbin/sendmail.postfix
lrwxrwxrwx. 1 root root 40 2022-07-13 10:04 /etc/alternatives/mta-aliasesman -> /usr/share/man/man5/aliases.postfix.5.gz
lrwxrwxrwx. 1 root root 22 2022-07-13 10:04 /etc/alternatives/mta-mailq -> /usr/bin/mailq.postfix
lrwxrwxrwx. 1 root root 38 2022-07-13 10:04 /etc/alternatives/mta-mailqman -> /usr/share/man/man1/mailq.postfix.1.gz
lrwxrwxrwx. 1 root root 27 2022-07-13 10:04 /etc/alternatives/mta-newaliases -> /usr/bin/newaliases.postfix
lrwxrwxrwx. 1 root root 43 2022-07-13 10:04 /etc/alternatives/mta-newaliasesman -> /usr/share/man/man1/newaliases.postfix.1.gz
lrwxrwxrwx. 1 root root 23 2022-07-13 10:04 /etc/alternatives/mta-pam -> /etc/pam.d/smtp.postfix
lrwxrwxrwx. 1 root root 22 2022-07-13 10:04 /etc/alternatives/mta-rmail -> /usr/bin/rmail.postfix
lrwxrwxrwx. 1 root root 25 2022-07-13 10:04 /etc/alternatives/mta-sendmail -> /usr/lib/sendmail.postfix
lrwxrwxrwx. 1 root root 41 2022-07-13 10:04 /etc/alternatives/mta-sendmailman -> /usr/share/man/man1/sendmail.postfix.1.gz
lrwxrwxrwx. 1 root root 38 2022-07-13 10:04 /etc/alternatives/mta-smtpdman -> /usr/share/man/man8/smtpd.postfix.8.gz

What alternatives says:

alternatives --display mta
mta - status is auto.
 link currently points to /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.postfix - priority 60
 follower mta-pam: /etc/pam.d/smtp.postfix
 follower mta-mailq: /usr/bin/mailq.postfix
 follower mta-newaliases: /usr/bin/newaliases.postfix
 follower mta-rmail: /usr/bin/rmail.postfix
 follower mta-sendmail: /usr/lib/sendmail.postfix
 follower mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
 follower mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
 follower mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
 follower mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
 follower mta-smtpdman: /usr/share/man/man8/smtpd.postfix.8.gz
Current `best' version is /usr/sbin/sendmail.postfix.

/usr/bin and /usr/sbin are not merged:

ls -li /usr/bin /usr/sbin  -d
1016 dr-xr-xr-x. 1 root root 27668 2025-06-09 00:20 /usr/bin
1017 dr-xr-xr-x. 1 root root  6250 2025-06-08 22:42 /usr/sbin

Postfix sendmail available via:

ls -l /usr/*bin/sendmail*
-rwxr-xr-x. 1 root root 32360 2025-05-09 00:00 /usr/bin/sendmail.postfix
lrwxrwxrwx. 1 root root    23 2025-06-08 22:27 /usr/sbin/sendmail.postfix -> ../bin/sendmail.postfix


Relevant snippet from the /var/log/dnf.rpm.log:

2025-06-08T20:58:37+0000 SUBDEBUG Upgrade: postfix-2:3.9.1-5.fc42.x86_64
2025-06-08T20:58:37+0000 INFO warning: /etc/postfix/main.cf created as /etc/postfix/main.cf.rpmnew
warning: /etc/postfix/master.cf created as /etc/postfix/master.cf.rpmnew
warning: /etc/postfix/virtual created as /etc/postfix/virtual.rpmnew

2025-06-08T20:58:40+0000 INFO the primary link for mta must be /usr/sbin/sendmail



Apparently I ran into a similar issue a F42 beta user (who upgrade from f41 to f42) discussed in February, in a Fedora web forum:
https://forums.fedoraforum.org/showthread.php?334152-F42-usr-bin-mail-not-sending-mail-postfix-no-longer-provides-usr-sbin-sendmail&p=1890728


My workaround:

cd /usr/bin
ln -s /etc/alternatives/mta-sendmail sendmail


I hope that the next postfix package update doesn't mess with it, though ...


Note You need to log in before you can comment on or make changes to this bug.