Routing incoming email into self-hosted Odoo starts with choosing who accepts the mail
Replies from customers and suppliers to Odoo-generated mail should land on the right record without someone forwarding them by hand. The first design decision is which system accepts the incoming message: a mail server that Odoo polls on a schedule, or a mail gateway script that your own mail server calls when a message arrives. Odoo's incoming mail servers are configured in the Technical settings and fetch mail over IMAP or POP3 from a mailbox you name. The gateway path runs the odoo-mailgate script from the mail transfer agent (usually Postfix or Exim), which pushes each message to Odoo over XML-RPC. Both paths end in the same alias routing, so the choice is about infrastructure, not features.
Choose polling when your organization already has a dedicated mailbox per domain or alias, you cannot change the mail server configuration, or the mail team wants Odoo to hold the credentials and fetch on its own schedule. Choose the gateway when you run Postfix or Exim as the authoritative server for the domain, need messages to reach Odoo the moment they arrive, or want catch-all routing that a mailbox poll cannot provide. Polling adds a delay set by the fetch schedule and depends on mailbox access; the gateway depends on the mail server's routing and on Odoo's XML-RPC endpoint being reachable from it. Confirm with your mail administrator which system is authoritative for each domain before you create any alias.
Odoo Community and Enterprise share the same mail routing base, so the edition does not change which path you can use. What does change is hosting: the Odoo pricing page lists on-premise hosting only under the Custom plan, and only Custom includes external API access. Because the gateway script calls Odoo over XML-RPC, confirm with your Odoo contact that your plan and hosting type permit the API access your design needs, and check how the XML-RPC dependency sits with your planned API direction before you build around it. Settle the plan and the accepting system first, then design the aliases and catch-all domain on top.
Which incoming mail option fits which setup
This table compares the two ways Odoo receives mail, the incoming mail servers Odoo polls itself and the mail gateway script fed by Postfix or Exim, along with per-app aliases and a catch-all domain. Read each row against your own mail flow, team skills and number of apps that need inbound mail. The main takeaway is that the choice depends on how many apps receive mail and who will maintain the mail path after go-live.
| Factor | Odoo polls an incoming mail server | Postfix or Exim gateway script |
|---|---|---|
| How mail arrives | Odoo connects to a mailbox on your mail server and fetches messages on a schedule | The mail server hands each message to a gateway script that passes it to Odoo |
| Who maintains it | Odoo administrators, with help from the mail team for the mailbox account | Mail administrators who run Postfix or Exim, plus whoever owns the gateway script |
| Many apps and aliases | Each alias usually needs its own fetchmail entry and mailbox handling, which grows with app count | Routing rules live in the mail server, so many aliases can map to Odoo models in one place |
| Catch-all domain | Harder to run, since polling a shared mailbox can mix unrelated traffic | Suited to catch-all routing when the mail server can direct the whole domain to the gateway |
| Typical failure points | Mailbox credentials expire, polling lags, or the mailbox fills up | Gateway cannot reach Odoo over XML-RPC, script permissions break, or the mail server rejects replies |
| Timing and limits | Confirm polling intervals and mailbox limits in your Odoo version's documentation | Confirm delivery behavior and XML-RPC requirements in your Odoo version's documentation |
| When it fits | A small setup with one or two apps and a mailbox your team can monitor easily | Several apps, a catch-all domain, or an existing Postfix or Exim team that already runs mail routing |
How a reply travels from the mail server into an Odoo record
A reply starts at the sender's mail provider and reaches the domain's MX record, which points to your mail host. From there the message takes one of two paths: Odoo polls a mailbox on an incoming server it was configured with, or the mail host pipes the message to the gateway script, which calls Odoo's RPC interface to create or update the record. Check where aliases and the catch-all domain are matched, and confirm that the trust boundary between the mail host and the Odoo database is what your security team expects.
Two routes from the MX record into Odoo, meeting at alias matching and the RPC layer.
Four decisions that set the mail design before any configuration
Four choices shape how mail reaches Odoo: who controls the domain and mailboxes, how many apps need their own address, what happens to unmatched mail, and whether Odoo can reach the mail host directly. Settle them with your mail administrator first, because each one changes which path is workable.
Who owns the MX and mailboxes
Your mail administrator or a hosted mail provider decides where MX records point and where messages land. If a provider holds the mailboxes, Odoo usually receives copies through polling of an IMAP mailbox, which means you need a dedicated mailbox and credentials the provider permits. If your own servers receive mail, the gateway script can be wired into the Postfix or Exim pipeline. Confirm who can change DNS and who approves new routing rules.
How many apps need an address
Each app that accepts mail, such as Discuss, CRM leads, helpdesk tickets or purchase documents, can use its own alias such as a lead address or a support address. Every alias needs a matching mailbox, DNS entry or routing rule, so ten apps means ten routes to maintain. A single catch-all domain simplifies routing but relies on Odoo matching the recipient correctly. Ask which addresses business teams already publish to customers and suppliers.
Keep or reject unmatched mail
Mail sent to an address Odoo does not recognize can either be rejected at the server during the SMTP conversation or accepted and discarded or quarantined by Odoo. Rejecting protects the database from noise but can bounce a legitimate customer message if an alias was renamed. Keeping unmatched mail gives you a place to review misrouted messages but needs a cleanup process. Decide the policy, the owner who reviews the quarantine, and how long messages are retained.
Direct reach to the mail host
The gateway script on Postfix or Exim hands each message to Odoo through its XML-RPC interface, so the mail host must be able to reach the Odoo server on the network. Polling the mailbox works in the reverse direction, with Odoo connecting out to the IMAP server. Firewall rules, reverse proxies and network segmentation often decide which option is possible. Ask your network team which connections are allowed in each direction and whether the XML-RPC endpoint can be exposed to the mail host.
How aliases per app and a catch-all domain divide incoming mail
Each alias names one destination, and that name decides which Odoo model receives the message. In Odoo, an alias is attached to a model such as a CRM lead, a helpdesk ticket or a project task, so an address like sales@ can create leads while support@ creates tickets. The alias record stores the target model and the default values applied to new records, such as the sales team or the ticket category. Because each address maps to exactly one model, a reviewer can read the alias list and know where any inbound message will land. Confirm which aliases exist, which model each one targets and who owns each record before the mail domain goes live, because a shared or forgotten alias is the most common source of misrouted work.
A catch-all domain sends every address that matches no alias to a single handler, usually a general inbox or a default model. This is simpler to set up, since new addresses work without a configuration change, and it avoids bounces for typos and legacy addresses. The cost is that the catch-all accepts spam, automated mail and misaddressed messages, and someone must triage them. Those messages can create records in the wrong app, consume storage and hide genuine requests. Ask your mail administrator whether the mail server can reject unknown recipients at the SMTP stage, and decide whether a catch-all is needed at all for each domain.
The alias names and the domain policy are business decisions, not technical defaults. Sales, support, finance and HR leaders should agree which addresses exist, who answers each one, what happens to mail that matches nothing, and how long unmatched messages are kept. Record those decisions in the routing design before configuring anything, then test each alias with a message from an outside sender and check that it creates the expected record with the right owner. Revisit the list whenever an app is added or a team changes, because an alias that no longer has an owner tends to become a catch-all by accident.
Setting up incoming email in the order that avoids open relays
This sequence brings incoming mail into Odoo in an order that keeps the mail path closed to outsiders, so each alias is proven to create the right record before any real traffic depends on it. Each step ends with a check that the team can repeat after changes.
Confirm the mail domain and MX records
The network or DNS owner confirms which domain receives mail for Odoo, and that its MX records point to the server or gateway that will accept it. Nothing else should receive mail for that subdomain, so replies are not split between systems. The step is done when a lookup of the MX records returns the intended host and the mail team agrees on the domain that aliases will use. Confirm the exact record handling in your DNS provider's documentation and in the Odoo version-specific documentation for incoming mail.
Decide between Odoo polling and the gateway
The team chooses between Odoo polling an incoming mail server directly and the mail gateway script run by Postfix or Exim, based on who operates the mail host and how many databases receive mail. The decision is written down with the owner of each component, because the gateway path depends on XML-RPC access that must be permitted and secured. The check is a signed decision record that names the path, the mail host, and the person responsible for it. Confirm current XML-RPC behavior and the supported gateway configuration for your Odoo version before you commit.
Create the mailbox or the gateway user
The administrator creates either a dedicated mailbox that Odoo will poll, or a restricted system user that the gateway uses to call Odoo. The account gets only the rights it needs, and its password or key is stored in the secrets process rather than in a shared document. Passing this check means a test login to the mailbox succeeds from the Odoo server, or the gateway user authenticates against the target database and is limited to the mail-creation method. Confirm the authentication options and required permissions in the version-specific Odoo documentation.
Configure the incoming server or gateway
The administrator sets the incoming mail server record in Odoo, or configures the gateway with the target database name and the Odoo address it should call. Only accepted domains and recipients are routed, and the gateway is not left open to relay mail for unknown senders. The step closes when the configuration saves without error and the connection test reports a successful connection to the mailbox or the gateway endpoint. Confirm the configuration keys and the gateway script arguments in the documentation for the Odoo version in use.
Create one alias for each application
The Odoo administrator creates a separate alias for each app that accepts mail, such as sales leads, helpdesk tickets or project tasks, and links each alias to the model it should create. Aliases are named with a clear prefix so that owners can see where each address leads. The check is a list of aliases showing each address, its target model, and its default values, reviewed by the business owner of each app. Confirm the alias options available in your Odoo version, since defaults and model links differ between apps.
Send test messages to each alias
A tester sends one message to each alias from an outside account and then checks that the expected record was created in the correct app with the sender, subject and body preserved. Replies to an existing record are tested separately, so threading is confirmed as well as creation. The step passes when every alias produces exactly one record in the target model and no record lands in a catch-all or wrong app. Record the test results and confirm the expected threading behavior in the Odoo documentation for your version.
Test bounce and unknown address handling
The tester sends mail to an address that does not exist on the accepted domain and confirms that it is rejected or bounced instead of being accepted, stored, or forwarded. The tester also sends from an unknown external sender to a valid alias to confirm the server applies the access rules configured for that alias. The step is complete when unknown recipients are refused, unauthorized senders are handled by the configured policy, and the mail server logs show the rejection. Confirm bounce and sender policy options in your mail server's documentation and the Odoo version-specific alias settings.
What the gateway's XML-RPC dependency means for upgrades
The mail gateway script on Postfix or Exim does not write to the Odoo database directly. It calls Odoo over an RPC interface, so the mail host needs three things that an upgrade can disturb: a working Odoo user account with rights to create records from mail, a network route from the mail host to the Odoo web port, and a copy of the gateway script that matches the Odoo release in use. Each of these is a separate point of failure, and none of them produces an error that a user will see first. The mail server simply accepts the message and the gateway call fails on the way in.
The RPC interface that Odoo documents for external calls has changed across versions, so the gateway's dependency on it must be checked for the exact version you plan to run. Before scheduling an upgrade, confirm in the documentation for both the current and target versions whether the gateway script still uses the interface it relies on, and whether a newer script or a configuration change is required. Keep a record of the script version, the Odoo version it was tested against and the account it authenticates as. Any change to one of these should trigger a mail test.
An upgrade can therefore break incoming mail silently. Replies, leads and tickets may stop arriving while the upgrade report shows success, because the database migrated correctly and the web interface works. Add mail routing to the test plan for the upgraded test database: send a reply to an existing record, create a lead from an alias and open a ticket from a catch-all address, then confirm each record appears in Odoo with the correct owner and thread. Run the same checks on the mail host logs. Treat a passing mail test as a go-live condition, not as an optional check after cutover.
Security risks in incoming mail routing to watch
Incoming mail routing gives the internet a path into your Odoo database, so every gateway, alias and mailbox is part of the attack surface. The cards below cover the risks that most often appear when replies, leads and tickets are routed into Odoo, with the control to put in place and what to confirm in your own environment.
Open relay from a misconfigured gateway
A mail server that accepts mail for any destination can be abused to send spam or phishing through your infrastructure, and this often starts with a relay rule added to make routing work. Restrict the mail server to accept mail only for the Odoo domains and aliases you own, and keep it from forwarding for unknown senders. Confirm with your mail team that the Postfix or Exim configuration has been tested from an outside host, and that your domain does not appear on public blocklists after go-live.
Spoofed replies that create records
Odoo's gateway creates or updates records based on the sender address, so a forged From header can attach a message to a customer's lead or ticket. Check whether your mail flow validates SPF, DKIM and DMARC results before the gateway runs, and decide which models accept mail from unauthenticated senders. Confirm with the Odoo administrator which aliases allow new records from any sender and which ones only accept replies to existing threads.
Catch-all spam filling the database
A catch-all domain sends every address at that domain into Odoo, so bots and misdirected spam can create thousands of leads, tickets or messages that users then have to clear. Use specific aliases for each app, reject unknown local parts at the mail server, and set a review queue for new records created from external senders. Confirm the expected daily volume with the business owner before enabling a catch-all, and check how old spam is purged.
Gateway credentials stored in plain files
The mailbox password used by Odoo's fetchmail poller, or the shared key that the gateway script uses to call Odoo's XML-RPC interface, can end up in shell scripts, cron entries or configuration files readable by other users. Store these secrets in a restricted file owned by the service account, or in your secrets manager, and rotate them when staff change. Confirm that the account used for mail has only the access it needs and that it is not an administrator account in Odoo.
Malicious attachments in inbound mail
Every inbound message can carry attachments that Odoo stores in the filestore and may render in chatter or previews, so a malicious document can reach staff who open it from a record. Decide which file types are accepted, scan attachments with a mail filter or antivirus service before the gateway step, and limit message size at the server. Confirm with your security team where attachment scanning happens and whether scan results are logged against the record.
Gaps in logging for rejected mail
When the gateway rejects a message, or the poller fails silently, there may be no record of who sent what, which leaves incidents and missed customer replies invisible. Log accepted and rejected deliveries at the mail server, keep Odoo's own log lines for gateway errors, and send both to your central log store. Confirm the retention period for mail logs with your compliance owner and test that a deliberately bad message produces a traceable entry.
Questions buyers ask about routing email into Odoo
What drives the cost of routing incoming email into Odoo?
The cost depends mostly on how many mail-driven apps you need, how many aliases and domains are involved, and whether mail must go through a gateway script on a Postfix or Exim host or can be fetched by Odoo itself. Each alias needs a business rule about who owns it and what record it creates, such as a lead, a helpdesk ticket or a reply attached to an existing document. Work also grows with the number of mailboxes that must be reviewed, the DNS and mail server access your team can grant, and the testing needed to confirm replies do not create duplicate or orphaned records. Ask any provider to price these items separately: discovery of mail flows, server and DNS setup, alias design, testing, and handover documentation. Ask which costs are one-time and which recur, such as maintaining the gateway after an Odoo upgrade.
How long does incoming mail routing usually take to set up?
Duration depends on how many aliases, apps and mail domains are in scope, and on how quickly your team can provide DNS records, mailbox access and a host for the gateway. A single mailbox fetched by Odoo for one app is a short task, while several catch-all domains feeding leads, tickets and document replies usually need more design and testing. Ask the provider to show the build sequence and which dependencies could stall it, such as waiting for a DNS change to propagate or for a security team to approve a new service account. Confirm the timeline in writing against the agreed scope rather than relying on a general estimate.
What must our team provide before routing email into Odoo?
Your team needs to provide access to the mail domain, administrative control over the DNS zone that holds MX and any alias records, and a mailbox or gateway host that Odoo or the gateway can reach. You also need to define business rules for each alias: which app receives it, who owns the resulting records, how unknown senders are handled and whether catch-all behavior is allowed. Expect to supply credentials for a service account, the network path between the mail server and the Odoo server, and sign-off from the people who will receive the new records. Ask the provider to list these inputs in the written scope so gaps are found before build starts.
Can an internal administrator set up incoming email routing alone?
A competent internal administrator can often handle a single mailbox fetched by Odoo for one app, provided they have DNS control, access to the Odoo server and time to test. Gateway setups on Postfix or Exim are harder because they involve mail transfer rules, a script that calls Odoo through its XML-RPC interface, and permissions that must be kept correct across updates. Catch-all domains add risk because they can accept mail you did not intend to route. Ask whether your team has someone who can review mail headers, read Odoo logs, and maintain the script after an upgrade. If not, a partner can run the build and hand over documentation, with the scope agreed in writing first.
Does Odoo Community or Enterprise change the email routing options?
The routing design is mostly the same on both editions because it depends on mail servers and your own configuration rather than the licence. Confirm in the Odoo documentation for your version which mail features and connectors are available on your edition, and check the subscription terms if you rely on Enterprise-only apps that generate records from email. Enterprise also brings access to the upgrade service and official support, which affects how you maintain the setup over time. Ask the provider to state which edition each part of the design assumes, so you can compare options before buying.
What should we check before upgrading Odoo with mail routing in place?
Before an upgrade, test every alias on a staging copy and confirm that new messages create the expected leads, tickets or replies on the new version. Check that the incoming mail server settings, the gateway script and any XML-RPC calls still work, since integration methods change between versions and the XML-RPC path has been replaced in newer releases. Review the Odoo support window for your current version so you know how much time remains to plan the move. Keep a record of each alias, its owner and its test cases so the upgrade can be verified against the same rules.
Limits to confirm in your environment before you commit
Routing mail into Odoo depends on version, edition, hosting plan, mail provider rules and support dates, and several of these change on a fixed schedule. Confirm each item in writing with the right owner before you choose between polling and the gateway script.
Odoo version and edition
Confirm which Odoo version and edition your chosen routing path supports before you configure anything. The gateway script and incoming mail server setup differ across versions, and the Community and Enterprise editions do not offer identical features. Ask your Odoo partner or internal Odoo administrator to check the version in your environment against the documentation for that release, and record the answer in your design notes.
Upgrade docsHosting plan for on-premise use
Odoo's pricing page limits on-premise hosting to the Custom plan. Confirm with your Odoo account contact or procurement team which plan your organization holds before you plan a self-hosted mail gateway. Custom is also where the pricing page places external API access, which matters if the gateway relies on the XML-RPC interface.
Odoo pricingMail volume and catch-all design
Estimate inbound volume per alias before you choose between a single catch-all domain and per-app aliases. High volume on a catch-all domain means more messages reach the gateway, and more spam and bounce traffic as well. Ask your mail administrator for current daily counts for each address you plan to route, and test the chosen design with a realistic sample before go-live.
Mail provider send and receive rules
Confirm that your mail provider allows the gateway host to receive messages for your domain and to send replies through it. Some providers restrict inbound forwarding, require specific records, or block relay from new hosts. Ask your email administrator or hosting provider to confirm MX routing, relay permissions and any rate limits, and to tell you who approves changes to those settings.
Edition-specific features
Some mail-related capabilities sit only in the Enterprise edition, and the documentation for your version defines which ones. Ask your Odoo partner to list every routing feature your design depends on, mark each as Community or Enterprise, and confirm it against the documentation for your release. Do not assume a feature you saw in a demo is available in your edition.
Support window for your version
Odoo's standard support covers the first three years after a major release, including security updates, and extended support is limited. Confirm the end date for your installed version with your Odoo contact, and plan an upgrade before that date, because routing changes must be retested after any upgrade. Ask who in your organization owns that decision and the budget for it.
Support policy docsHow DeployOpen scopes and delivers incoming email routing for Odoo
DeployOpen starts with a written scope that maps which Odoo apps receive mail, which addresses and domains route to them, and how the mail path is controlled inside your infrastructure. We then build and test the routing choice you make, document it for your administrators, and offer ongoing support as a retainer if you want it.
How we scope
- Inventory every mailbox, alias and domain that should create records in Odoo, including CRM, helpdesk and sales inbound addresses.
- Confirm the mail server each domain uses and whether it can deliver to a gateway script or must be polled by Odoo.
- Record the scope, deliverables and timeline in writing before any configuration starts, as all engagements are fixed-scope.
How we build
- Configure the Odoo incoming mail servers or the mail gateway script on your Postfix or Exim host, depending on the approved design.
- Set up per-app aliases and, where agreed, a catch-all domain, and test each route with replies, new leads and new tickets.
- Check the gateway's XML-RPC dependency against the Odoo version in use, and confirm the authentication path works under your access controls.
How we hand over
- Deliver a configuration record covering servers, aliases, routing rules, credentials handling and the sender addresses Odoo accepts.
- Walk your administrators through a test runbook so they can repeat the routing checks after changes or upgrades.
- Document known limits, such as bounce handling and spam filtering, that your mail team must confirm in your own environment.
How we support
- Offer ongoing support, upgrades and routing reviews as a retainer when the Odoo version or mail platform changes.
- Plan routing retests as part of any Odoo upgrade so the gateway dependency is checked before production moves.
- Agree support boundaries in the written scope so your team knows who handles mail server faults and who handles Odoo changes.

