documentation/content/administration/on_premise/email_gateway.md
2025-02-27 18:56:07 +07:00

1.2 KiB

Email gateway

The Odoo mail gateway allows you to inject directly all the received emails in Odoo.

Its principle is straightforward: your SMTP server executes the "mailgate" script for every new incoming email.

The script takes care of connecting to your Odoo database through XML-RPC, and send the emails via the MailThread.message_process() feature.

Prerequisites

  • Administrator access to the Odoo database.
  • Your own mail server such as Postfix or Exim.
  • Technical knowledge on how to configure an email server.

For Postfix

In you alias config ({file}/etc/aliases):

email@address: "|/odoo-directory/addons/mail/static/scripts/odoo-mailgate.py -d <database-name> -u <userid> -p <password>"

:::{note} Resources

For Exim

*: |/odoo-directory/addons/mail/static/scripts/odoo-mailgate.py -d <database-name> -u <userid> -p <password>

:::{note} Resources

:::{tip} If you do not have access/manage your email server, use {ref}incoming mail servers <email-inbound-custom-domain-incoming-server>. :::