Files
plunk/apps/wiki/content/docs/self-hosting/email-setup.mdx
T
2025-12-07 13:36:31 +01:00

93 lines
2.3 KiB
Plaintext

---
title: AWS SES Setup
description: Configure email delivery
---
## 1. Create IAM User
1. Go to IAM Console → Users → Create user
2. Name: `plunk-ses`
3. Attach a custom policy with required permissions (see below)
4. Create access keys → Save credentials
### Required IAM Policy
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ses:SetIdentityMailFromDomain",
"ses:GetIdentityDkimAttributes",
"ses:SendRawEmail",
"ses:GetIdentityVerificationAttributes",
"ses:VerifyDomainDkim",
"ses:ListIdentities",
"ses:SetIdentityFeedbackForwardingEnabled"
],
"Resource": "*"
}
]
}
```
## 2. Request Production Access
SES starts in sandbox mode (verified addresses only).
1. Go to SES Console
2. Click "Request production access"
3. Wait for approval (24-48 hours)
## 3. Verify Domain
1. SES Console → Verified Identities → Create identity
2. Choose "Domain" → Enter your domain
3. Add DNS records provided by AWS
4. Wait for verification
## 4. Enable DKIM (Recommended)
1. SES Console → Verified Identities → Your domain
2. Enable "Easy DKIM"
3. Add the 3 CNAME records to your DNS
## 5. Create SNS Topic
1. Go to SNS Console → Topics → Create topic
2. Type: Standard
3. Name: `plunk-ses-events`
4. Create topic
5. Create subscription:
- Protocol: HTTPS
- Endpoint: `https://api.yourdomain.com/webhooks/sns`
6. Plunk automatically confirms the subscription. If it fails, check your logs for the confirmation URL.
## 6. Create Configuration Sets
### Tracking Configuration Set
1. SES Console → Configuration sets → Create set
2. Name: `plunk-tracking`
3. Add event destination:
- Name: `sns-events`
- Event types: **Sends, Deliveries, Opens, Clicks, Bounces, Complaints**
- Destination: SNS → Select `plunk-ses-events` topic
### No-Tracking Configuration Set
1. Create another set named `plunk-no-tracking`
2. Add event destination with only: **Sends, Deliveries, Bounces, Complaints**
## 7. Configure Environment
```bash
AWS_SES_REGION="us-east-1"
AWS_SES_ACCESS_KEY_ID="your-access-key"
AWS_SES_SECRET_ACCESS_KEY="your-secret-key"
SES_CONFIGURATION_SET="plunk-tracking"
SES_CONFIGURATION_SET_NO_TRACKING="plunk-no-tracking"
```