- Choosing and configuring an inbound email (ingress) provider
- Setting the required environment variables
- Using Mailgun, SendGrid, Mandrill, and local relay servers (Exim, Postfix, Qmail, Postmark)
- Amazon SES
- SendGrid
- Mandrill
- Mailgun
- Exim
- Postfix
- Qmail
- Postmark
1. Configure the ingress service
First, tell Chatwoot which inbound email service (ingress) you are using. This is done via theRAILS_INBOUND_EMAIL_SERVICE environment variable.
Using a local relay (Postfix / Exim / Qmail / Postmark)
If you are using a local MTA (for example Postfix) for both inbound relaying and outbound email, and you do not want to use SMTP authentication (SASL) — which is common when the server only handles its own mail — you need to adjust your outbound SMTP configuration. By default, Action Mailer will try to use SMTP authentication if the following environment variables are present:SMTP_AUTHENTICATIONSMTP_USERNAMESMTP_PASSWORD
- Remove or comment out these variables from your
.envfile. - Ensure that your local MTA is correctly configured to send outbound mail.
⚠️ Important: Running your own mail server comes with deliverability and security responsibilities:
- Many ISPs block or restrict email servers on their networks.
- Configure proper DNS records (SPF, DKIM, DMARC) so that your emails are accepted by recipients and do not land in spam.
2. Configure ingress authentication
Next, set the corresponding credentials for the ingress provider you’re using.3. Provider-specific configuration
Amazon SES
If you are using Amazon SES as your email provider, you have configure the ingress provider asses and set the ACTION_MAILBOX_SES_SNS_TOPIC to the SNS topic ARN of your SES account.
See more details here.
Mailgun
If you are using Mailgun as your email provider:- In your DNS, configure the MX records for your domain to point to Mailgun.
- In the Mailgun dashboard, configure routing so that inbound emails are forwarded to:
example.com with the domain where your Chatwoot installation is hosted.
Getting the Mailgun ingress signing key
You can find the signing key in your Mailgun dashboard and set it asMAILGUN_INGRESS_SIGNING_KEY.

SendGrid
If you are using SendGrid:- Configure MX records for your domain (
your-domain.com) to point to SendGrid. - In the SendGrid dashboard, set up Inbound Parse to forward inbound emails to the Action Mailbox endpoint.
- Replace
PASSWORDwith the value ofRAILS_INBOUND_EMAIL_PASSWORD. - Replace
example.comwith your Chatwoot host.
✅ Required: When configuring the SendGrid Inbound Parse webhook, enable the option: “Post the raw, full MIME message”. Action Mailbox must receive the raw MIME message to correctly parse and process the email.See a detailed guide on how to configure SendGrid Inbound Parse.
Mandrill
If you are using Mandrill as your email service:- Configure your domain’s MX records to point to Mandrill.
- In the Mandrill dashboard, configure an inbound route that forwards emails to:
example.com with the domain where your Chatwoot installation is hosted.
Set MANDRILL_INGRESS_API_KEY with the appropriate API key from Mandrill.
4. IMAP via getmail
If you already have an IMAP mailbox (for example on your own mail server or with a provider that doesn’t directly support Action Mailbox), you can still feed emails into Chatwoot using getmail6 and the Action Mailbox HTTP ingress.How Action Mailbox ingress works
Action Mailbox exposes HTTP endpoints for each ingress type. They are defined in the Rails source and can also be used directly. Example using the Rails rake task:my_incoming_message (an RFC 822 compliant message) into a Chatwoot instance running on localhost.
Calling the HTTP endpoint directly
Instead of using the Rake task, you can call the ingress HTTP endpoint directly viacurl.
Using getmail6 with IMAP
getmail6 can retrieve emails from an IMAP mailbox and pipe them into thecurl script above.
If the script is stored at /home/chatwoot/bin/import_mail_to_chatwoot, a minimal getmail configuration might look like this:
Scheduling mail retrieval
To continuously import mail into Chatwoot, you need to rungetmail regularly. Common options:
- Use
cronto rungetmailat a fixed interval (for example every minute). - For IMAP, you can use:

