mailbox

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2022 License: MIT

README

Mailbox

Actions Status codecov Go Report Card PRs Welcome

Docs: English简体中文

Mailbox is a serverless application that receives emails and triggers custom events.

It runs on AWS services, including SES, Lambda, API Gateway, DynamoDB, and SQS.

Table of Contents

Usage

  1. Clone the repository.

    git clone https://github.com/harryzcy/mailbox
    
  2. Install serverless.

    npm install -g serverless
    
  3. Create an IAM user.

    Create an IAM user with AdministratorAccess and export the access key as environment variables.

    export AWS_ACCESS_KEY_ID=<your-key-here>
    export AWS_SECRET_ACCESS_KEY=<your-secret-key-here>
    

    For more details, follow this guide.

  4. Setup AWS services.

    Manually create S3 buckets, and setup SES and SQS (optional) from AWS console.

  5. Run Quick Start script to set up configurations.

    ./script/quickstart.sh
    
  6. Deploy the app.

    make deploy
    
  7. Configure email receiving.

    From AWS console -> Configuration -> Email receiving -> Create rule set -> Create rule, add two actions:

    1. Deliver to Amazon S3 bucket, then enter your bucket name.
    2. Invoke AWS Lambda function, and select mailbox-dev-emailReceive or mailbox-prod-emailReceive.

API

See doc/API.md

CLI

go install github.com/harryzcy/mailbox-cli

For details, refer to mailbox-cli

Architecture

Architecture

Contributing

Development environment
  • Go >= 1.17

Note that the two most recent minor versions of Go are officially supported.

Go versions newer than 1.15 may be supported, but be sure to change go version in go.mod since there is a behavioral change of go modules starting from version 1.17.

TODOs

  • Support API access controls
  • Support sending emails

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL