arithmetric / aws-lambda-ses-forwarder

Serverless email forwarding using AWS Lambda and SES
MIT License
1.7k stars 452 forks source link

Fails to forward mail with more than 50 recipients #44

Open jmcelvenny opened 7 years ago

jmcelvenny commented 7 years ago

If the Lambda function is invoked with an e-mail that has more than 50 original recipients, it will create an error in SES.

Example: User is part of an e-mail with 100 different addresses. The forwarded e-mail should only be sent to the user's forward address (1 recipient) but instead an error is thrown in SES for attempting to send an e-mail with more than 50 recipients.

I'll update this if I can configure a fix or find the logs

XtremeOwnageDotCom commented 7 years ago

This is a limitation of the amazon SES sandbox mode.

Not a limitation of the script!

http://docs.aws.amazon.com/ses/latest/DeveloperGuide/limits.html

jmcelvenny commented 7 years ago

Sending any e-mail to 50+ recipients is a limitation of Amazon SES. The case I was referring to is:

To: 1@example.com, 2@example.com, 3@example.com, ...., 50@example.com, forward@example.com

Where the only address that is forwarding e-mail using the script is forward@example.com. In this case, a total of one e-mail should be sent (to the forwarding address of forward@example.com - just 1 recipient) with the contents of the original e-mail.

SES can receive the e-mail and store in in S3, but an error is raised when the Lambda script attempts to forward it. The error is a 50+ recipients error when only one e-mail with one recipient should be sent.

Will recreate this issue and add logs shortly.