Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions mail_recipient_blocklist/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
========================
Mail Recipient Blocklist
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92ada95dc311d150c4053c599f2f1ab2bb8dda677eab30715d89b4bafb33d4aa
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmail-lightgray.png?logo=github
:target: https://github.com/OCA/mail/tree/18.0/mail_recipient_blocklist
:alt: OCA/mail
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_recipient_blocklist
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/mail&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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``).

**Table of contents**

.. contents::
:local:

Usage
=====

To configure blocked recipients:

1. Go to **Settings > Technical > Email > Recipient Block Rules**.

|Recipient block rule menu|

2. 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.

|Recipient block rule form|

3. 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.

4. 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.

|Recipient block rule result|

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.

.. |Recipient block rule menu| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_recipient_blocklist/static/description/recipient_block_rule_menu.png
.. |Recipient block rule form| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_recipient_blocklist/static/description/recipient_block_rule_form.png
.. |Recipient block rule result| image:: https://raw.githubusercontent.com/OCA/mail/18.0/mail_recipient_blocklist/static/description/recipient_block_rule_result.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/mail/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/mail/issues/new?body=module:%20mail_recipient_blocklist%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Tecnativa

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Sergio Teruel

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-sergio-teruel| image:: https://github.com/sergio-teruel.png?size=40px
:target: https://github.com/sergio-teruel
:alt: sergio-teruel

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-sergio-teruel|

