Skip to content
/ Loft Public

Receive email via Amazon Simple Email Service (SES) and synchronise it to a designated IMAP mailbox.

License

Notifications You must be signed in to change notification settings

BAPostma/Loft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loft 🕊

Receive email via Amazon Simple Email Service (SES) and synchronise it to a designated IMAP mailbox. Adequate logging, persistence in S3 and Dynamo DB is part of the handler's process.

CI AWS SAR

Purpose

For anyone who wants to keep their email address anonymous, Loft is a catch-all email receiver based on AWS. Loft moves email sent to any '[alias]@[mydomain].com' to an IMAP mailbox such as Gmail. Unlike email providers who allow for the addition of a '+' in email addresses to create aliases (e.g. johndoe+contoso@example.com), Loft works with any registered alias, for any domain name you register. Thereby solving the problem that email addresses often contain (parts of) a real name. What's more is that with a few dozen emails per day, the solution is practically $0 on your AWS bill too!

Name

This project is named after the construction that houses homing pigeons: a Loft. Each pigeonhole is essentially a separate mailbox.

Architecture

Architecture The following AWS services are used: CloudFormation, SES, SNS, SQS, S3, CloudWatch, Dynamo DB, Lambda, SAR and IAM.

Prerequisites

  • Domain name with control over MX records in DNS
  • Configured Amazon Simple Email Service to receive email on the domain (guide)
  • Mailbox that supports IMAP for synchronising email (e.g. Gmail)
    • IMAP credentials for the destination mail server (e.g. Gmail app password is recommended to avoid using your main password)

Deployment & activation

Loft is available in the AWS Serverless Application repository from where you can deploy directly into your AWS account using AWS CloudFormation.

  1. Click here to deploy directly
  2. Set the new SES Rule Set as active under Email receiving > Rule Sets

Note: when deploying manually, the default AWS region is Ireland (eu-west-1). You can change this in samconfig.toml.

Cleanup

  1. In the S3 console, empty the Loft email bucket
    Warning! This permanently destroys all email in the S3 bucket and Dynamo DB.
  2. Delete the Loft CloudFormation stack from the control panel

Alternatively, you can run the cleanup script: loft$ scripts/6-remove.sh.

Contributing

We'd love contributions that help to build a web UI on top of Dynamo DB, providing metrics on incoming mail and used aliases for the domain.

The project source includes function code and supporting resources:

  • src/ - C# .NET Core Lambda function with the solution file in the repository root under Loft.sln.
  • doc/ - Architecture diagram from Draw.io.
  • scripts/ - Shell scripts that use the AWS SAM CLI to deploy and manage the application.

Prerequisites

To develop on any platform, you'll need the following toolchain:

About

Receive email via Amazon Simple Email Service (SES) and synchronise it to a designated IMAP mailbox.

Topics

Resources

License

Stars

Watchers

Forks