Email routing.
Concierge provides managed email subdomains with smart routing. Each tenant gets one or more subdomains (e.g., acme.cncg.email) provisioned automatically. Inbound emails are matched against configurable routing rules and actions are executed automatically.
Getting Started
- Go to Email Routing in the admin panel
- Enter a subdomain name (e.g.,
acme): this createsacme.cncg.email - You'll be redirected to Razorpay to complete payment (₹199/$2 per subdomain per month)
- Once payment confirms, MX records are provisioned automatically and your subdomain goes live
- Any email to
*@acme.cncg.emailis now processed by your routing rules - Set up routing rules to forward, relay to Discord, or auto-reply with AI
Billing plans are created automatically based on the number of subdomains and currency. No manual configuration needed.
How It Works
- An email arrives at any address on your subdomain (e.g.,
support@acme.cncg.email) - Cloudflare Email Routing triggers the Worker's
email()handler - The recipient domain is extracted and mapped to a tenant via a KV index
- The email is parsed (subject, body, attachments)
- A loop-detection header (
X-EmailProxy-Forwarded) is checked - Routing rules for that subdomain are evaluated in priority order
- The highest-priority matching rule's action is executed
- If no rule matches, the subdomain's default action is used (defaults to Drop)
- The action is logged to the
email_messagestable andemail_metricscounters
Subdomains
Each tenant can have multiple email subdomains. A subdomain represents a catch-all email endpoint under the operator's email zone. Subdomains are managed via the web admin panel.
- Pricing: ₹199/$2 per subdomain per month (recurring via Razorpay)
- Provisioning: MX records are created automatically when you add a subdomain
- Suspension: If payment fails, the subdomain is suspended and MX records are removed
- Deletion: Removes MX records, cancels subscription, and clears all rules
Each subdomain has a default action that applies when no routing rule matches. The default is Drop (silently discard).
Subdomain Naming Rules
- 3–63 characters
- Letters, numbers, and hyphens only
- Cannot start or end with a hyphen
- Reserved names (
www,mail,admin,api, etc.) are blocked - Must be globally unique across all tenants
Routing Rules
Rules are per-domain, evaluated in priority order (highest priority wins). Each rule has:
| Field | Description |
|---|---|
name | Human-readable label |
priority | Integer priority (higher = evaluated later, wins over lower) |
enabled | Toggle on/off without deleting |
criteria | Match conditions (see below) |
action | What to do when the rule matches |
Match Criteria (Glob Patterns)
Rules match using glob patterns with * (any sequence) and ? (single character). Matching is case-insensitive. All specified criteria must match (AND logic). Omitted criteria match everything.
| Criterion | Description | Example |
|---|---|---|
from_pattern | Sender email address | *@newsletter.com |
to_pattern | Recipient email address | support+*@example.com |
subject_pattern | Email subject line | *invoice* |
body_pattern | Plain-text body content | *unsubscribe* |
has_attachment | Whether the email has attachments | true or false |
Pattern Examples
*: matches everything*@example.com: any address at example.com*@*.example.com: any subdomain of example.comsupport+*@example.com: plus-addressed support emails*invoice*: subject or body containing "invoice"
Actions
| Action | Description |
|---|---|
| Drop | Silently discard the email. Nothing is sent back. |
| Spam | Reject the email with an optional message. The sender's MTA receives the rejection. |
| Forward Email | Forward to a destination email address. A reverse-alias is generated for reply routing (see below). |
| Forward Discord | Post the email content to a Discord channel as an embed. The email is consumed (not forwarded via SMTP). |
| AI Reply | Generate an AI draft reply using Workers AI, then post it to a Discord channel for human approval before sending. |
Reverse-Alias Reply Routing
When an email is forwarded via the Forward Email action, Concierge generates a unique reverse-alias address on the subdomain (e.g., reply+abc123@acme.cncg.email). This alias is used as the From address in the forwarded email.
When the recipient replies to the forwarded email, their reply goes to the reverse-alias address. Concierge looks up the alias, finds the original sender, and forwards the reply back to them, making the conversation appear seamless.
- Email from
alice@external.comtosupport@acme.cncg.email - Concierge forwards to
you@personal.comwith From:reply+abc123@acme.cncg.email - You reply to
reply+abc123@acme.cncg.email - Concierge forwards your reply back to
alice@external.comwith From:support@acme.cncg.email
AI Reply with Approval
The AI Reply action generates a draft response using Cloudflare Workers AI. The draft is not sent automatically; it is posted to a Discord channel for human approval with Approve and Reject buttons.
- Approve: sends the AI-generated draft to the original sender
- Reject: discards the draft
- You can also click Reply to write a custom response instead of using the draft
The AI Reply action supports an optional system_prompt to customize the AI's behavior for specific types of emails.
Managing Rules
Rules are managed via the web admin panel. Each subdomain has its own rules page with full CRUD.
Use Discord /domains list to view your subdomains and their status.
Outbound Delivery (Email Service)
Concierge forwards to arbitrary recipients, so the sender domain must be onboarded to Cloudflare Email Service. Onboard each email base domain in the dashboard under Email → Email Sending → Onboard Domain; Cloudflare adds SPF/DKIM/DMARC records on a dedicated cf-bounce.<your-domain> subdomain.
Outbound goes through the send_email binding using Email Service's structured API. Forwarded messages carry the parsed subject, text, html, a Reply-To set to the reverse-alias, threading headers (In-Reply-To, References), and the loop-detection header.
Loop Detection
Concierge adds an X-EmailProxy-Forwarded header to forwarded emails. If an inbound email already has this header, it is rejected to prevent forwarding loops.
Metrics
Email actions are tracked in the email_metrics table, aggregated by domain, rule, date, and action type. View them via the /status Discord command or the management panel.