Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harryzcy/mailbox
Versatile email infrastructure on AWS serverless
https://github.com/harryzcy/mailbox
api aws aws-apigateway aws-dynamodb aws-lambda aws-s3 aws-ses aws-sqs go mailbox mailbox-service self-hosted serverless
Last synced: 3 months ago
JSON representation
Versatile email infrastructure on AWS serverless
- Host: GitHub
- URL: https://github.com/harryzcy/mailbox
- Owner: harryzcy
- License: mit
- Created: 2021-01-01T15:41:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-14T16:42:49.000Z (3 months ago)
- Last Synced: 2024-11-14T17:35:33.918Z (3 months ago)
- Topics: api, aws, aws-apigateway, aws-dynamodb, aws-lambda, aws-s3, aws-ses, aws-sqs, go, mailbox, mailbox-service, self-hosted, serverless
- Language: Go
- Homepage:
- Size: 1.16 MB
- Stars: 246
- Watchers: 4
- Forks: 15
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Mailbox
[](https://github.com/harryzcy/mailbox/actions)
[](https://codecov.io/gh/harryzcy/mailbox)
[](https://goreportcard.com/report/github.com/harryzcy/mailbox)
[](http://makeapullrequest.com)
[](https://opensource.org/licenses/MIT)Docs: [English](README.md) • [简体中文](README_zh.md)
Versatile email infrastructure that operates on AWS.
## Clients
### Web
See [mailbox-browser](https://github.com/harryzcy/mailbox-browser)
| Dark mode | Light mode |
|:---------:|:-----------:|
|  |  |### CLI
```bash
go install github.com/harryzcy/mailbox-cli
```For details, refer to [mailbox-cli](https://github.com/harryzcy/mailbox-cli)
## Deploy
1. Clone the repository.
```shell
git clone https://github.com/harryzcy/mailbox
```1. Install [serverless](https://github.com/serverless/serverless).
```shell
npm install -g serverless@v3
```1. Create an IAM user.
Create an IAM user with AdministratorAccess and export the access key as environment variables.
```shell
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
```In production, setup the IAM user following [this guide from serverless](https://www.serverless.com/framework/docs/providers/aws/guide/credentials).
1. Setup AWS services.
Manually create S3 buckets, and setup SES and SQS (optional) from AWS console.
1. Copy over example configurations and fill in correct fields.
```shell
cp serverless.yml.example serverless.yml
```Under `provider.environment` section, modify `REGION`, `S3_BUCKET`, `SQS_QUEUE` (optional, only if SQS should be enabled).
1. Deploy the app.
```shell
make deploy
```1. 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`.1. Deploy [mailbox-browser](https://github.com/harryzcy/mailbox-browser) or use [mailbox-cli](https://github.com/harryzcy/mailbox-cli).
## API
See [doc/API.md](doc/api.md)
## Architecture
It runs on AWS services, including SES, Lambda, API Gateway, DynamoDB, and SQS.

## Contributing
### Development environment
- Go >= 1.22
Note that only the two most recent minor versions of Go are officially supported.