Files
odoo_source/addons/test_mail
Nasreddin Boulif (bon) 4db8a60619 [FIX] mail,test_mail: message_route; filter emails with wrong domain
Steps to reproduce:

  - Install CRM and Helpdesk modules (for test purposes)
  - Set a custom alias domain (e.g. "mydomain.com")
  - Go to CRM > Configuration > Sales Teams
  - Check that a team has en email Alias (e.g. "info@mydomain.com")
  - Go to Helpdesk > Configuration > Helpdesk Teams
  - Check that a team has en email Alias (e.g. "support@mydomain.com")
  - Email your instance with the following `to` value:
    info@mydomain.com, support@test.com
    (notice second email does not match the DB alias domain)
  - Go to CRM : A task has been created
  - Go to Helpdesk : A ticket has been created

Issue:

  The ticket in Helpdesk should not have been created.

Cause:

  The message_route method does not check the domain of the email
  address before creating the routes.

Solution:

  If `mail.catchall.domain.allowed` system parameter is set, filter to
  only keep the emails address that match the allowed domains (including
  domain set in `mail.catchall.domain` system parameter).

  The value of `mail.catchall.domain.allowed` system parameter should
  be a comma separated list of domains. e.g. `example.com,example.org`

opw-3150972

closes odoo/odoo#128346

X-original-commit: 5b73428104789433fd65431f7631a2e9eb863b2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-13 10:46:18 +02:00
..
2023-06-12 22:39:26 +02:00