Bug 2176591 - msmtp package should provide /usr/bin/sendmail
Summary: msmtp package should provide /usr/bin/sendmail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: msmtp
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Gerald Cox
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-08 20:56 UTC by Yann Droneaud
Modified: 2023-03-25 00:16 UTC (History)
5 users (show)

Fixed In Version: msmtp-1.8.23-2.fc39 msmtp-1.8.23-2.fc37 msmtp-1.8.23-2.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-15 19:32:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Yann Droneaud 2023-03-08 20:56:47 UTC
Description of problem:

  msmtp package is not declared to provide /usr/sbin/sendmail. But installing the package, makes msmtp the "mta" (see alternatives --display mta), and thus provide /usr/bin/sendmail.

  Some packages, see below, requires /usr/sbin/sendmail

    BackupPC-0:4.4.0-9.fc38.x86_64
    alpine-0:2.26-3.fc38.x86_64
    arpwatch-14:3.3-14.fc39.x86_64
    asterisk-voicemail-0:18.12.1-1.fc38.3.x86_64
    certwatch-mod_ssl-0:1.2-12.fc38.x86_64
    fail2ban-sendmail-0:1.0.2-2.fc38.noarch
    fvwm-0:2.7.0-3.fc38.x86_64
    hylafax+-client-0:7.0.7-1.fc39.i686
    hylafax+-client-0:7.0.7-1.fc39.x86_64
    mgetty-0:1.2.1-18.fc38.x86_64
    quilt-0:0.67-4.fc39.noarch
    redhat-lsb-core-0:4.1-60.fc38.i686
    redhat-lsb-core-0:4.1-60.fc38.x86_64
    spamass-milter-0:0.4.0-24.fc38.x86_64
    uudeview-0:0.5.20-51.fc38.x86_64
    websec-0:1.9.0-34.fc38.noarch
    x509watch-0:0.6.1-14.fc38.noarch

  Thus, when asking dnf to install one of the packages above, it will also install another mta from the list below if none of them is already installed. Likely esmtp in my experience (likely because it's the first alphabetically).

    esmtp-0:1.2-21.fc38.x86_64
    exim-0:4.96-8.fc38.x86_64
    opensmtpd-0:6.8.0p2-11.fc38.x86_64
    postfix-2:3.7.4-1.fc38.x86_64
    sendmail-0:8.17.1-8.fc38.x86_64
    ssmtp-0:2.64-32.fc38.x86_64


  Having msmtp already installed should be enough to satisfy /usr/sbin/sendmail requirement, and no other MTA should be installed as part of installing another package.

Version-Release number of selected component (if applicable):

  msmtp-1.8.23-1.fc38.x86_64

How reproducible:

  When installing a package that requires /usr/bin/sendmail when no other MTA is installed.

Steps to Reproduce:

1. dnf install msmtp
2. dnf install arpwatch

Actual results:

 "dnf install arpwatch" installs arpwatch and esmtp

Expected results:

 "dnf install arpwatch" would install only arpwatch

Comment 1 Gerald Cox 2023-03-08 21:55:24 UTC
Believe this is a duplicate of: https://bugzilla.redhat.com/show_bug.cgi?id=1367858
Also refer to:
https://bugzilla.redhat.com/show_bug.cgi?id=1601698
https://bugzilla.redhat.com/show_bug.cgi?id=1601699

*** This bug has been marked as a duplicate of bug 1367858 ***

Comment 2 Yann Droneaud 2023-03-09 19:47:52 UTC
(In reply to Gerald Cox from comment #1)
> Believe this is a duplicate of:
> https://bugzilla.redhat.com/show_bug.cgi?id=1367858
> Also refer to:
> https://bugzilla.redhat.com/show_bug.cgi?id=1601698
> https://bugzilla.redhat.com/show_bug.cgi?id=1601699
> 
> *** This bug has been marked as a duplicate of bug 1367858 ***

I agree, it's a duplicate, but a duplicate of bug #1694401

msmtp should be one packages providing /usr/sbin/sendmail and /usr/lib/sendmail, but's not:

  $ dnf repoquery --whatprovides /usr/lib/sendmail 
  esmtp-0:1.2-21.fc38.x86_64
  exim-0:4.96-8.fc38.x86_64
  opensmtpd-0:6.8.0p2-11.fc38.x86_64
  postfix-2:3.7.4-1.fc38.x86_64
  sendmail-0:8.17.1-8.fc38.x86_64

  $ dnf repoquery --whatprovides /usr/sbin/sendmail 
  esmtp-0:1.2-21.fc38.x86_64
  exim-0:4.96-8.fc38.x86_64
  opensmtpd-0:6.8.0p2-11.fc38.x86_64
  postfix-2:3.7.4-1.fc38.x86_64
  sendmail-0:8.17.1-8.fc38.x86_64
  ssmtp-0:2.64-32.fc38.x86_64

As suggested in patch from bug #1551346, msmtp's SPEC file should declare the following in %files section, just like esmtp's SPEC file:

  %ghost %{_sbindir}/sendmail
  %ghost %{_prefix}/lib/sendmail

Comment 3 Gerald Cox 2023-03-10 16:01:41 UTC
I thought I had tried the %ghost and it didn't work.  I'll take a look again.

Comment 4 Gerald Cox 2023-03-10 19:48:19 UTC
I've created a test build that I'd like you to try before I push this to testing:

1. dnf copr enable gbcox/msmtp-testing
2. dnf upgrade msmtp

It's going to take me several days to create a test environment, so if it checks out
with you that would speed things up.  

Thanks!

Comment 5 Yann Droneaud 2023-03-13 20:27:09 UTC
(In reply to Gerald Cox from comment #4)
> I've created a test build that I'd like you to try before I push this to
> testing:
> 
> 1. dnf copr enable gbcox/msmtp-testing
> 2. dnf upgrade msmtp
> 
> It's going to take me several days to create a test environment, so if it
> checks out
> with you that would speed things up.  
> 

It works. I can install arpwatch and msmtp, without having to install another MTA.

Thanks.

Comment 6 Fedora Update System 2023-03-15 19:31:14 UTC
FEDORA-2023-9d717d766d has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9d717d766d

Comment 7 Fedora Update System 2023-03-15 19:32:04 UTC
FEDORA-2023-9d717d766d has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2023-03-15 19:51:43 UTC
FEDORA-2023-1ef103712d has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1ef103712d

Comment 9 Fedora Update System 2023-03-15 19:52:30 UTC
FEDORA-2023-6dd703f8b0 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6dd703f8b0

Comment 10 Fedora Update System 2023-03-16 19:29:10 UTC
FEDORA-2023-6dd703f8b0 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-6dd703f8b0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6dd703f8b0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-03-17 04:04:48 UTC
FEDORA-2023-1ef103712d has been pushed to the Fedora 38 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1ef103712d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-03-24 01:54:45 UTC
FEDORA-2023-6dd703f8b0 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2023-03-25 00:16:32 UTC
FEDORA-2023-1ef103712d has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


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