Reputation: 1270
I cannot get the mailx -r option to set the sender "From" field correctly.
echo "email text" | mail -s "test 123" -r [email protected] [email protected]
The email gets sent if the "-r" field is a fake domain. If it is a real domain, the email does not get sent. The username does not matter, only the domain name.
Where should I check to fix this?
RHEL6.4
Upvotes: 3
Views: 1766
Reputation: 1270
The final result... I should have checked my spam folder. All the test emails using the real domain were in there.
Details:
Fake return domain – went through
Received-SPF: none (google.com: [email protected] does not designate permitted sender hosts) client-ip=54.201.xx.xx;
Real domain – caught in spam trap
Received-SPF: fail (google.com: domain of [email protected] does not designate 54.201.90.208 as permitted sender) client-ip=54.201.xx.xx;
The reason is that the "real.com" domain uses a white list and this specific NAT IP was not added to that list. The fake domain was let through, probably because the mail policy is to let through too much instead of too little.
Upvotes: 1