Recently, i have upgraded my EC2 ubuntu instance from t2.micro to t2.medium in AWS to fight space related issues. Though the upgrade went well, mail command which was working fine in t2.micro started sending emails to my spam folder now. I have written few scripts which are scheduled through cron and they send email notification if the script gets triggered. Is there any reason of such behavior and how possible it can be related to the upgrade? If not related, what can be the issue here?
I am using Gmail account and the sample command that i am using is below
echo "drrescribe.com database backup has been succesfully uploaded to s3 bucket $DATE" | mail -s "drrescribe.com database backup uploaded succesfully on $DATE" xxx@gmail.com
It is still working for other t2.micro instances in the same VPC and with same security group attached. For this instance, i am receiving emails in my inbox only but for the other two instances , it is getting delivered in my spam folder( that is also intermittent, sometimes i dont even get the emails)