summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/models/mail_thread.py
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2016-08-24 12:47:45 +0200
committerThibault Delavallée <tde@openerp.com>2016-09-01 12:57:05 +0200
commit0843df213c808df2291f180d44ff9efc3c1c879e (patch)
tree485fa20d975eeed3f3ca84e56905d29dea7b11b8 /addons/mass_mailing/models/mail_thread.py
parent6aebdc2ab6ff2dec95aae9b2c04f99e70b41fdbe (diff)
[FIX][IMP] mail, mass_mailing: improve making of Return-Path alias
Previously Return-Path were composed using bounce_alias-<mail_id>-<model>- <thread_id> . However this may lead to return adresses not supported by the incoming mail server. We now form the bounce alias using bounce_alis+ <mail_id>-<model>-<thread_id>. Using a + indicates that the right part of the address is for information and used to manage the bounce. Only the left part is used for the email routing, allowing the return email to effectively land in the alias mailbox.
Diffstat (limited to 'addons/mass_mailing/models/mail_thread.py')
-rw-r--r--addons/mass_mailing/models/mail_thread.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/models/mail_thread.py b/addons/mass_mailing/models/mail_thread.py
index 0931271509d..af5782b9360 100644
--- a/addons/mass_mailing/models/mail_thread.py
+++ b/addons/mass_mailing/models/mail_thread.py
@@ -29,7 +29,7 @@ class MailThread(models.AbstractModel):
# Bounce regex
# Typical form of bounce is bounce_alias-128-crm.lead-34@domain
# group(1) = the mail ID; group(2) = the model (if any); group(3) = the record ID
- bounce_re = re.compile("%s-(\d+)-?([\w.]+)?-?(\d+)?" % re.escape(bounce_alias), re.UNICODE)
+ bounce_re = re.compile("%s\+(\d+)-?([\w.]+)?-?(\d+)?" % re.escape(bounce_alias), re.UNICODE)
bounce_match = bounce_re.search(email_to)
if bounce_match:
bounced_model, bounced_thread_id = None, False