Search code examples
amazon-web-servicesamazon-snsamazon-ses

AWS SES email receiving - 550 mailbox not found


I've been trying to set up AWS Simple Email Service as a way to forward emails received to my custom domain on to my Gmail account, without any email hosting service required.

I have set up and verified my custom domain (mycustomdomain.com) as well as verified the email address they'll be forwarded to ([email protected]) as I'm still in Sandbox mode.

Under Email Receiving -> Rule Sets, I have an active / enabled rule set (forward-to-myemail-gmail) which is enabled, doesn't require TLS and has spam/virus scanning on.

  • There are no recipients specified, which I believe should allow this rule to be triggered for ALL recipients under my custom domain.
  • I have a single SNS action specified, which is to publish to the SNS topic (sns-forward-to-myemail-gmail) using base64 encoding

I have also set up my SNS topic as above and associated subscription, and have tested sending a notification to this topic manually using the console, so have confirmed it works.

However if I try sending an email to, for example, [email protected], I get a bounce message back saying:

Address not found

Your message wasn't delivered to [email protected] because the address couldn't be found or is unable to receive email.

The response was:

550 Mailbox does not exist!

I've also confirmed that the MX records have been set up correctly using mxtoolbox.com, which says the domain records point to feedback-smtp.us-west-2.amazonses.com

Any suggestions for what I'm doing wrong? Many thanks!


Solution

  • Ok I figured it out... User error, as expected!

    I had two MX records, one for the "mail" subdomain and another for "@" meaning the base domain. Both were set to the feedback endpoint, which was the problem. I think I was misunderstanding the two MX records.

    The "mail from" configuration that used the SES feedback endpoint needed to be set for the sending subdomain (mail.mycustomdomain.com) while the SES inbound SMTP endpoint should have been used for the receiving domain (@, which means mycustomdomain.com).

    Before when I was setting both to the same value I found either get a verified MAIL FROM or received email but not both. Obvious in hindsight! Hope this helps someone else.