Email Routing
Email Routing
Section titled “Email Routing”Connect a support email address to DeskFork using Cloudflare Email Routing. Inbound emails are parsed, threaded, and converted into tickets automatically.
Prerequisites
Section titled “Prerequisites”- Your domain must use Cloudflare DNS
- Cloudflare Email Routing must be enabled on your zone
Step 1 — Add email inbox
Section titled “Step 1 — Add email inbox”Settings → Inboxes → Add inbox → Email
Enter the email address you want to receive support emails (e.g. support@yourdomain.com).
DeskFork will display an MX record and a routing rule to add in your Cloudflare dashboard.
Step 2 — Configure Cloudflare Email Routing
Section titled “Step 2 — Configure Cloudflare Email Routing”- Go to Cloudflare Dashboard → Email → Email Routing
- Add a Custom address rule:
support@yourdomain.com→ forward to your DeskFork routing address - Verify the address
How threading works
Section titled “How threading works”DeskFork threads email replies using standard email headers in order of priority:
In-Reply-To/Referencesheaders → exact ticket match- Subject line prefix
[TKT-XXXX]→ ticket number match - Fallback: same sender + subject within a 72-hour window
If none of the above match, a new ticket is created.
Inbound email security
Section titled “Inbound email security”DeskFork verifies SPF/DKIM on inbound email:
| Verification result | Action |
|---|---|
| SPF + DKIM pass | Normal ticket creation |
| SPF pass, DKIM fail | Ticket created with ⚠️ DKIM failed warning label |
| SPF fail | Ticket created with 🚨 Possible spoofing label; auto-response disabled |
| Both fail | Ticket quarantined; no auto-response or AI triage |
Sending replies
Section titled “Sending replies”When an agent replies to an email ticket, DeskFork sends the reply via Resend using your configured From address. Set up your sending domain under Settings → Inboxes → [inbox] → Outbound email.
MIME and encoding
Section titled “MIME and encoding”DeskFork handles:
- Multipart MIME messages (text/plain + text/html)
- Base64 and quoted-printable encoded bodies
- Legacy encodings (EUC-KR, ISO-2022-JP) decoded to UTF-8
- Attachments (uploaded to R2, served via Worker auth proxy)
File attachments
Section titled “File attachments”Attachments on inbound email are stored in R2 and served via authenticated Worker proxy. They are never publicly accessible. The maximum attachment size is 25 MB per file; 100 MB per ticket.