Find a way to deal with mail recipients without a corresponding mapping.
The current implementation raises an error, which results in the Lambda engine retrying to execute the function again, which fails even earlier because the mail is no longer found in in/new/. This eventually leads to a notification to the dead letter queue.
Problems
- The sender of the mail will never know the mail failed to be delivered.
- Any further attempts to retry executing the lambda function returns in a different error than the first try, which can be misleading.
Options
Bounce
Bounce mail according to RFC 3834. Bounce mail should be sent to address in Return-Path header.
AWS SES offers a step to bounce mail, but requires a static sender. This is not ideal, as the function itself allows receiving mails for multiple domains.
Bouncing mails might lead to backscatter.
Drop
Silently drop the mail by moving it to in/undeliverable
Consider sending a notification to the owner of the lambda function so the lack of a mapping can be fixed.
TODO
Find a way to deal with mail recipients without a corresponding mapping.
The current implementation raises an error, which results in the Lambda engine retrying to execute the function again, which fails even earlier because the mail is no longer found in
in/new/. This eventually leads to a notification to the dead letter queue.Problems
Options
Bounce
Bounce mail according to RFC 3834. Bounce mail should be sent to address in
Return-Pathheader.AWS SES offers a step to bounce mail, but requires a static sender. This is not ideal, as the function itself allows receiving mails for multiple domains.
Bouncing mails might lead to backscatter.
Drop
Silently drop the mail by moving it to
in/undeliverableConsider sending a notification to the owner of the lambda function so the lack of a mapping can be fixed.
TODO