MailDesk docs
Setup and administration

Set up HTTPS for faster synchronization

3 min read Odoo 18.0

Gmail and Microsoft 365 push need your Odoo server to be reachable from the internet over HTTPS. This page shows how to set and check that address.

Who this is for: Odoo or system administrators.

You need: MailDesk Pro, access to Settings ▸ Technical ▸ Parameters ▸ System Parameters (developer mode), and control of your server's DNS name, certificate and reverse proxy.

This only affects faster synchronization

Normal sync works without a public address, because MailDesk contacts the provider. The public address is only needed so Google and Microsoft can contact your server. If it is wrong, push cannot be set up or delivered, but scheduled sync keeps delivering mail.

Before you begin

  • Your Odoo server has a stable host name, for example mail.example.com.
  • The host name has a certificate from a public certificate authority. Self-signed certificates are rejected.
  • Your reverse proxy or CDN passes /maildesk/push/gmail and /maildesk/push/outlook to Odoo without caching, rewriting or redirecting.
  • You can switch on developer mode in Odoo.

Set the public address

MailDesk builds the webhook address from the Odoo system parameter web.base.url:

  • Gmail: <web.base.url>/maildesk/push/gmail
  • Microsoft 365: <web.base.url>/maildesk/push/outlook
  1. Go to Settings ▸ Technical ▸ Parameters ▸ System Parameters.
  2. Set web.base.url to your public HTTPS address, for example https://mail.example.com. Do not add a path or a trailing slash.
  3. Add or set web.base.url.freeze to True.

What you should see: both parameters are saved.

Why freeze the address

By default Odoo can overwrite web.base.url with the host name of the next administrator who signs in. If that is an internal name, providers then push to an address they cannot reach. web.base.url.freeze = True keeps your public address.

Check the address from outside

Run this from a computer outside your network, not from the Odoo server:

curl -sI https://your-url/maildesk/push/gmail

What you should see: HTTP/1.1 405 Method Not Allowed.

The webhook only accepts POST requests. A 405 answer to a simple request shows that the route exists and is reachable over HTTPS. It is the correct result.

Result Meaning Safe next step
405 Method Not Allowed Correct. The webhook is reachable. Continue with the setup assistant.
The request hangs or times out The address points to the wrong place, a tunnel is down, or a firewall drops traffic. Fix routing and the firewall first.
A certificate or TLS error The certificate is expired, self-signed or for another host name. Install a public-CA certificate for the exact host name.
Any other status (200, 302, 404) Something else answers on that path, such as a cache or redirect. Pass the path straight to Odoo.
The host name does not resolve DNS is wrong. Check with nslookup your-host. If you use different internal and external DNS, make sure the Odoo server resolves the same name that outside clients use.

Development tunnels

Quick tunnels, for example trycloudflare.com, create a new address each time and stop when the origin restarts. After the address changes, the provider still pushes to the old address, and the saved audience no longer matches. Use the Developer / Test mode of the Gmail assistant only for short tests. For real use, choose a stable host name.

For administrators: the checks the assistant runs

The setup assistant probes the webhook with a GET request and a 5-second timeout. It reports these codes:

Code Meaning Fix
WEBHOOK_URL_UNSET web.base.url is empty. Set and freeze it.
WEBHOOK_URL_NOT_HTTPS The address starts with http://. Use https:// with a valid certificate.
WEBHOOK_UNREACHABLE_DNS The host name does not resolve. Check DNS.
WEBHOOK_UNREACHABLE_TIMEOUT No answer within 5 seconds. Fix routing, tunnel or firewall.
WEBHOOK_UNREACHABLE_TLS The TLS handshake failed. Install a public-CA certificate for the exact host name.
WEBHOOK_UNEXPECTED_STATUS Something other than 405 answered. Pass the path straight to Odoo, with no cache or redirect.

For Gmail, Pub/Sub also signs each push with a token whose audience must equal the exact webhook address. If web.base.url changes, run the assistant again.

If it does not work

Mail keeps arriving on the normal schedule while you fix the address. For other symptoms see Fix missing or delayed emails.

Next step

Enable faster Gmail synchronization or Enable faster Microsoft 365 synchronization