odoo/odoo#229992

Created by fw-bot
Merged at 5ca0380c4d1566c13d8ddae5cf1dea283cc7ba79

Statuses:

label
odoo-dev:saas-18.3-17.0-reset_bounce_normalize_mail-BVE-467868-fw
head
a1927baa1d4400aa76a65be67065ea8eb1969686
merged
6 months ago by Baptiste Vergote (bve)
odoo/odoo
17.0 #227273
18.0 #229889
saas-18.2 #229981
saas-18.3 #229992
saas-18.4 #230005
19.0 #230010
saas-19.1
saas-19.2
master #230016

[FIX] mail: reset bounce from incoming email

Incoming bounce email linked to a partner in the db is incrementing (in message_receive_bounce)
the message_bounce value during the handling of
the bounces (in _routing_handle_bounce)

If later, an email linked to a partner existing in the db (and having a message_bounce > 0) is received (and not bounce). The _routing_reset_bounce is
called to reset the message_bounce.

However, prior to this fix, due to not normalizing the email_from contained in the msg_dict,
well, the record having this value was never found and thus, not reset to 0.

In 4935208, some of the user were unlinked for
mail.discuss.channel when replying to one of the
received email.

opw-4935208


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #229889
Forward-Port-Of: #227273