This module is part of the `OCA/mail <https://github.com/OCA/mail/tree/18.0/mail_recipient_blocklist>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mail_recipient_blocklist/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions mail_recipient_blocklist/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail Recipient Blocklist",
"summary": "Block outgoing emails by configurable recipient patterns",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/mail",
"category": "Discuss",
"depends": ["mail"],
"data": [
"security/ir.model.access.csv",
"data/mail_recipient_block_rule_data.xml",
"views/mail_recipient_block_rule_views.xml",
],
"maintainers": ["sergio-teruel"],
"application": False,
"installable": True,
}
16 changes: 16 additions & 0 deletions mail_recipient_blocklist/data/mail_recipient_block_rule_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record
id="mail_recipient_block_rule_amazon_marketplace"
model="mail.recipient.block.rule"
>
<field name="name">Amazon Marketplace</field>
<field name="sequence">10</field>
<field name="pattern_type">contains</field>
<field name="pattern">@marketplace.amazon.</field>
<field name="notes">
Blocks Amazon marketplace alias addresses such as
abc123@marketplace.amazon.es.
</field>
</record>
</odoo>
182 changes: 182 additions & 0 deletions mail_recipient_blocklist/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_recipient_blocklist
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-02 15:47+0000\n"
"PO-Revision-Date: 2026-07-02 17:53+0200\n"
"Last-Translator: Sergio Teruel <sergio.teruel@tecnativa.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.2\n"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__active
msgid "Active"
msgstr "Activo"

#. module: mail_recipient_blocklist
#: model:mail.recipient.block.rule,name:mail_recipient_blocklist.mail_recipient_block_rule_amazon_marketplace
msgid "Amazon Marketplace"
msgstr "Amazon Marketplace"

#. module: mail_recipient_blocklist
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_form
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_search
msgid "Archived"
msgstr "Archivado"

#. module: mail_recipient_blocklist
#: model:ir.model.fields.selection,name:mail_recipient_blocklist.selection__mail_recipient_block_rule__pattern_type__contains
msgid "Contains"
msgstr "Contiene"

#. module: mail_recipient_blocklist
#: model_terms:ir.actions.act_window,help:mail_recipient_blocklist.mail_recipient_block_rule_action
msgid "Create a recipient block rule"
msgstr "Crear una regla de bloqueo de destinatarios"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__create_uid
msgid "Created by"
msgstr "Creado por"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__create_date
msgid "Created on"
msgstr "Creado el"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__display_name
msgid "Display Name"
msgstr "Nombre mostrado"

#. module: mail_recipient_blocklist
#: model:ir.model.fields.selection,name:mail_recipient_blocklist.selection__mail_recipient_block_rule__pattern_type__domain
msgid "Domain"
msgstr "Dominio"

#. module: mail_recipient_blocklist
#. odoo-python
#: code:addons/mail_recipient_blocklist/models/mail_mail.py:0
msgid "Email delivery blocked by recipient blocklist rules."
msgstr ""
"El envío del correo electrónico ha sido bloqueado por las reglas de "
"la lista de bloqueados del destinatario."

#. module: mail_recipient_blocklist
#: model:ir.model.fields.selection,name:mail_recipient_blocklist.selection__mail_recipient_block_rule__pattern_type__exact
msgid "Exact email"
msgstr "Email exacto"

#. module: mail_recipient_blocklist
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_search
msgid "Group By"
msgstr "Agrupado por"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__id
msgid "ID"
msgstr "ID"

#. module: mail_recipient_blocklist
#. odoo-python
#: code:addons/mail_recipient_blocklist/models/mail_recipient_block_rule.py:0
msgid "Invalid regular expression: %s"
msgstr "Expresión regular invalida (%s)"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__write_date
msgid "Last Updated on"
msgstr "Última actualización el"

#. module: mail_recipient_blocklist
#: model:ir.model,name:mail_recipient_blocklist.model_mail_recipient_block_rule
msgid "Mail Recipient Block Rule"
msgstr "Regla de bloqueo de destinatarios de correo"

#. module: mail_recipient_blocklist
#: model:ir.model,name:mail_recipient_blocklist.model_ir_mail_server
msgid "Mail Server"
msgstr "Servidor de correo"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__name
msgid "Name"
msgstr "Nombre"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__notes
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_form
msgid "Notes"
msgstr "Notas"

#. module: mail_recipient_blocklist
#: model:ir.model,name:mail_recipient_blocklist.model_mail_mail
msgid "Outgoing Mails"
msgstr "Correos salientes"

#. module: mail_recipient_blocklist
#: model_terms:ir.actions.act_window,help:mail_recipient_blocklist.mail_recipient_block_rule_action
msgid ""
"Outgoing emails matching these rules will not be delivered to those "
"recipients."
msgstr ""
"Los correos electrónicos salientes que cumplan estas reglas no se "
"entregarán a dichos destinatarios."

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__pattern
msgid "Pattern"
msgstr "Patrón"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__pattern_type
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_search
msgid "Pattern Type"
msgstr "Tipo de patrón"

#. module: mail_recipient_blocklist
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_form
msgid "Recipient Block Rule"
msgstr "Regla de bloqueo de destinatarios de correo"

#. module: mail_recipient_blocklist
#: model:ir.actions.act_window,name:mail_recipient_blocklist.mail_recipient_block_rule_action
#: model:ir.ui.menu,name:mail_recipient_blocklist.mail_recipient_block_rule_menu
#: model_terms:ir.ui.view,arch_db:mail_recipient_blocklist.mail_recipient_block_rule_view_list
msgid "Recipient Block Rules"
msgstr "Reglas de bloqueo de destinatarios de correo"

#. module: mail_recipient_blocklist
#: model:ir.model.fields.selection,name:mail_recipient_blocklist.selection__mail_recipient_block_rule__pattern_type__regex
msgid "Regular expression"
msgstr "Expresión regular"

#. module: mail_recipient_blocklist
#: model:ir.model.fields,field_description:mail_recipient_blocklist.field_mail_recipient_block_rule__sequence
msgid "Sequence"
msgstr "Secuencia"

#. module: mail_recipient_blocklist
#. odoo-python
#: code:addons/mail_recipient_blocklist/models/mail_recipient_block_rule.py:0
msgid "The block pattern cannot be empty."
msgstr "El patrón de bloqueo no puede estar vacío."

#. module: mail_recipient_blocklist
#: model:ir.model.fields.selection,name:mail_recipient_blocklist.selection__mail_recipient_block_rule__pattern_type__wildcard
msgid "Wildcard"
msgstr "Carácter comodín"
Loading
Loading