This module brings Odoo outbound emails in to strict compliance with RFC-2822 by allowing for a dynamically configured From header, with the sender's e-mail being appended into the proper Sender header instead. To accomplish this we:
- Add a domain whitelist field in the mail server model. This one represent an allowed Domains list separated by commas. If there is not given SMTP server it will let us to search the proper mail server to be used to send the messages where the message 'From' email domain match with the domain whitelist. If there is not mail server that matches then will use the default mail server to send the message.
- Add a Email From field that will let us to email from a specific address taking into account this conditions:
- If the sender domain match with the domain whitelist then the original message's 'From' will remain as it is and will not be changed because the mail server is able to send in the name of the sender domain.
- If the original message's 'From' does not match with the domain whitelist then the email From is replaced with the Email From field value.
- Add compatibility to define the smtp information in Odoo config file. Both smtp_from and smtp_whitelist_domain values will be used if there is not mail server configured in the system.
auto_awesome What this module does
AI-generated from the code · Odoo 19.0Lets you set a fixed "Email From" address and an allowed-domains list on each outgoing mail server, so Odoo rewrites the sender address when the original sender's domain is not approved.
This module adds two new fields to the outgoing mail server configuration screen (Settings > Technical > Outgoing Mail Servers): an allowed-domains list and an "Email From" address.
- The allowed-domains list is a comma-separated list of domains. Each entry is checked when you save, and an invalid domain raises an error.
- The "Email From" field must be a valid email address; an invalid value raises an error when saved.
When Odoo sends an email, it looks at the sender's domain. If that domain is in the allowed list, the original sender is kept. If it is not in the list, the message's From header is replaced with the configured "Email From" address. In that case the Return-Path header is also set to that address when no default bounce address is configured.
If no specific mail server is chosen, Odoo automatically picks the first mail server (by sequence) whose allowed-domains list contains the sender's domain; if none matches, it falls back to the default mail server. The module also restores the original display name on the From header when the email address matches but the name was changed.
It works on the ir.mail_server model and only changes the outgoing mail server form; no new menus are added.
Depends on
Models and fields (1)
- ir.mail_server · extends an existing modelsmtp_from (Email From), domain_whitelist
Text generated by AI (DeepSeek) from reading the Odoo 19.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub
Availability by version
Reviewed: 2026-11-03Confirmation status: 8 confirmed, 1 with no information of 9 versions.
Sources · Odoo 19.0
Confirmed on 2026-11-03 in branch 19.0 of OCA/mail.
terminal Installation and usage
OCA documentation · Odoo 19.0Usage
Source · Odoo 19.0- Navigate to an Outbound Email Server
- Set the Email From option to an email address
- Set the Domain Whitelist option with the domain whitelist
No verified information in OCA: Installation, Configuration.
Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.
Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.