If I SSH into my instance and send email to my Gmail account:
echo "Test." | mail -r "myuser@gmail.com" -s "Subject Test" myuser@gmail.com
I'll receive the email.
However, if I do the same command but send it to my Hotmail account, I don't receive the email:
echo "Test." | mail -r "myuser@hotmail.com" -s "Subject Test" myuser@hotmail.com
What's weird is I have other EC2 instances that ARE able to email myuser@hotmail.com. I am using an Elastic IP.
What do I have to do to be able to receive email from my EC2 instance using my Hotmail account?
IPs in some of EC2 IP ranges are black listed by Hotmail, that explains why it succeeds on some machine. It is possible a spammer used a EC2 instance in the past whose IP was in the same blocked IP range. Your options: