Why can't I set the source email address in mailx using the "-f" flag?
Environment
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Issue
- Moved from RHEL 4 to RHEL 6 and now "mailx -f" does not work as expected.
Resolution
- To set the "From" user's address in Red Hat Enterprise Linux 6, use
# mailx -r
Root Cause
- -f switch in Red Hat Enterprise Linux 5 and 4 is replaced in RHEL 6
Diagnostic Steps
- Check the release:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
- If the Red Hat release is less than version 6, use the -f switch.
- If the Red Hat release is equal to or greater than version 6, use the -r switch.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
