Open Bart-dh opened 4 months ago
@chienandalu
Hi, @Bart-dh
It could be that the original mail had that catchall@test.odoo.com
in the extra recipients, which are added to the suggested recipients for the message replies:
https://github.com/OCA/social/blob/27f38091da019420b4599c978295d4fd0094e76a/mail_tracking/models/mail_thread.py#L65-L73
We try to dectect the existing aliases:
In order to discard them
This is where we retrieve them (in v17 there's a new way to set the catchall with the mail.alias.domain
records that allow multi-domain catchalls):
https://github.com/OCA/social/blob/27f38091da019420b4599c978295d4fd0094e76a/mail_tracking/models/mail_alias.py#L10-L23
Also check if a partner could have that catchall email set, as it could be that is assigning it directly: https://github.com/OCA/social/blob/27f38091da019420b4599c978295d4fd0094e76a/mail_tracking/models/mail_thread.py#L85-L86
@chienandalu what is the reason for adding extra suggested recipients? To me it looks like extra functionality which is irrelevant to the rest of this module, but I could be mistaken
It's inside the scope, as Odoo is not considering CC unless a contact matching the email address exists, and this module does it.
module: mail_tracking version: 17.0 EE Odoo.sh hosting
For some reason unknown to me, at some point when sending an email, catchall@test.odoo.com gets added as recipient, resulting in the sent mail returning to Odoo immediately, and starting an endless email loop. A client of ours sent 21k emails this weekend to a supplier because of this loop.
Note that the reply-to is catchall@test.com instead of catchall@test.odoo.com, so I don't know where the default catchall comes from. I have noticed that the module also adds extra suggested recipients though, so maybe this is related.
I have no proof that this module caused the issue, other than it started after installation, and does not happen anymore after deinstallation.