#aws #mail-server #security #lambda #rust

bin+lib privatemail

Service to forward custom emails to personal email server

6 releases

1.1.5 Apr 26, 2021
1.1.3 Apr 25, 2021
1.0.0 Mar 27, 2021
0.2.4 Apr 22, 2024
0.1.0 Dec 27, 2021

#252 in Email

Download history 92/week @ 2024-02-20 26/week @ 2024-02-27 17/week @ 2024-03-12 4/week @ 2024-04-02 48/week @ 2024-04-16 56/week @ 2024-04-23

104 downloads per month

MIT license

581 lines


Build & Run Tests

Forward emails from verified domains on SES to SES verified email.


A RUST service that uses the inbound/outbound capabilities of AWS SES to forward emails from verified domains to an SES verified email address. For example, if an email is sent from john@doe.example to achu@fufu.soup is forwarded to a verified email onions@suya.io. privatemail also add capability to blacklist certain emails from coming to you.

Example email and how the From and Reply-To headers are set:

From: John Doe <achu@fufu.soup>
Reply-To: john@doe.example

<html>Email body</html>

received by -- <onions@suya.io>



  1. Edit the terraform/variables.tf file accordingly to suit your needs.
  2. If you're using S3 as your backend, you'll need to make changes to terraform/main.tf
  3. Test build locally.
$ cargo build
$ cargo test

Provision Infrastructure with Terraform

  1. Verify your domain and email address on SES before running this
  2. Create a terraform Token which has admin access to your AWS Account
  3. Build and generate your Lambda.zip in the terraform directory
  4. Provision infrastructure
$ cd terraform
$ terraform init
$ terraform validate -json
$ terraform plan
$ terraform apply

Alternately, you can run the release.sh and it builds your code and provisions your infrastructure.


We appreciate your contributions; all PRs are welcomed. Please see CONTRIBUTING.md for more information.

Deployment 🚀

Local Deploy

$ bash release.sh

CI / CD (GitHub Actions)

Set up the following GitHub secrets for actions worfklows to work properly


All deployments occur via GitHub Actions.


The scripts and documentation in this project are released under the MIT License



~624K SLoC