Why Use Inbound Domains?
Inbound domains let your application participate in two-way email communication:- Capture replies: Feed replies to transactional emails (such as order confirmations or password resets) back into your system
- Trigger workflows: Process incoming mail in your handler to create support tickets, update CRM records, or route messages to the right team
- Real-time delivery: Every received email is posted to your forwarding URL, so you can react in real time without polling
- Any address works: Mail sent to any address at the domain is forwarded, so you can build dedicated inboxes (like
support@inbound.yourcompany.com) or per-record addresses without creating them first
How Inbound Email Works
- A sender emails
support@inbound.yourcompany.com - Their email server looks up MX records for
inbound.yourcompany.com - MX records point to Lettr’s mail servers
- Lettr receives the email
- Lettr posts the email to your domain’s forwarding URL as JSON, including the full raw MIME message
Adding an Inbound Domain
Via Dashboard
1
Navigate to Inbound Domains
Go to Domains → Inbound in your dashboard.
2
Create the Domain
Click Create Inbound Domain (New Inbound Domain once you already have one) and enter your domain name. A subdomain such as
inbound.example.com is strongly recommended, so your root domain keeps its existing mailbox provider.3
Enter a Forwarding URL
Enter the Forwarding URL that should receive mail sent to this domain (a full
http:// or https:// address), and optionally an Auth token. The token is sent to your endpoint in the X-MessageSystems-Webhook-Token header so you can verify each request. Click Create Inbound Domain.4
Add MX Records
Add the provided MX records to your DNS. These tell email servers to route mail to Lettr. If your DNS is hosted on Cloudflare, you can click Configure with Cloudflare on the domain’s page to add them automatically.
5
Verify Domain
Click Verify MX Records on the domain’s page to confirm MX record configuration.
Try it in the app
Follow an interactive walkthrough of this guide inside Lettr.
Forwarding URL Test
The forwarding URL is required and is tested before the domain is created: SparkPost, the mail infrastructure behind Lettr’s inbound servers, sends aPOST request to it and needs a 2xx response. If your endpoint rejects the test, the dashboard shows the status it returned (for example “Your forwarding URL answered SparkPost with HTTP 403”) and the domain is not created.
Inbound domains are managed through the Lettr dashboard. API endpoints for inbound domains are not currently available. The Lettr MCP server can list your inbound domains but not create or change them.
DNS Configuration
Add these MX records to your domain’s DNS settings:
All three records are required.
If using a subdomain like
mail.example.com, set the Host/Name field to mail instead of @.Understanding MX Priority
All three MX records use the same priority (10), which means email servers will distribute delivery across all three servers equally. If one server is unavailable, senders automatically try the others.Verifying Your Inbound Domain
Via Dashboard
- Go to Domains → Inbound and open your domain
- Click Verify MX Records
- Lettr checks that all MX records are configured correctly
Inbound Domain Status
Each inbound domain shows one status: either it is receiving mail, or what is missing. The Inbound Domains list shows:
A domain can show both problems at once. On the domain’s page, the same verdict reads This domain is receiving mail or This domain is not receiving mail yet, with each missing piece listed.
Mail Forwarding
Every inbound domain’s page has a Mail Forwarding card showing where its mail is delivered. Use it to add or change the Forwarding URL and Auth token, then click Save forwarding URL. The new URL is tested before it is saved. Leave Auth token blank to keep the token already set.Inbound domains created before forwarding URLs were required have none, so their mail is accepted and then discarded. Their Mail Forwarding card shows Not configured until you add a URL.
Using Subdomains
We recommend using a subdomain for inbound email to separate it from your main domain’s email:Processing Inbound Emails
Forwarding URL Payload
Each email sent to the domain is posted to your forwarding URL as a JSON array of events (one request can carry more than one email), each holding anmsys.relay_message object:
email_rfc822, which you parse with a MIME library. If you set an auth token, it arrives in the X-MessageSystems-Webhook-Token header. See Email Parsing for a breakdown of each field and Attachments for extracting files.
Delete an Inbound Domain
Via Dashboard
- Go to Domains → Inbound
- Find the domain and click its delete (trash) icon
- Type the domain name to confirm, then click Delete Inbound Domain
Use Cases
Reply Tracking
Capture replies to transactional emails:- Set up
reply.example.comas an inbound domain - Send emails with
reply_to: reply+{ticket_id}@reply.example.com - Receive the reply at your forwarding URL when the customer replies
- Read the ticket ID from the recipient address (
rcpt_to) to match the original email
Support Ticketing
Create a support email system:- Set up
support.example.comas an inbound domain - Point its forwarding URL at your ticketing endpoint
- Create tickets in your system from email content
- Use the
Message-ID,In-Reply-To, andReferencesheaders to track conversation threads
Data Extraction
Extract structured data from incoming emails:- Receive order confirmations, receipts, or notifications
- Read the content posted to your forwarding URL (
text,html, or the rawemail_rfc822) - Extract relevant data in your handler and store it in your database
Troubleshooting
MX records not verified
MX records not verified
- DNS changes can take up to 48 hours to propagate
- Verify all three MX records are added with correct priorities
- Use a tool like MXToolbox to check your MX records
- Ensure no conflicting MX records exist
Emails not being received
Emails not being received
- Confirm the domain shows Receiving mail in the dashboard. If it shows No forwarding URL, add one on the domain’s Mail Forwarding card.
- Verify your forwarding URL is reachable and returns a
2xxstatus - Check that your firewall or WAF isn’t blocking server-to-server
POSTrequests to the forwarding URL - Lettr doesn’t filter inbound mail, so check your handler’s logs for requests it received but rejected, discarded, or failed to process
Forwarding URL rejected when creating the domain
Forwarding URL rejected when creating the domain
- The dashboard shows the HTTP status your endpoint returned to the test request, and the domain is not created
- Make sure the endpoint accepts
POSTrequests and returns a2xxstatus - If it sits behind Cloudflare or another WAF, allow server-to-server
POSTrequests on that path - SparkPost publishes no fixed source IPs, so don’t rely on an IP allowlist. Use the auth token instead.
Partial MX records detected
Partial MX records detected
- All three MX servers must be configured
- Check for typos in server hostnames
- Ensure all three records have priority 10
Conflict with existing email provider
Conflict with existing email provider
- Use a subdomain instead of your root domain
- You can only have one set of MX records per domain/subdomain
- Consider using
mail.example.comwhile keepingexample.comwith your current provider
Best Practices
- Use subdomains - Keep inbound separate from your main email
- Test your forwarding URL early - Make sure your endpoint receives inbound mail before going live
- Handle attachments carefully - Validate and scan files you extract from
email_rfc822 - Handle spam yourself - Lettr doesn’t filter inbound mail, so add your own checks in your handler
- Test with multiple senders - Verify emails arrive from various email providers
Related Topics
Sending Domains
Configure domains for sending
Inbound Setup
Forwarding URL and MX setup step by step
Inbound
Learn about inbound email
Tracking Domains
Custom tracking domains