Bug 427585 - Various scripts still use /usr/lib/sendmail
Various scripts still use /usr/lib/sendmail
Product: Fedora
Classification: Fedora
Component: mgetty (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Martin Nagy
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-01-04 16:43 EST by Jima
Modified: 2016-07-26 19:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-09 11:32:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
sendmail_path.patch (1.70 KB, patch)
2008-01-08 01:20 EST, Martin Nagy
no flags Details | Diff

  None (edit)
Description Jima 2008-01-04 16:43:40 EST
Description of problem:
Various scripts in mgetty-sendfax (and maybe other packages) still have
references to /usr/lib/sendmail, even though this was supposedly fixed in
BZ#145582.  Confusingly, mgetty-1.1.31-sendmail_path.patch (in CVS) specifically
defines the path as /usr/lib/sendmail.

This should be changed to /usr/sbin/sendmail to allow for MTAs beside sendmail,
and additionally the package should depend on /usr/sbin/sendmail (i.e., the way
redhat-lsb does) to ensure *something* provides it (whether it be sendmail,
exim, postfix, ssmtp, whatever).

Version-Release number of selected component (if applicable):
1.1.33-11.fc9, 1.1.33-11.fc8

How reproducible:

Steps to Reproduce:
1. Don't use sendmail.
2. Run `faxrund`.
Actual results:
"/usr/bin/faxrunq: line 262: /usr/lib/sendmail: No such file or directory"

Expected results:
An actual email? :-)

Additional info:
This even occurs if sendmail is installed, but not the default MTA.

Comment 1 Martin Nagy 2008-01-07 04:29:43 EST
I can't reproduce this on my system. Can you provide the exact steps to reproduce?
Comment 2 Jima 2008-01-07 08:50:41 EST
Hmm, come to think of it, reproducing the error probably requires having a
working fax modem set up.  Oops. :-)

Okay, failing that, I think this should say enough:

$ for i in mgetty mgetty-sendmail mgetty-viewfax mgetty-voice;do mkdir $i;cd
/fedora/releases/8/Everything/i386/os/Packages/$i-1.1.33-11.fc8.i386.rpm | cpio
-id;cd ..
$ grep -ri /usr/lib/sendmail *
Binary file mgetty/usr/sbin/callback matches
mgetty/usr/share/doc/mgetty-1.1.33/samples/new_fax.hpa:/usr/lib/sendmail faxnoti
ce <<EOF
mgetty/usr/share/doc/mgetty-1.1.33/mgetty.ps:1370 y Fd(/usr/lib/sendmail)37 b Fo
Binary file mgetty/sbin/mgetty matches
Binary file mgetty-sendfax/usr/sbin/sendfax matches
Binary file mgetty-voice/usr/bin/lintopvf matches
Binary file mgetty-voice/usr/bin/pvffile matches
Binary file mgetty-voice/usr/bin/pvffft matches
Binary file mgetty-voice/usr/bin/pvfspeed matches
Binary file mgetty-voice/usr/bin/pvftolin matches
Binary file mgetty-voice/usr/bin/pvfnoise matches
Binary file mgetty-voice/usr/bin/pvffilter matches
Binary file mgetty-voice/usr/bin/basictopvf matches
Binary file mgetty-voice/usr/bin/pvfecho matches
Binary file mgetty-voice/usr/bin/rmdfile matches
Binary file mgetty-voice/usr/bin/pvftoau matches
Binary file mgetty-voice/usr/bin/pvftormd matches
Binary file mgetty-voice/usr/bin/pvftowav matches
Binary file mgetty-voice/usr/bin/autopvf matches
Binary file mgetty-voice/usr/bin/wavtopvf matches
Binary file mgetty-voice/usr/bin/pvfreverse matches
Binary file mgetty-voice/usr/bin/vm matches
Binary file mgetty-voice/usr/bin/pvfsine matches
Binary file mgetty-voice/usr/bin/pvfmix matches
Binary file mgetty-voice/usr/bin/pvftovoc matches
Binary file mgetty-voice/usr/bin/pvftobasic matches
Binary file mgetty-voice/usr/bin/rmdtopvf matches
Binary file mgetty-voice/usr/bin/pvfcut matches
Binary file mgetty-voice/usr/bin/pvfamp matches
Binary file mgetty-voice/usr/bin/voctopvf matches
Binary file mgetty-voice/sbin/vgetty matches

