Skip to content
Guides

Configuring outgoing and incoming email for self-hosted Odoo

On Odoo Online, email mostly just works. On your own server, Odoo Community and Enterprise need a mail service, the right DNS records and a way to receive replies. Here is how to set up all three so invoices reach inboxes, not spam folders.

Key takeaways

  • Send through a dedicated email provider, not straight from the server. Many clouds block outgoing port 25 by default.
  • Set up SPF, DKIM and DMARC for your sending domain with your provider's values, or Odoo's emails will land in spam.
  • Set the alias domain in Odoo so replies and bounces come back to the right place.
  • Neutralize staging and test copies so they cannot email real customers.

How email works in self-hosted Odoo

Odoo sends and receives a lot of email: quotes, invoices, password resets, chatter messages and notifications. Three pieces have to work together:

  • An outgoing mail server (SMTP) that delivers Odoo's messages.
  • DNS records on your domain that prove Odoo is allowed to send for it.
  • A way to receive replies, so a customer's answer to an invoice lands on the right record in Odoo.

Odoo's documentation covers each of these in its email communication section. The rest of this guide explains the choices for a self-hosted server.

Outgoing email for Odoo

Use an email provider, not the server itself

It is possible to run a mail server on the Odoo machine, but it is a poor idea. Messages from a fresh cloud IP address often go to spam, and many providers block outgoing mail on port 25 by default: Hetzner blocks ports 25 and 465 on cloud servers until you request otherwise, and AWS blocks outbound port 25 on EC2 unless you ask to remove the limit (as of October 2026).

Instead, send through a service built for it: your Google Workspace or Microsoft 365 account, or a transactional email provider. They handle reputation, retries and bounces, and they listen on the submission ports 587 or 465, which are rarely blocked in the same way.

Add the outgoing mail server in Odoo

In developer mode, open Settings → Technical → Outgoing Mail Servers and add your provider's SMTP host, port, encryption and credentials. Use the connection test before saving. Odoo's documentation also recommends setting a FROM filtering value on each server, a domain or a full address, so Odoo uses the right server for each sender.

Odoo can also read SMTP settings from its configuration file. If a mail server is set up inside Odoo, the in-database settings are the ones that matter.

Choose the sender address carefully

Send from an address on your own domain, such as invoices@example.com. Sending "from" a customer's or employee's personal address through your provider is the most common reason messages fail authentication.

Mind the sending limits

Every email provider limits how many messages an account can send per day or per minute. Day-to-day Odoo mail rarely comes close, but newsletters and mass mailings from the Email Marketing app can. If you send campaigns, check your provider's limits first, or use a provider built for bulk email for those messages.

SPF, DKIM and DMARC for Odoo email

Receiving mail servers check three DNS records on your domain before trusting a message:

  • SPF lists the servers allowed to send for your domain. A domain must have only one SPF record, so add your provider to the existing one instead of creating a second.
  • DKIM adds a cryptographic signature. Your provider gives you the record to publish.
  • DMARC tells receivers what to do when SPF or DKIM fails, and sends you reports. Start with a monitoring policy, read the reports, then tighten it.

Odoo's documentation gives SPF and DKIM values for Odoo's own mail servers. Those apply to Odoo Online and Odoo.sh; on your own server, use the values from the email provider you actually send through.

Incoming email for Odoo

Set the alias domain

In Odoo's settings, set the alias domain to your domain. Odoo builds reply-to and bounce addresses from it, and its documentation notes that the SPF check is done on the bounce address, so the alias domain and your SPF record must match.

Choose how replies reach Odoo

Odoo's documentation describes three ways to get incoming mail into the database:

  • Redirections: your mail provider forwards messages for addresses such as catchall@ or sales@ to Odoo.
  • Incoming mail servers: Odoo fetches messages from a mailbox over IMAP or POP. This depends on a scheduled action, so messages are not picked up instantly.
  • DNS records: an MX record on a subdomain points mail at Odoo's servers. This method is built around Odoo's own hosting; on your own server it would also need a local mail server that passes messages to Odoo, so the first two options are usually simpler.

For most small companies, fetching from a dedicated mailbox over IMAP is the simplest to set up and debug.

Common Odoo email problems

  • Emails go to spam: SPF, DKIM or DMARC is missing or wrong, or the sender address is on a domain you have not authorised.
  • Emails stay in the queue: the outgoing server rejects the login, the port is blocked, or the provider's sending limit was reached. Check the failed messages and the Odoo log.
  • Replies do not appear in Odoo: the alias domain is not set, or the incoming mail server or forwarding is not working.
  • Links in emails point to the wrong address: fix and freeze web.base.url, as explained in our Odoo HTTPS setup guide.

A growing queue of failed emails is worth monitoring; see what to monitor on an Odoo server.

Keep test copies from emailing customers

A copy of production contains real customer addresses and real outgoing mail settings. Before anyone uses a staging or test copy, neutralize it so outgoing mail and scheduled actions are switched off. Our article on Odoo staging environments explains why this matters.

Odoo email settings on CloudPilot

  • SMTP settings in the configuration. Each instance's configuration lets you set the outgoing mail server, port, encryption, user, password and default sender. Odoo's own settings take precedence when a mail server is also set up inside Odoo.
  • Neutralized staging. Staging copies have outgoing email and scheduled actions neutralized, so they do not email customers.
  • The Odoo log in each instance's Logs tab, to see why a message failed.

CloudPilot does not send your Odoo email for you; you connect the provider you use. See managed Odoo hosting for what CloudPilot looks after, and pricing for each plan.

Self-hosted Odoo email: questions

Why are my Odoo emails going to spam?

Usually because SPF, DKIM or DMARC is missing or does not match the server sending the email. Publish your email provider's records for your domain, and send from an address on that domain.

Can I send Odoo email directly from my cloud server?

It is possible but not recommended. Many cloud providers block outgoing port 25 by default, and mail from a new server IP often lands in spam. Use an email provider over port 587 or 465 instead.

How do customer replies get into Odoo?

Set the alias domain in Odoo, then either forward the reply addresses to Odoo or let Odoo fetch them from a mailbox over IMAP or POP. Both work well on your own server.

Keep reading

Run Odoo on your own cloud

Deploy, back up and monitor Odoo on AWS, Google Cloud, Azure, Hetzner or any server. 14-day free trial.