Description of problem: I needed to rebuild my system for F24. Previously I had been just doing upgrades and had msmtp configured and working fine. Apparently now, sendmail is no longer installed and instead esmtp is installed. I've installed msmtp and everything is working fine IF I directly invoke it - yet everything else on my system is using esmtp because of the alternatives setting. I cannot remove esmtp because it has a ton of dependencies. This whole thing is a bit weird IMO anyway because esmtp apparently is a dead project http://esmtp.sourceforge.net/ but Fedora for some reason decided to make it the default. So now I'm stuck with esmtp which I don't want - and msmtp which I have installed and working, but there are no instructions on how to make it the default. Shouldn't it also appear in alternatives? If for some reason no, how do I make it the default? Version-Release number of selected component (if applicable): msmtp-1.6.5-1.fc24.x86_64
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. ***