#1064274 bsd-mailx: Uses hardcoded /usr/sbin/sendmail path

Package:
bsd-mailx
Source:
bsd-mailx
Description:
simple mail user agent
Submitter:
Daniel Gröber
Date:
2024-02-29 13:27:05 UTC
Severity:
normal
#1064274#5
Date:
2024-02-19 12:50:01 UTC
From:
To:
Hi Robert,

your bsd-mailx package hardcodes sendmail to be at /usr/sbin/sendmail
by default (see 02-Base-fixes-1.patch). I found myself needing to
override sendmail systemwide due to an esoteric setup ask for details
at your own peril ;)

I found mailx will keep using /usr/sbin/sendmal despite me overriding
it at /usr/local/sbin/sendmail (which comes first in $PATH).

I wonder do we need to use absolute paths here? Wouldn't

    #define _PATH_SENDMAIL "sendmail

work just as well?

Thanks,
--Daniel

#1064274#10
Date:
2024-02-29 12:39:20 UTC
From:
To:
Daniel Gröber pisze:

Hi,

No, it won't, as the default PATH for non-root users does not contain
/usr/sbin.

Path to sendmail can be overridden either in your ~/.mailrc file or
globally in /etc/mail.rc by adding the following line there:

set sendmail=/usr/local/sbin/sendmail

Hopefully doing this should fix your issue, so I am closing the bug report.

Regards,
robert

#1064274#11
Date:
2024-02-29 13:06:00 UTC
From:
To:
Hi Robert,

Ah indeed, forgot about that aspect since I always add it to my
$PATHs. That's a reason for me to support merged bin+sbin I guess :)

Yeah that's what I ended up doing. Would have just liked a less high touch
way to get that across the whole system. Not a huge deal.

Thanks,
--Daniel