AWS SES handle doesn't exist mailbox with Lamb

2019-07-15 02:21发布

问题:

I try to use AWS SES for handle some app data on get email.

I've verified mydomain.com with AWS SES. I want handle dynamic email to addresses 1@mydomain.com 2@mydoamin.com, where 1,2 id from database.

I want handle it with AWS lambda, but I can not do it because I get:

550 5.1.1 Requested action not taken: mailbox unavailable

Is there any way to bypass the creation of mailboxes?

How can I change to email address via SES, for send all emails to one pre existed mailbox?

回答1:

The error

550 5.1.1 Requested action not taken: mailbox unavailable

is not an AWS Lambda or AWS SES issue. It is an issue on the receiving end of the email. The problem is that there is no one on the receiving end of 1@mydomain.com to receive the email.

Lambda and SES cannot avoid the issue. To handle the issue, you must resolve it on the receiving end by:

  • creating an inbox, or
  • setting up aliases, or
  • wild-card the emails to a default inbox

The technical steps to accomplish this will depend on your receiving-end mail server.



回答2:

Make sure your MX records are correctly setup and propagated.

To check, navigate to your domain's Hosted zone in Route 53, and you should have the MX records like:

10 inbound-smtp.us-east-1.amazonaws.com 
20 inbound-smtp.eu-west-1.amazonaws.com 
30 inbound-smtp.us-west-2.amazonaws.com

See also: Amazon WorkMail account failing to receive email