[6.1, 7.0, trunk] Text to email parsing incomplete + needs to be unified

Bug #1165531 reported by Etienne Hirt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
7.0
Fix Released
Low
OpenERP's Framework R&D
Trunk
In Progress
Low
OpenERP's Framework R&D

Bug Description

While using 6.1 mail_message to_email function I found that it does not
cope with all the possible names in the emaillist.

example: 'bla@2.ch' <bla@2.ch>, (bla@2.ch) <bla@2.ch>, "'bla@2.ch'" <bla@2.ch>, etc

The regexp in the function to_email of mail/mail_message.py should be enhanced that it also removes ", () and
even if the allowed '.

----

Note: for more details and trunk cases see also bug 1199386

Revision history for this message
Etienne Hirt (hirt) wrote :

Attach patch (from svn)

Etienne Hirt (hirt)
summary: - Text to email parsing incomplete
+ [6.1] Text to email parsing incomplete
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote : Re: [6.1] Text to email parsing incomplete

Hello Etienne,

Currently, I have checked your Issue with 6.1 as well with 7.0 and trunk, but this issue is affected only in 6.1 not in 7.0 and in trunk and It is not a blocking Issue. So, For that we can not consider this issue.

If you have a support and maintenance contract with us then you can contact with our OPW team at <email address hidden> ,they will definitely help you.

Thank you!

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Etienne Hirt (hirt) wrote : Re: [Bug 1165531] Re: [6.1] Text to email parsing incomplete

Dear Christian,

thanks for checking. I understand that this issue affecting only 6.0 and
6.1 is not corrected by openerp.

However, please set the bug to won't fix instead of invalid

Thanks

Etienne

On 20.05.2013 15:26, Twinkle Christian(OpenERP) wrote:
> Hello Etienne,
>
> Currently, I have checked your Issue with 6.1 as well with 7.0 and
> trunk, but this issue is affected only in 6.1 not in 7.0 and in trunk
> and It is not a blocking Issue. So, For that we can not consider this
> issue.
>
> If you have a support and maintenance contract with us then you can
> contact with our OPW team at <email address hidden> ,they will definitely
> help you.
>
> Thank you!
>
>
> ** Changed in: openobject-addons
> Status: New => Invalid
>

Changed in openobject-addons:
status: Invalid → Won't Fix
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote : Re: [6.1] Text to email parsing incomplete

Hi Etienne,

Even though the bug could initially not be reproduced on OpenERP 7.0, we have reproduced similar cases where the current parsing fails to extract emails. Using the standard email.utils.getaddresses is indeed a better way to implement the parsing, but it does require extra precautions. `getaddresses()` will insert empty strings in the results when parsing fails, even partially, and it will also return invalid addresses if nothing better can be extracted (e.g. ones without even the '@' character that is strictly required by RFC2822). This is presumably a safer default for the stdlib but we need somewhat stricter parsing in OpenERP.

As a result we have adapted the patch of your merge proposal for OpenERP 7.0, with extra checks on the results, and added corresponding unit tests. This has been merged in server 7.0 at revision 5198 revid <email address hidden>

Thanks for reporting the bug and submitting a patch!

Changed in openobject-addons:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
milestone: none → 7.0
status: Won't Fix → Fix Released
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Note that the bug initially affected Addons in 6.1, but the corresponding code moved to the server in 7.0, so technically the bug affects Server 7.0.

A small patch to the mail-related tests in Addons 7.0 was also necessary to keep them green (they were misusing the email_split method), and applied at rev 9760 rev-id: <email address hidden>

summary: - [6.1] Text to email parsing incomplete
+ [6.1, 7.0] Text to email parsing incomplete
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

For 7.0 the bug can be considered fixed as the main `tools.email_split` is now correct. For trunk the bug is still open as additional regex parsing need to corrected - it perhaps requires the introduction of new utility methods.

summary: - [6.1, 7.0] Text to email parsing incomplete
+ [6.1, 7.0, trunk] Text to email parsing incomplete + needs to be unified
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.