Some e-mails cannot be imported if they don't have a subject

Bug #1222859 reported by Yann Papouin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

When messages are processed (via mail_thread.py), if an email doesn't have a valid subject header, it will raise a "key error" exception and stop the message import with parsing process.

Related branches

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello Yann,

Would you please paste your error ? And with which version you are using ? Have you tested it with stable v7.0?
So, please provide more information on this issue.

Thanks & waiting for your answer.

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :
Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Yann Papouin (yann-papouin) wrote :

2013-10-10 07:27:35,101 3565 ERROR ? fetchmail: Failed to fetch mail from imap server Notification (INFO)
Traceback (most recent call last):
  File "/media/raid2to/decindus/tools/openerp-6.1/addons/fetchmail/fetchmail.py", line 196, in fetch_mail
    context=context)
  File "/media/raid2to/decindus/tools/openerp-6.1/addons/mail/mail_thread.py", line 361, in message_process
    match = tools.res_re.search(msg['subject'])
TypeError: expected string or buffer

That's because msg['subject'] is None if the subject is empty or not parseable

Changed in openobject-addons:
status: Incomplete → New
Revision history for this message
Yann Papouin (yann-papouin) wrote :

I'm using 6.1 but since this part of the code didn't change in 7.0/trunk, I suppose that it will also break on these versions.

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.