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.
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.
(Tragically, this is not well document in the mail.1 manual page. Sorry.) See also mailwrapper(8).
Thank you for clarifying! So this is no software bug, let us close this.
Submitter requested to close.