Skip to content

Silently fails if forwarding does not work #97

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
a-bali opened this issue Oct 11, 2018 · 4 comments
Open

Silently fails if forwarding does not work #97

a-bali opened this issue Oct 11, 2018 · 4 comments

Comments

@a-bali
Copy link

a-bali commented Oct 11, 2018

Currently this setup seems to just silently swallow emails that, for whatever reason, cannot be forwarded - for example due to exceeding the 10mb limit for the message size. The mail gets successfully saved on S3 but neither the original sender nor the receiver is notified that the email could not be forwarded.

For the time being, I circumvented this with setting up a DLQ for the Lambda function which sends notification via SNS.

I wonder if it would be possible to somehow improve this e.g. by the following:

  1. Delivering a truncated email to the recipient, indicating that it was truncated due to AWS limits and the full message is available in S3
    or (possibly more appropriate for other types of failure)
  2. Bounce to the original sender indicating that the mail could not be delivered.
@arithmetric
Copy link
Owner

Thanks for posting on the DLQ resource approach. You're right that there is no built-in notification to the original sender or recipient.

However I would not say the script silently fails. Two ways to get debugging information and trigger actions if the forwarding fails:

  1. Use a Cloudwatch Alarm configured to watch for a Lambda Error associated with this function and/or configured to watch for a SES Publish Failure associated with the related SES rule. This alarm can send an email notification to a predefined list of recipients.
  2. Check Cloudwatch Logs for information about why a message failed, including errors returned when a message exceeds the 10 MB limit.

@ekcrisp
Copy link

ekcrisp commented Jan 9, 2019

failed deliveries should be reported back to the sender, that currently is not working

@kevbarns
Copy link

The topic is interesting. I've poster another issue pretty much similar, because when the function fails to forward the mail, the error is not logged in Cloudwatch

@GeoffState
Copy link

GeoffState commented Jul 30, 2019

I solved a similar "silently fails" issue by finding that my forwarding address had been black-listed by SES (during testing). Nothing shows in Cloudwatch. When I submitted a "Suppression List Removal" SES confirmed the address had been suppressed. After this it all worked.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants