Skip to content

Handle recipients without a mapping #3

Description

@CodeZombieCH

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

  • Decision
  • Implementation
  • Test
  • Documentation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions