Odoo email deliverability: SPF, DKIM, DMARC and mail servers

Odoo mail from a custom domain reaches inboxes only when SPF, DKIM and DMARC are aligned with the server that sends it. This page explains the records, the outgoing server choices and how to diagnose bounces.

On this page

Why Odoo email from your domain lands in spam or bounces

Mail from Odoo that lands in spam or bounces usually means receiving servers cannot confirm that Odoo is allowed to send for your domain. Odoo sends invoices, quotes, password resets and chatter notifications on behalf of your company, so every one of those messages carries your domain name, and receiving mail providers check that claim before deciding where to deliver it. The fix is sender authentication: SPF, DKIM and DMARC records published in DNS for the domain Odoo sends from. Odoo's own email documentation describes these three protocols as complementary and warns that not complying with them greatly reduces the chance that emails reach their destination. Treat them as one configuration, not three separate checkboxes.

Teams usually meet this work at one of three points. The first is before go-live, when the mail flow is tested for the first time and nobody has yet confirmed that the sending domain is authenticated. The second is when the team moves from Odoo's own mail infrastructure to an SMTP relay of their own, because the sending IP address and the authorized senders change and the old records no longer match. The third is after bounces or spam complaints appear, often when a customer reports that invoices never arrive. In each case, confirm which address and domain Odoo uses as the sender, which outgoing mail server it connects through, and who controls DNS for that domain before anyone edits a record.

Before changing anything, ask the team that owns DNS and the mail provider for the exact SPF, DKIM selector and DMARC values each sending path requires, then compare them with what is already published. Mismatches between the envelope sender, the header From domain and the signing domain are a common cause of failed DMARC alignment, and they are easy to miss when a relay is added beside an existing setup. Plan a test that sends to several independent mailboxes and reads the message headers, because a delivery test to a single inbox says little about how other providers will score the same message.

How a sent Odoo message is checked at the receiving server

The message leaves Odoo through the outgoing mail server configured in Odoo, either your own SMTP relay or a sending service you choose. The receiving mail server then checks SPF against the sending IP address, verifies the DKIM signature against the public key in DNS, and tests DMARC alignment between the From domain and the domains that passed SPF or DKIM. The DNS records are the part your organization controls, so they are where you confirm each check will pass.

Odoo mail passes through your relay, then the recipient checks DNS-published policies.

Choosing between Odoo's mail server and your own SMTP relay

In this option, an external mail provider or a dedicated SMTP relay sends mail on behalf of your domain. Odoo connects to it as an outgoing mail server, and the provider's servers deliver the messages. Your DNS owner must publish an SPF record that lists the provider's sending hosts for your domain, and a DKIM public key that the provider gives you, published under the selector the provider names. DMARC then checks that the domain in the visible From address aligns with the domain that passed SPF or DKIM. Your organization controls the domain records and the Odoo configuration, but the provider controls the sending IP addresses, their reputation and their rate handling.

  • DNS records: The DNS owner publishes one SPF record that includes the provider's include mechanism, plus the DKIM key and any verification records the provider asks for.
  • Sending IP control: The provider owns the IP addresses. Ask whether they are shared with other customers and how reputation is managed for shared pools.
  • Odoo settings: Create an outgoing mail server in Odoo with the provider's host, port, encryption and credentials, and set the From address to a sender on your verified domain.
  • Relay replacement: Changing providers means publishing new SPF includes and a new DKIM selector, then keeping the old records until mail from the old path has stopped.
  • Recurring work: Provider keys can be rotated, and new sending services added to the provider need matching SPF updates.

Before go-live, send test messages to several external mailboxes and check the authentication results in the message headers.

Outgoing server options and when each fits

This table compares three ways to send Odoo mail: Odoo's default sending path on Odoo Online, a self-managed SMTP relay, and a third-party transactional mail service. Read each row to see who controls the DNS records, the sending IP addresses and the day-to-day work, then match the option to your hosting type and team. The main takeaway is that the sending path decides which SPF and DKIM records you must publish, so confirm that choice before you edit DNS.

OptionWho controls DNS and keysWho controls sending IPsOperational burdenWhen it fits
Odoo default sending path (Odoo Online)Odoo publishes the sending setup; you add the DNS records Odoo documents for your domainOdooLow for mail infrastructure, but DNS changes and DMARC monitoring stay with youOdoo Online databases that need a custom domain and no mail servers of your own
Self-managed SMTP relay on your infrastructureYou control the relay, its DKIM keys and the SPF entries for its addressesYou, or your hosting providerHigh: relay patching, IP reputation, blocklist checks and monitoringSelf-hosted Odoo where mail must stay inside your network or your policy requires it
Third-party transactional mail serviceThe provider supplies its own DKIM and SPF values; you publish them in your DNSThe providerMedium: account setup, domain verification and watching the provider's bounce dataSelf-hosted Odoo that needs reliable delivery without running a mail server
Your existing corporate mail systemYour mail administrators control records and keysYour mail administratorsMedium, shared with the team that runs corporate mailOrganizations that already send from a managed mail platform and want one sender policy
Shared hosting or unmanaged provider relayOften unclear; confirm who can edit records and rotate keysUsually the provider, shared with other customersLow setup, but limited visibility into reputation problemsTest databases or low-volume notifications, not customer-facing invoices or password resets

Setting up SPF, DKIM and DMARC for Odoo mail

This sequence moves a custom domain from an unconfigured state to one where every system sending as that domain passes SPF, DKIM and DMARC alignment, so Odoo messages are authenticated before they reach inboxes. Each step ends with a check you can verify in the message headers.

  1. Inventory every system that sends mail as the domain

    Before touching DNS, list every sender that uses your domain in the From address: Odoo's outgoing server or your own SMTP relay, the company email platform, marketing tools, ticketing systems, invoicing services and any scanner or application that sends notifications. Record which address each one uses and who owns it. Your Odoo administrator and IT team should confirm the list together. The step is done when you have a written inventory that covers every sender, because any sender missing from it will fail SPF or DKIM later and is hard to trace afterward.

  2. Publish the SPF record with approved senders

    Build one SPF TXT record at the domain root that lists only the senders from your inventory, using the include mechanisms each provider publishes for its own sending infrastructure. Keep the record to a single entry per domain, since multiple SPF records cause failures. Odoo's DNS guidance explains how the record is set up for Odoo mail. Confirm the record with a public DNS lookup and check that it resolves to the expected text. The step is done when a lookup returns exactly one SPF record that lists every approved sender.

  3. Generate and publish the DKIM key

    Generate the DKIM key pair in the sending system, whether that is Odoo's outgoing server setup or your SMTP relay, and publish the public key as a TXT record at the selector name the sender specifies. Store the private key only on the sending side and restrict access to it. Enable signing on the sender so outgoing messages carry a DKIM-Signature header. The step is done when a test message shows a DKIM-Signature header and a DNS lookup of the selector returns the matching public key.

  4. Set the Odoo From address to the aligned domain

    In Odoo, configure the outgoing mail server and the default From addresses so they use the domain you just authenticated. The From domain must match the domain used by SPF and DKIM for DMARC alignment to pass. Check each mail-sending feature you use, including company email settings, user addresses, and any automated action that sends notifications. The step is done when a test message sent from Odoo shows the aligned domain in the From header and the envelope sender matches the same domain or a subdomain authorized by your SPF record.

  5. Publish a DMARC record in monitoring mode

    Publish a DMARC TXT record at the _dmarc label of the domain with a policy of none and a reporting address you read. Monitoring mode lets you observe which senders pass or fail without blocking any mail. Review aggregate reports for several weeks, looking for legitimate senders that are missing from SPF or failing DKIM alignment, and fix each one in the inventory. The step is done when the DMARC record resolves publicly and your reporting mailbox receives reports that show every known sender passing alignment.

  6. Send test messages to major inbox providers

    Send test messages from Odoo to accounts at several major inbox providers, including a Gmail account and a Microsoft 365 account if your users rely on them. Include a message from each Odoo feature that sends mail, such as a quotation, a password reset or a scheduled notification. Check that each message lands in the inbox rather than spam and that the sender name and address look correct. The step is done when each test message arrives in the expected folder with the correct sender details.

  7. Read the received headers for SPF, DKIM and DMARC results

    Open the full headers of each test message and look for the Authentication-Results header added by the receiving server. Confirm that SPF shows pass for the envelope sender, DKIM shows pass for your signing domain, and DMARC shows pass with alignment. If any result is fail or none, trace it back to the inventory: a missing sender, a wrong selector, or a From domain that does not match. Repeat the send after each fix. The step is done when every test message from every sender shows passing SPF, DKIM and DMARC results in the received headers.

How DMARC alignment decides whether SPF and DKIM count

SPF and DKIM passing is not enough on its own. A message can pass both checks and still fail DMARC, because DMARC asks a narrower question: does the domain that SPF or DKIM actually authenticated match the domain shown in the visible From address? That match is called alignment. SPF authenticates the envelope sender (the return-path domain used for bounces), and DKIM authenticates the domain in the d= tag of the signature. If neither of those domains matches the From domain under the alignment mode your DMARC record sets, the receiving server treats the message as unauthenticated for DMARC purposes, even though the SPF or DKIM check itself succeeded.

