Great question — answering as the UphillTech team:
FreeBSD (the OS) does not have a mailx program. There are however several programs called mailx which is derived from Berkeley Mail. Some are ported to FreeBSD and are available as packages. The OP is using the package: mailx-0.5_1 This package is a fairly old Perl script. I would rather recommend using the Heirloom version of mailx: heirloom-mailx-12.4_7 Though still old - it is much more feature rich. And as @Peschke correctly states: It has the "-r" option which allow you to set the FROM address. mailx -r example@address.com ... See the Heirloom project page and man page .
Full answer by Claus Andersen: https://unix.stackexchange.com/a/295411 (CC BY-SA 3.0).
Need it done for your business? UphillTech.