Whether or not you can reproduce the error, calling /usr/lib/sendmail is poor
design, creating a hidden, undocumented dependency on a specific MTA (while,
even were it fulfilled, still requiring that sendmail be selected via alternatives).

I'd offer to fix it in CVS, but mgetty has an ACL. :-)
Comment 3 Martin Nagy 2008-01-07 10:33:47 EST
Hm. In your initial comment, you said the error you get is this:
"/usr/bin/faxrunq: line 262: /usr/lib/sendmail: No such file or directory"
However, on my system, I can do this:
$ file /usr/lib/sendmail
/usr/lib/sendmail: symbolic link to `/etc/alternatives/mta-sendmail'
$ file /etc/alternatives/mta-sendmail
/etc/alternatives/mta-sendmail: symbolic link to `/usr/lib/sendmail.sendmail'
$ file /usr/lib/sendmail.sendmail
/usr/lib/sendmail.sendmail: symbolic link to `../sbin/sendmail.sendmail'
$ file /usr/sbin/sendmail.sendmail
/usr/sbin/sendmail.sendmail: setgid ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), for GNU/Linux 2.6.9, stripped

This is on F8. On my experimental rawhide system, I uninstalled sendmail and
installed postfix instead, then:
$ file /usr/lib/sendmail
/usr/lib/sendmail: symbolic link to `/etc/alternatives/mta-sendmail'
$ file /etc/alternatives/mta-sendmail
/etc/alternatives/mta-sendmail: symbolic link to `/usr/lib/sendmail.postfix'
$ file /usr/lib/sendmail.postfix
/usr/lib/sendmail.postfix: symbolic link to `../sbin/sendmail.postfix'
$ file /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.postfix: ELF 32-bit LSB shared object, Intel 80386, version 1
(SYSV), for GNU/Linux 2.6.9, stripped

So I would say the error is on your end. Any objections against closing this as
Comment 4 Jima 2008-01-07 11:56:03 EST
Yes, I would object to that, actually.

David Woodhouse and Dennis Gilmore pointed out to me earlier that *some* MTAs
(namely: exim, postfix, and sendmail) provide a /usr/lib/sendmail.<mta> symlink,
but I found that none except sendmail actually declare /usr/lib/sendmail as a
Provides.  (Also, while functional MTAs, neither esmtp nor ssmtp provide a
/usr/lib/sendmail.<mta> symlink.)  Conversely, all of the MTAs I named have
Provides for /usr/sbin/sendmail.

I'll again reiterate that regardless of what we're pointing to, there should be
a Requires for it.  The downside to Requiring /usr/lib/sendmail is that only one
MTA fulfills it, and exim/postfix/sendmail *need* to be the primary MTA for it
to actually work.

For the record, I had ssmtp as my primary (and only) MTA in my test case.  I
apologize for not noticing that exim and postfix worked, too.
Comment 5 Jima 2008-01-07 12:13:47 EST
Some additional thoughts, according to repoquery against F8:

Nothing Requires /usr/lib/sendmail.

13 packages Require /usr/sbin/sendmail:

Additionally, 4 packages Require smtpdaemon:

All of the packages that Provide /usr/sbin/sendmail Provide smtpdaemon, except
esmtp (and I would consider that a bug in esmtp).
Comment 6 Martin Nagy 2008-01-08 01:20:19 EST
Created attachment 291038 [details]

Could you please verify that this CVS patch works? Thanks.
Comment 7 Jima 2008-01-08 08:53:06 EST
It works quite nicely, actually.  The only hits remaining are:

faxnotice <<EOF
mgetty/usr/share/doc/mgetty-1.1.33/mgetty.ps:1370 y Fe(/usr/lib/sendmail)37 b

The samples I'm not hugely worried about (might be nice to fix, but I wouldn't
lose any sleep over it); I have no idea as to the importance of the .ps file. :-)

Thanks for the timely response!
Comment 8 Martin Nagy 2008-01-09 11:32:28 EST
Fixed in mgetty-1.1.33-12.fc9

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