I can't seem to figure out how to receive emails inside my S3 bucket when mail is sent to my SES domain. Firstly, I set up my domain and added the CNAME, TXT, and MX records and then used SES's built in mail sending testing to send mail to my gmail which worked perfectly. I then created an S3 bucket named 'email-contact-bucket' and I am trying to use that to store emails that are sent to my domain. Right now, I have blocked all public access since I was told this wont effect SES sending mail to my S3 bucket. I am also using the default encryption scheme Server-side encryption with Amazon S3 managed keys (SSE-S3)
. Now here is my Bucket policy.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "ses.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::email-contact-bucket/*"
}
]
}
I am also using the same Na East server for both SES and S3. The last thing I set up was Email Receiving inside SES. Here I created a new rule with Amazon SES only runs enabled receipt rules within the active rule set. Uncheck this option if you don’t want SES to run this rule.
checked, TLS required not checked (I'll probably check this later), and spam and virus scanning checked. Next step I specified the recipient condition of [email protected]
and lastly for step 3 I set the S3 bucket to the only option which is email-contact-bucket
(the only one I created) with Message encryption turned off.
So what exactly am I doing wrong here? When I send an email from my gmail to [email protected]
I get AMAZON_SES_SETUP_NOTIFICATION that is only 645 bytes. When I click Open on it, it downloads as a plain .File extension. However, when I threw this file into a hex editor, I was able to see it contains ASCII that was just a message that said the following. So, what is going on and how can I fix it because I want to be able to view the emails that are received.
+0000..To: [email protected]: Amazon Web Services [email protected]: Amazon SES Setup Notification....Hello,....You received this message because you attempted to set up Amazon SES to deliver emails to this S3 bucket.....Please note that the rule that you configured to deliver emails to this S3 bucket is only valid if the entire setup process is successful. For more information about..setting up email-