The failure most often seen with Odoo comes from relays. When Odoo sends through an SMTP relay or a transactional mail provider, the relay usually sets the return-path and signs with its own domain, such as a bounce subdomain or a provider domain. If your From address is on your company domain and no DKIM signature is made with that domain, neither SPF nor DKIM aligns, and DMARC fails. Confirm with your relay which domains it uses for the return-path and DKIM signing, whether it supports custom return-path or custom DKIM domains, and whether the DNS records it asks for are published under your From domain or a subdomain of it. Check a sample message's headers after each change rather than trusting the relay dashboard alone.

The risk becomes visible when the DMARC policy moves from monitoring to enforcement. A policy set to p=none only reports failures, so mail that already misaligns keeps arriving while the reports fill up. Once the policy is set to p=quarantine or p=reject, the same messages can land in spam or be refused outright. Before raising the policy, review aggregate reports for every legitimate sender of your domain, including Odoo, the relay, marketing tools and invoice senders, and fix alignment for each one. Then raise the policy in steps, watching reports after each step, and keep a rollback value ready.

Diagnosing bounces and missing mail from Odoo

What should I check first when Odoo gets a hard bounce with a 550 error?

Start with the bounce text itself, then check the outgoing mail server record in Odoo and the mail server log at the same moment the message was sent. A hard bounce is a permanent refusal, so the recipient server or its policy rejected the message, often because the sender address, the sending host or the domain's authentication did not meet its rules. Copy the exact reject text from the bounce notice, note the time, and find the matching line in the relay or Postfix log. Confirm that the envelope sender and the From domain match the domain you configured, and that the sending IP is the one your SPF record authorizes. Do not change several settings at once, because you will lose the cause. Verify the recipient address is valid too, since a mistyped address produces a similar refusal.

Why does Odoo mail get deferred or soft bounced, and what do I check?

A soft bounce or deferral means the receiving server asked the sender to try again later, usually because of rate limits, temporary greylisting, or a server that could not complete a lookup. Check the mail server log for the deferral message and the retry schedule, then confirm that the outgoing server in Odoo points to the host and port you intended. Look at how many messages left in a short window, since bulk sends from a single host are a common trigger. Also check that your DNS resolvers answer reliably, because a failed lookup for SPF or the sending host can look like a temporary failure. Most deferrals clear on their own, but a queue that keeps growing needs investigation on the relay side, not in Odoo.

Why does mail from Odoo land in the spam folder?

Spam placement usually reflects weak or inconsistent sender authentication, content signals, or a poor sending reputation, and it is rarely a single setting. Open a received message in the recipient mailbox, view the full headers, and read the Authentication-Results section for SPF, DKIM and DMARC outcomes. If any of them fail or do not align with the From domain, fix the DNS records first, since Odoo's email documentation describes these three protocols as complementary and says that not complying with them greatly reduces the chance that emails reach their destination. Then check the reverse DNS of the sending address and whether the messages carry a consistent, valid From address. Reputation recovers slowly, so measure after each change rather than assuming one fix is enough.

Where do I look when Odoo mail is missing entirely?

Missing mail means the message either never left Odoo, left and never arrived, or was delivered and filtered, so trace it one hop at a time. First, check Odoo's outgoing mail queue and its logs for the send attempt, including any error raised by the connection to the server. If Odoo logged a successful handoff, move to the mail server log and search for the recipient address and the message ID. If the relay accepted the message, check the recipient's quarantine, junk folder and any gateway logs, and read the headers of a test message sent to a mailbox you control. Confirm the From address is one the recipient accepts, because some filters drop mail that fails authentication without bouncing it.

Why does DKIM start failing after we rotate the signing key?

DKIM usually fails after rotation because the new public key was not published in DNS under the selector the sending server now uses, or because the old key was removed before every signing host switched over. Compare the selector named in the DKIM-Signature header of a failing message with the record you published, and query that exact selector name in DNS. Check that the DNS value was copied in full, since truncated or split TXT values break verification. Keep the old selector published until messages signed with it have stopped arriving, and confirm that all sending paths, including your SMTP relay, use the same new key. Consult the Odoo DNS setup page for the record format it expects, and confirm with your DNS and mail team which selector each host uses.

Why does SPF fail after we add a new sending server?

