0

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)

  • 2
    Instance size is probably a red herring, not relevant. Your question doesn't have enough information to answer it. What spam filter is putting into spam - gmail, thunderbird, spam assassin, etc. What is the IP address reputation - use mxtoolbox to look it up. Have you checked the email headers to work out why the emails are being classified as spam? Please edit your question to include all this information. – Tim Apr 08 '18 at 01:02
  • Sending email directly like that is sure to cause issue. Unless everything is setup so it is treated like a properly configured mail server it’s surprising anything is making it to your mailbox. The solution here is to use a “relay” to send your mail. That could be a smart host, Amazon SES, or some other third party. It could be as simple as using gmail to send the email by authenticating through SMTP. – Appleoddity Apr 08 '18 at 06:31
  • is "relay' a command? Moreover, SES service is not supported in Mumbai region where my instances are launched. What could be the issue when it is sending emails to inbox from dev server and not from upgraded test and prod server. – Abhishek Somani Apr 09 '18 at 19:11
  • Basically what i am doing is- running few cron scheduled scripts like database back up etc which emails the developers once the back up is completed. Unlike previously when it was going in inbox and set up was working fine, now it is going to spam and they dont get notified. – Abhishek Somani Apr 09 '18 at 19:31
  • any inputs on this? anyone? – Abhishek Somani Apr 22 '18 at 04:54

0 Answers0