Why can't I set the source email address in mailx using the "-f" flag?

Solution Verified - Updated -

Issue

  • Moved from RHEL 4 to RHEL 6 and now mailx -f does not work as expected.
  • I am executing the command below, but something is wrong:
# mailx -s '$SUBJECT' recipient@example.com -- -r sender@example.com

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 4
    • 5
    • 6
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content