-
Notifications
You must be signed in to change notification settings - Fork 15
Multi Tenancy Email Routing
Part of the Multi-tenancy section. Built β live on the
multi-tenancybranch. See the progress tracker.
When a multi-tenant install receives an email, it has to decide which company the ticket belongs to. This page explains how β and how it bends to very different ways of working. Everything below is now implemented (the only routing piece still to come is a per-company outbound reply identity override; replies already go out from the mailbox the ticket arrived on).
Each company registers the email domains it owns β acme.com, and maybe also acme.co.uk. A company can own several domains. Mailboxes do not own domains; companies do.
This is the heart of it β and a perfect example of flexibility living in the entity rather than a global switch. Each mailbox is set up as one of:
- You assign the mailbox to a specific company (and optionally a department).
- The mailbox decides the company. The sender's address is irrelevant β everything arriving here belongs to that company.
- It's also the reply identity: replies to its tickets go back out from this mailbox, so the client sees their own helpdesk end to end.
- Great for: a single company's own helpdesk, or an MSP that dedicates a separate inbox to each client.
- The mailbox is not pinned to a company.
- An arriving email is filed by matching the sender's domain against the companies' registered domains (
someone@acme.comβ Acme). - An unmatched sender drops into the triage queue (below) β never lost.
- Great for: an MSP running a single professional address like
support@themsp.comfor all clients. This is the recommended default for MSPs.
A ticket remembers which mailbox it came in on, and replies always go back out from that same mailbox β the mailbox is the company's email identity, both inbound and outbound.
A company isn't locked into "one mode". Acme might receive most mail via the shared support@themsp.com and have a dedicated helpdesk-acme@themsp.com for VIPs. Both feed Acme. That's exactly why the pinned-vs-shared choice lives on the mailbox, not on the company.
- Is it a reply to an existing ticket? β it joins that ticket and inherits its company. (A thread stays glued to one company even if someone replies from a different address.)
- Did it arrive in a pinned mailbox? β that mailbox's company. Sender ignored.
-
It arrived in a shared intake β most-specific match wins:
-
The exact sender address is mapped to a company (e.g.
jane@gmail.comβ Acme) β that company. Checked before the domain, so a personal/webmail address can still reach the right company. - otherwise the sender's domain is matched to a company (
someone@acme.comβ Acme) β that company. - no match β triage.
-
The exact sender address is mapped to a company (e.g.
In a single-company install only step 2 ever fires, which is why none of this is visible until you add a second company.
When a shared-intake email matches no company domain, it lands in a Triage / Unassigned queue rather than vanishing. From there an analyst can, in one click:
- Create a new company from this domain β and the queued email (plus any others from that domain) is filed under it, with all future mail auto-routing from then on.
- Assign it to an existing company β e.g. a client that just started using a new domain.
Mapping a domain sweeps both ways: it re-files every queued email already waiting from that domain and auto-routes future mail.
Addresses like gmail.com or outlook.com also land in triage β and you should never map a free-email domain to a company (two different clients will both have users on Gmail). In the queue these are tagged Public email and the "route this domain" option is hidden. Instead you get a freemail-safe alternative: "always file mail from this address here", which maps that one exact address to the company (sweeping its other queued mail and auto-routing its future mail) while leaving everyone else on Gmail untouched. See Pitfalls.
The triage queue is reached from the company switcher in the header, which shows a count badge when mail is waiting.
Beyond whole domains, each company can list specific sender addresses (under System β Companies). This is the address-level twin of domain registration, and it's matched before the domain. It exists for the case domains can't cover: a freelancer or micro-client emailing from a personal address (jane@gmail.com) β that one address routes to their company, even though gmail.com itself can never be mapped. You can set these up directly on the company, or create them with one click from the triage queue (above).
The built-in list of public providers (Gmail, Outlook, Yahoo, iCloud, β¦) is what stops those domains being mapped. If your clients use a regional ISP or webmail host that isn't built in, an admin can add it on System β Companies ("Public email domains") so it's treated the same way. The list is add-only β the built-in providers are locked and can never be un-protected.
Two read-only tools help you see what will happen, without sending anything:
- "How email reaches this company" β on each company's editor (System β Companies), a derived summary of every way mail reaches that company (which pinned mailboxes, which shared intakes, the domains and addresses they match), with warnings for half-configured routes.
- Email routing test (System β Email routing test) β pick a mailbox, type a sender address, and it shows exactly which company a new ticket would land in (or that it'd go to triage) and which rule decided it. It creates nothing; it runs the real routing logic so it can't drift from live behaviour.
FreeITSM β an open-source IT Service Management platform Β· github.com/edmozley/freeitsm Β· MIT licence
- Installation
- β° Scheduled tasks (cron jobs)
- Architecture
- AI Providers
- Internationalisation (i18n)
- Timezones & Time Handling
- Theming & Dark Mode
- β¨οΈ Command palette (βK)
- π Searching inside tickets
- π Attached documents
- MobileβFriendly
-
Security
- Layer 1 β which modules you can enter
- β³ π§© Module Access Control
- β³ π οΈ Module Access β Developer Guide
- Layer 2 β what you can administer
- β³ π Roles & Permissions
- β³ π οΈ Roles β Developer Guide
- β³ π€ Why capabilities are constants
- Layer 3 β the System module
- β³ π Admin Access Control
- Hardening
- β³ π Security review response 2026-08
- β³ π‘οΈ Security hardening 2026-08
- β³ π οΈ Security hardening 2026-08 β Developer Guide
- β³ π‘οΈ Round three β plain English
- β³ π οΈ Round three β Developer Guide
- Single Sign-On (SSO)
- ποΈ LDAP & Active Directory
- Browser Extension
- API Reference
-
π REST API β how it works
- β³ π« REST API: Tickets
- β³ π» REST API: Assets
- β³ π΄ REST API: Problems
- β³ π REST API: Changes
- β³ π REST API: Knowledge
- β³ β REST API: Tasks
- β³ ποΈ REST API: CMDB
- β³ π REST API: Contracts
- β³ ποΈ REST API: Calendar
- β³ πΏ REST API: Software
- β³ π¦ REST API: Service Status
- β³ βοΈ REST API: Morning Checks
- β³ π REST API: Forms
- β³ βοΈ REST API: Workflow
- β³ πΊοΈ REST API: Network Mapper
- β³ π§ Using the API docs page
- β³ π OpenAPI specification
- β³ β OpenAPI: kept correct
- β³ π οΈ Maintaining the catalogue
- Watchtower
-
Tickets
- β³ Mailbox Authentication
- β³ π€ Email send log
- β³ Basic IMAP mailboxes
- β³ Email rendering & images
- β³ SLA Management
- β³ WhatsApp channel
- β³ π¬ Web chat channel
- β³ π£ Slack channel
- β³ π Linking tickets
- β³ ποΈ Canned responses
- β³ βοΈ Limiting replies to particular senders
- β³ βοΈ Email signatures
- β³ π The public web address
- β³ π Raising a ticket for someone else
- β³ π Merging tickets
- β³ β Splitting tickets
- β³ β Selecting several tickets
- β³ π οΈ Snoozing tickets β Developer Guide
- β³ π₯ Collision detection
- β³ β±οΈ Time tracking
- Problem Management
- Tasks
- Assets
- Knowledge
- Change Management
- Calendar
- Morning Checks
- Reporting
- Software
- Forms
- Contracts
- Service Status
- π Notifications
- π¨ War Room
- Self-Service Portal
- LMS
- Process Mapper
- CMDB
- Network Mapper
- Workflows
- Issue trackers (Jira, Azure DevOps)
- System
-
Overview
- β³ π Progress tracker
- β³ Concepts & vocabulary
- β³ Email routing & mailboxes
- β³ Settings: global vs per-company
- β³ Users & self-service
- β³ Staff cross-company access
- β³ Worked examples
- β³ Pitfalls & gotchas
- β³ Scope: what it's for
- β³ π οΈ Developer Guide (make a module multi-company)
- β³ ποΈ Case study: CMDB (a linked graph)
- β³ π§ͺ Test harness (prove it's isolated)