Bug 237821 - /usr/bin/mail: path to sendmail hard coded
Summary: /usr/bin/mail: path to sendmail hard coded
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-10 08:38 UTC by oz42
Modified: 2019-05-13 16:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oz42 2019-05-10 08:38:09 UTC
It seems that the path to the sendmail binary is hardcoded in the mail binary:

# echo test | mail -s test root
mail: /usr/sbin/sendmail: No such file or directory

l /usr/local/sbin/sendmail
-rwxr-xr-x  1 root  wheel    30K May 10 10:32 /usr/local/sbin/sendmail*

This system does not have sendmail but postfix from ports installed.
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2019-05-10 15:57:17 UTC
It can be overridden by setting the "sendmail" variable in either ~/.mailrc or 
 as an environment variable to the path of the correct program to use.  It can be set on a global basis in any of: /usr/share/misc/mail.rc; /usr/local/etc/mail.rc; and /etc/mail.rc.
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2019-05-10 15:58:14 UTC
(Tragically, this is not well document in the mail.1 manual page.  Sorry.)

See also mailwrapper(8).
Comment 3 oz42 2019-05-13 11:15:49 UTC
Thank you for clarifying! So this is no software bug, let us close this.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2019-05-13 16:38:38 UTC
Submitter requested to close.