Blocks outgoing emails addressed to recipients matching configurable block rules. Rules can match exact emails, domains, contained text, wildcard patterns or regular expressions. The block is enforced both on queued Odoo emails (mail.mail) and on direct SMTP deliveries (ir.mail_server).
auto_awesome What this module does
AI-generated from the code · Odoo 18.0Lets administrators create rules that stop Odoo from sending emails to unwanted recipients, such as specific addresses, whole domains or patterns. Blocked recipients are removed from outgoing messages, and emails addressed only to blocked people are cancelled.
This module adds a new screen called "Recipient Block Rules" under the Technical menu, available to system administrators. There you create rules that decide which email addresses must never receive messages.
Each rule has a name, a pattern type and a pattern. The pattern type can be an exact email, a domain, a piece of text contained in the address, a wildcard pattern or a regular expression. Rules can be archived, ordered, and searched or grouped by pattern type. A rule cannot be saved with an empty pattern, and an invalid regular expression is rejected with an error.
When Odoo sends emails, the rules are applied automatically. Blocked addresses are removed from the To, Cc and Bcc fields of queued emails and of direct SMTP deliveries. If a message is addressed only to blocked recipients, it is cancelled and its email notifications are marked as cancelled, with the reason "Email delivery blocked by recipient blocklist rules." If some recipients are still allowed, the message is sent to them only.
The module includes one ready-made rule that blocks Amazon marketplace alias addresses. It affects the email sending models mail.mail and ir.mail_server.
Depends on
Menus it adds
Models and fields (3)
- mail.mail · extends an existing model
- ir.mail_server · extends an existing model
- mail.recipient.block.rule · new modelname, notes, active, pattern, sequence, pattern_type
Text generated by AI (DeepSeek) from reading the Odoo 18.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: 1 confirmed, 8 with no information of 9 versions.
Sources · Odoo 18.0
Confirmed on 2026-11-03 in branch 18.0 of OCA/mail.
terminal Installation and usage
OCA documentation · Odoo 18.0Usage
Source · Odoo 18.0To configure blocked recipients:
- Go to Settings > Technical > Email > Recipient Block Rules.
- Create a new rule or edit an existing one. For each rule, set a name, choose the pattern type, define the pattern, and keep the rule active.
- Choose the pattern type according to the recipients you need to block:
- Exact email: matches one complete email address.
- Domain: matches all recipients in a domain.
- Contains: matches recipients containing the configured text.
- Wildcard: supports shell-style wildcards such as
*@example.com. - Regular expression: supports Python regular expressions.
- Save the rule. Outgoing emails are filtered before delivery. If all recipients are blocked, the email is cancelled. If only some recipients are blocked, Odoo sends the email to the remaining allowed recipients.
A default rule blocks Amazon Marketplace aliases matching @marketplace.amazon..
Archived rules are ignored. If all matching rules are archived, Odoo will use its standard outgoing mail flow for those recipients.
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.