SPF fails after a new sending server is added because the domain's SPF record does not list the new server's IP address or include mechanism, so receivers see an unauthorized sender. Check the IP that appears as the sending address in the received headers, then fetch the published SPF TXT record for the envelope domain and confirm it authorizes that IP. Watch the lookup count, since SPF allows a limited number of DNS lookups and an overgrown record can fail with a permanent error even when the IP is listed. Remove stale senders you no longer use, and make sure the envelope sender domain matches the From domain for DMARC alignment. Test the change with a message sent from Odoo before you consider it finished.

Which logs and headers should I collect before asking for help?

Collect the same evidence in every case so that whoever reviews it can reproduce the problem quickly. Gather the exact time and recipient address of a failing message, the Odoo outgoing server record with secrets removed, the matching lines from the Odoo server log and the mail relay log, and the full headers of one failing message and one delivered message for comparison. Add the current SPF, DKIM and DMARC records for the sending domain, pulled from DNS and not from memory, and note which selector each sending host uses. With these in hand, the difference between a DNS problem, a relay problem and an Odoo configuration problem is usually visible within a short review. Ask the recipient's administrator for their rejection detail if the bounce text is vague.

Protecting DKIM keys, SMTP credentials and sender reputation

Once SPF, DKIM and DMARC are in place, the sending path becomes a target: a leaked key or a hijacked mailbox can send forged mail under your domain. The cards below cover the controls that keep signing keys, SMTP credentials and sending permissions under your control, and what to do when one of them is exposed.

Keep DKIM private keys on the sender

The DKIM private key signs outgoing mail, so anyone holding it can forge signed messages that pass DKIM. Generate the key pair on the server or relay that signs mail, restrict read access to the service account that runs it, and publish only the public key in DNS. Check that the key is not copied into shared configuration repositories, tickets or database backups that many people can open. Confirm with your mail provider or relay vendor where their private keys are stored and how rotation is done.

Odoo email DNS docs

Store SMTP credentials outside the database

Odoo stores outgoing server settings, including SMTP passwords, in its own database. Any user or process that can read that database, or a copy of it used for testing, may obtain working relay credentials. Where your deployment allows, keep the SMTP password in a secrets manager or in the server configuration file readable only by the Odoo service account, and rotate it on a schedule. Confirm with your administrators whether database backups and staging copies carry these credentials and whether they need to be cleared.

Limit which hosts may send for the domain

SPF lists the servers allowed to send for your domain, so every host you add to that list is a host that can send mail that passes SPF. Keep the list to the Odoo outgoing server, your relay and any approved marketing or helpdesk senders, and remove entries when a service is retired. Avoid broad includes from third-party senders you do not manage. Review the SPF record whenever a new application starts sending, and confirm the lookup count stays within the limit your DNS tools report.

Watch DMARC reports before enforcing

A DMARC policy set to reject or quarantine tells receivers what to do with mail that fails alignment, so setting it too early can block legitimate Odoo messages such as invoices or password resets. Start with a monitoring policy, collect the aggregate reports, and identify every source that sends as your domain. Add missing senders to SPF or DKIM before tightening the policy. Confirm with your mail team which reporting address will receive the reports and who reads them.

Restrict who can edit outgoing servers

In Odoo, anyone with rights to change outgoing mail server settings can redirect all system mail to a host they control, or capture credentials during a test. Limit that right to a small administrator group, separate it from functional roles, and review the access list after staff changes. Pair this with audit logging so that edits to mail server records are visible to your security team. Check the access rules in your Odoo version, since group names and menus differ between releases.

Respond to a compromised sending account

If a mailbox, SMTP password or DKIM key is exposed, rotate the affected credential first, then review sent items and relay logs for mail sent since the likely exposure date. Remove the compromised key from DNS only after the new key is published and in use, so legitimate mail keeps passing. Check whether the account was used for password resets or invoice delivery that customers may act on. Record the timeline, notify the owners of the affected domain and your incident response team, and confirm the steps with your relay provider before you start.

What Odoo email deliverability work costs and what it needs from you

What drives the cost of Odoo email deliverability work?

