Bug 1367858
| Summary: | No alternatives exist for msmtp, yet do for esmtp | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Gerald Cox <gbcox> |
| Component: | msmtp | Assignee: | Gerald Cox <gbcox> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | rawhide | CC: | aron, kanelxake, lemenkov, ndevos, p_s_oberoi, qsx+bugzilla.redhat.com, yann |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | msmtp-1.6.7-1.fc27 msmtp-1.6.7-1.fc28 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-07-01 22:23:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Gerald Cox
2016-08-17 16:31:59 UTC
I reviewed the esmtp.spec file, specifically these lines:
# setup dummy files for alternatives
rm -f %{buildroot}%{_bindir}/mailq
touch %{buildroot}%{_bindir}/mailq
rm -f %{buildroot}%{_libdir}/sendmail
mkdir -p %{buildroot}%{_prefix}/lib
touch %{buildroot}%{_prefix}/lib/sendmail
rm -f %{buildroot}%{_sbindir}/sendmail
touch %{buildroot}%{_sbindir}/sendmail
rm -f %{buildroot}%{_mandir}/man1/sendmail.1*
touch %{buildroot}%{_mandir}/man1/mailq.1.gz
mkdir -p %{buildroot}%{_mandir}/man8/
touch %{buildroot}%{_mandir}/man8/sendmail.8.gz
and
# newaliases is fake, so don't install the links.
%{_sbindir}/alternatives --install %{_sbindir}/sendmail mta %{_bindir}/esmtp-wrapper 30 \
--slave %{_prefix}/lib/sendmail mta-sendmail %{_bindir}/esmtp-wrapper \
--slave %{_mandir}/man8/sendmail.8.gz mta-sendmailman %{_mandir}/man1/esmtp.1.gz \
--slave %{_bindir}/mailq mta-mailq %{_bindir}/esmtp-wrapper \
--slave %{_mandir}/man1/mailq.1.gz mta-mailqman %{_mandir}/man1/esmtp.1.gz
Since the dummy files have already been created by the default install of esmtp, they didn't need additional action.
I then modified and executed the alternative statements as follows:
/usr/sbin/alternatives --install /usr/sbin/sendmail mta /usr/bin/msmtp 30 \
--slave /usr/lib/sendmail mta-sendmail /usr/bin/msmtp \
--slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman /usr/share/man/man1/msmtp.1.gz \
--slave /usr/bin/mailq mta-mailq /usr/bin/msmtp \
--slave /usr/share/man/man1/mailq.1.gz mta-mailqman /usr/share/man/man1/msmtp.1.gz
I then went into: alternatives --config mta
and selected the just added entry for msmtp as the default
then re-ran logwatch manually and everything appears to be working again.
I guess the question is: why isn't this code or some version of it included in the msmtp spec. I quickly reviewed the comments in the package review and it was considered and then removed - but does esmtp have more functionality than msmtp? I'm a bit confused here. If the above method isn't recommended, then what is the solution? msmtp needs to be installed as a drop in replacement doesn't it? Isn't that it's function?
Thanks!
Adjusting the priority because this still isn't fixed. Also, changing to F26 so it doesn't fall of the map when F25 is EOL. (In reply to Gerald Cox from comment #2) > Adjusting the priority because this still isn't fixed. Also, changing to > F26 so it doesn't fall of the map when F25 is EOL. Hello Gerald, Since almost everything is done via GitHub nowadays, I almost stopped using msmtp (I'm still using it occasionally, but only for git-email purposes). If you have a patch which fixes that or willing to maintain the package, then drop me a note. (In reply to Peter Lemenkov from comment #3) > Hello Gerald, > > Since almost everything is done via GitHub nowadays, I almost stopped using > msmtp (I'm still using it occasionally, but only for git-email purposes). If > you have a patch which fixes that or willing to maintain the package, then > drop me a note. Hey Peter, thanks for the response. I believe all this requires is a spec file change borrowing the methodology from esmtp. I think all that needs to be done is outlined in comment #1. I'd be happy to be a co-maintainer if you'd like and then I can make the changes to the spec file or you can take a stab at it yourself. I think it would be pretty straightforward. Thanks! Gerald, thanks for your tips here, allowed me to configure msmtp as my MTA. Would definitely be nice to get this into the spec. Thomas Schneider submitted a patch for this in https://bugzilla.redhat.com/show_bug.cgi?id=1551346 For anybody else looking, here's the one-liner:
/usr/sbin/alternatives \
--install /usr/sbin/sendmail mta /usr/bin/msmtp 30 \
--slave /usr/lib/sendmail mta-sendmail /usr/bin/msmtp \
--slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman \
/usr/share/man/man1/msmtp.1.gz \
--slave /usr/bin/mailq mta-mailq /usr/bin/msmtp \
--slave /usr/share/man/man1/mailq.1.gz mta-mailqman \
/usr/share/man/man1/msmtp.1.gz
(In reply to Aron Griffis from comment #7) > For anybody else looking, here's the one-liner: > > /usr/sbin/alternatives \ > --install /usr/sbin/sendmail mta /usr/bin/msmtp 30 \ > --slave /usr/lib/sendmail mta-sendmail /usr/bin/msmtp \ > --slave /usr/share/man/man8/sendmail.8.gz mta-sendmailman \ > /usr/share/man/man1/msmtp.1.gz \ > --slave /usr/bin/mailq mta-mailq /usr/bin/msmtp \ > --slave /usr/share/man/man1/mailq.1.gz mta-mailqman \ > /usr/share/man/man1/msmtp.1.gz Hi Aron... I sent Peter an email to be co-maintainer. Looks like he isn't seeing updates to this bug. Note: rpmlint complains about the following: msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/msmtpq/msmtp-queue /usr/bin/env bash msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/msmtpq/msmtpq /usr/bin/env bash msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/msmtpqueue/msmtp-enqueue.sh /usr/bin/env bash msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/msmtpqueue/msmtp-listqueue.sh /usr/bin/env bash msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/msmtpqueue/msmtp-runqueue.sh /usr/bin/env bash msmtp.x86_64: E: wrong-script-interpreter /usr/share/doc/msmtp/scripts/set_sendmail/set_sendmail.sh /usr/bin/env bash These can be ignored, as per: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/PSJIYXHDRRHEZPUQYYN24MPKD4FRF6BB/ *** Bug 1551346 has been marked as a duplicate of this bug. *** msmtp-1.6.6-6.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d13afeda5f msmtp-1.6.6-6.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-325016f0df msmtp-1.6.7-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-31a3b589c9 msmtp-1.6.7-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-6992da4475 msmtp-1.6.7-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-6992da4475 msmtp-1.6.7-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-31a3b589c9 msmtp-1.6.7-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. msmtp-1.6.7-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 2176591 has been marked as a duplicate of this bug. *** |