Skip to content

Commit 0532265

Browse files
authored
chore: Add the documentation for SES Ingress (#556)
1 parent dfd7db8 commit 0532265

8 files changed

Lines changed: 149 additions & 0 deletions

File tree

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"pages": [
118118
"self-hosted/configuration/features/email-channel/conversation-continuity",
119119
"self-hosted/configuration/features/email-channel/conversation-continuity-using-sendgrid",
120+
"self-hosted/configuration/features/email-channel/amazon-ses-ingress",
120121
"self-hosted/configuration/features/email-channel/setup",
121122
"self-hosted/configuration/features/email-channel/azure-app-setup",
122123
"self-hosted/configuration/features/email-channel/google-workspace-setup"
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
title: Configuring Amazon SES as an Ingress Provider for Chatwoot
3+
description: Guide to setting up conversation continuity, inbound emails with Amazon SES
4+
sidebarTitle: SES Ingress
5+
---
6+
7+
This guide explains how to set up Amazon SES as the incoming email (ingress) provider for your self-hosted Chatwoot installation. If you plan to use Chatwoot’s email forwarding option and want SES to handle inbound mail delivery into Chatwoot, this documentation is for you.
8+
9+
10+
### Who is this for?
11+
12+
This setup is intended for:
13+
14+
- Teams running self‑hosted Chatwoot.
15+
- Users who want to use Amazon SES to receive inbound emails.
16+
- Workspaces that want to configure forwarding rules rather than using IMAP/OAuth connections to bring emails into Chatwoot.
17+
18+
If you are using Chatwoot Cloud, you do not need this setup.
19+
20+
### Architecture
21+
22+
At a high level, the flow looks like this:
23+
24+
![Architecture](./images/ses-ingress-architecture.png)
25+
26+
1. An email is sent to your domain (e.g., support@yourdomain.com).
27+
2. Amazon SES receives the email.
28+
3. SES forwards the message to an SNS Topic.
29+
4. SNS publishes the message payload to a Chatwoot email ingress endpoint.
30+
5. Chatwoot processes the payload and creates/updates a conversation.
31+
32+
### Prerequisites
33+
34+
Before you begin, you should have:
35+
36+
- Access to AWS SES, SNS, Route53 (or your DNS provider).
37+
- A self‑hosted Chatwoot installation reachable over HTTPS.
38+
39+
### Step 1: Verify Your Domain in Amazon SES
40+
41+
Amazon SES must verify that you own the domain before it can receive mail.
42+
43+
1. Log in to AWS Console → SES → Identities.
44+
2. Click Create Identity.
45+
3. Choose Domain.
46+
4. Enter the domain you want to receive email for.
47+
5. Amazon SES will show DNS records you must add:
48+
- DKIM (CNAME) records
49+
- SPF (TXT) record
50+
- DMARC (TXT) record (optional but recommended)
51+
6. Add all records to your DNS provider.
52+
7. Wait for the identity status to become verified.
53+
54+
### Step 2: Configure MX Records to Route Email to SES
55+
56+
SES must become the inbound email handler for your domain.
57+
58+
1. In SES, open Configuration → Email Receiving.
59+
2. Locate the MX record value for your region (example: 10 inbound-smtp.us-east-1.amazonaws.com).
60+
3. Go to your DNS provider.
61+
4. Add an MX record:
62+
- Priority: 10
63+
- Value: `inbound-smtp.<region>.amazonaws.com`
64+
65+
66+
Once this is set, your domain will start routing incoming mail to SES. If you have any doubts about setting this up, read more at [AWS SES documentation](https://docs.aws.amazon.com/ses/latest/dg/receiving-email-setting-up.html).
67+
68+
69+
### Step 3: Configure SES to Publish Inbound Emails to SNS
70+
71+
Chatwoot reads incoming messages via SNS notifications.
72+
73+
Go to SES → Email Receiving → Rule Sets.
74+
75+
![SES Email Receiving](./images/email-receiving.png)
76+
77+
Create a Rule Set if you don’t have one.
78+
79+
![SES Rule Sets](./images/rule-settings.png)
80+
81+
Add a new rule:
82+
- Recipients → Add your inbound email (e.g. support@yourdomain.com) or ignore this field since it would forward every email to SNS (which is better if you have more than one email channel)
83+
- Actions → Publish to Amazon SNS topic
84+
- Select your SNS topic.
85+
- Make sure that you select the Encoding as UTF-8.
86+
87+
![SES Publish to SNS](./images/publish-to-sns.png)
88+
89+
Save and enable the rule.
90+
91+
Note: You don't have to turn on Transport Layer Security (TLS) or Spam and virus scanning for this setup. Now SES will publish every inbound email event to your SNS topic.
92+
93+
94+
### Step 4: Configure Chatwoot Environment Variables
95+
96+
Before creating the SNS subscription, you must configure two environment variables in your Chatwoot installation:
97+
98+
```bash
99+
RAILS_INBOUND_EMAIL_SERVICE=ses
100+
101+
# SNS topic ARN for ActionMailbox (format: arn:aws:sns:region:account-id:topic-name)
102+
# Configure only after you create the SNS topic in AWS
103+
ACTION_MAILBOX_SES_SNS_TOPIC=
104+
```
105+
106+
Why this matters:
107+
Chatwoot needs to know that SES will be used for inbound email. Chatwoot must be ready to valid the SNS topic once the subscription is created.
108+
109+
### Step 5: Create SNS Subscription to Forward to Chatwoot
110+
111+
SNS needs to send the email payload directly to Chatwoot.
112+
113+
Go to SNS → Topics. Open the topic you created. Click Create Subscription.
114+
![SES Create Subscription](./images/create-subscription.png)
115+
116+
117+
Set:
118+
- Protocol: HTTPS
119+
- Endpoint: Your Chatwoot email ingress endpoint `https://chatwoot.example.com/rails/action_mailbox/ses/inbound_emails`
120+
121+
![SES Create Subscription](./images/https-post.png)
122+
123+
Save.
124+
125+
Note: SNS will send a confirmation request. Chatwoot will automatically confirm the subscription.
126+
127+
128+
### Step 6: Add Email Channel in Chatwoot
129+
130+
1. Go to your Chatwoot account. Settings → Inboxes → Add Inbox.
131+
2. Choose Email -> Other Providers.
132+
3. Use any email address from the domain that is configured in SES.
133+
134+
After this you should see incoming email in your inbox.
135+
136+
137+
### Troubleshooting
138+
139+
Emails not appearing in Chatwoot:
140+
- Check SES → SNS → Subscription delivery logs.
141+
- Check SNS subscription status.
142+
- Check Chatwoot logs for any errors.
143+
- Ensure Chatwoot server is reachable publicly.
144+
- Check if MX records propagated.
145+
146+
SNS subscription not confirmed:
147+
- Ensure Chatwoot server is reachable publicly.
148+
- Verify system time and SSL certificates on your server. If you are testing this in local environment, you can use tools like ngrok to expose your Chatwoot server to the internet. Make sure that you are using `openssl<=3.5`.
248 KB
Loading
221 KB
Loading
245 KB
Loading
332 KB
Loading
274 KB
Loading
22.6 KB
Loading

0 commit comments

Comments
 (0)