The main drivers are how many systems send mail for your domains, how many domains and Odoo apps send mail, who controls the DNS zones, and who owns the outgoing relay. Each sending source (Odoo's own mail path, a corporate SMTP relay, a marketing tool, a ticketing system, an invoicing service) needs its own sender check, and each one adds inventory, record changes and testing. Shared ownership adds coordination time, because DNS and relay changes often need approval from more than one team. Ask any partner to price the work from a written sender inventory rather than from a flat assumption about the number of domains.

Can our own team set up SPF, DKIM and DMARC for Odoo alone?

Yes, for a single domain with a clear relay owner and someone who can edit DNS. The Odoo documentation for the 19.0 release walks through the DNS records needed to send email from a custom domain, and SPF, DKIM and DMARC are configured in the same DNS zone. The work becomes harder when several systems send as the same domain, when DMARC reports show legitimate senders failing alignment, or when the relay is owned by a separate provider. In those cases, an outside engineer can help with the sender inventory and the record design, while your team keeps control of the zone.

How long does email authentication setup take, and what changes that?

The duration depends on three things: how long your change process takes for DNS and relay settings, how long DNS changes take to become visible to receiving servers, and how much testing the sender inventory requires. Propagation depends on the TTL values already set on the records, so lowering TTLs before a change can shorten the wait, but the old values still apply until caches expire. Testing takes longer when mail flows through several systems, because each flow needs a test message that is checked for SPF, DKIM and DMARC results. Ask for a plan that lists the change windows, the test messages and the monitoring period, instead of a single completion date.

What do we need to provide before deliverability work starts?

Four inputs make the work predictable:

  • DNS administrator access to the zones for each sending domain, or a named person who will publish the records.
  • Credentials or configuration for the outgoing mail relay, including its SMTP host, port, encryption method and the sending addresses it accepts.
  • A sender inventory listing every system that sends mail as your domain, with its purpose and the address it uses.
  • A named owner on your side who can approve DNS changes, answer questions about existing mail flows and make the final decision on the relay.

Without the inventory, it is hard to tell whether a failing message comes from Odoo, from another system or from a forwarding service.

What should a quote for Odoo email deliverability include?

A useful quote states the scope in writing before work starts. It should name the sending domains and Odoo databases in scope, list each sending system in the inventory, and say whether Odoo's mail server or your own SMTP relay is used for each one. It should describe the DNS records to be created or changed, the DMARC policy approach and the reporting you expect to review, and the test messages used to confirm alignment. It should also name what is excluded, such as mailbox hosting, marketing platform configuration or incoming mail routing, and state the handover items and any follow-up monitoring. Ask whether one-time setup and recurring monitoring are priced separately.

Who pays for what in an email deliverability project?

Costs usually fall into four groups: internal time from your DNS, mail and security owners, the cost of your relay or mail service, the cost of any external engineering, and the cost of tools that collect DMARC reports. Internal time is often the largest hidden cost, because changes need review from several teams. The relay and mail service costs are recurring and set by your provider, so confirm them before the project starts. External engineering is usually a one-time setup, with optional ongoing monitoring as a separate line. Ask any partner to show which items are one-time, which recur and who holds each contract.

What could delay or stop the work, and how do we reduce that risk?

The most common blockers are missing DNS access, an unknown sender that fails after the policy is tightened, and a relay provider that cannot confirm which addresses it signs for. Changing a DMARC policy too early can cause legitimate mail to be rejected, so a staged approach with monitoring-only reporting first is usually safer. Keep a written rollback for each DNS change, record the old values before editing, and assign one person to approve changes. Confirm the exact requirements with your receiving providers and your relay vendor, because their documentation for sender policies can change over time.

Does Odoo's own email guidance cover SPF, DKIM and DMARC?

Yes. Odoo's documentation describes SPF, DKIM and DMARC as complementary sender authentication protocols, and it states that not complying with them greatly reduces the chance that emails reach their destination. The guidance covers the DNS records needed for a custom domain, so it is the first reference for your team. Read it alongside your relay vendor's documentation, because the SPF record must list every server that sends for your domain, and that list depends on your setup rather than on Odoo alone.

How DeployOpen scopes and delivers Odoo mail setup

DeployOpen treats Odoo mail as part of the platform build, not an afterthought. We agree the sending path, DNS ownership and test plan in writing, then configure and verify SPF, DKIM and DMARC for the domains your organization actually sends from.

How we scope

  • Inventory every sending source: Odoo outgoing servers, marketing tools, ticketing and any SMTP relay.
  • Record who controls DNS for each sending domain and how changes get approved.
  • Agree the written scope, deliverables and timeline before any DNS or Odoo settings change.

How we build

  • Configure Odoo outgoing mail servers and sender addresses to match the domains you approved.
  • Prepare SPF and DKIM records for Odoo's mail path or your own relay, and check alignment before publishing.
  • Stage a DMARC policy, starting with monitoring, and test bounces and rejections with real sample messages.

How we hand over

  • Deliver a written record of every DNS record, selector, mail server setting and the reason for each.
  • Document the bounce diagnosis steps and the logs your operations team should check first.
  • Walk your IT and compliance teams through the setup so they can review it against their own controls.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • Re-test mail authentication after DNS changes, relay migrations or Odoo version upgrades.
  • Confirm with your mail provider which limits, sender rules and DKIM key rotation steps apply to your setup.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.