[FIX] OPW 577359: mail,fetchmail: more robust handling of incoming mails
authorOlivier Dony <odo@openerp.com>
Fri, 27 Jul 2012 13:50:07 +0000 (15:50 +0200)
committerOlivier Dony <odo@openerp.com>
Fri, 27 Jul 2012 13:50:07 +0000 (15:50 +0200)
commit2eed2aa30fb94765187e8862dd635f056c0dcea6
tree49e97c7b0bbba2aa7fc987bb963b8cdb77bb66c5
parentd62c46d505be9887936436f451060133edbea126
[FIX] OPW 577359: mail,fetchmail: more robust handling of incoming mails

- Support inconsistent encoding specifications in
  mail bodies with crashing
- Mark messages as seen on IMAP servers only when they
  have actually been processed
- Properly commit after each incoming message, avoiding
  global rollback in case of later failure (during
  fetchmail cron task)
- Avoid crashing when importing mail without a proper
  From header

Note: this fix depends on a corresponding server fix
(revno: 4248
rev-id: odo@openerp.com-20120727134402-vafp3wqlwnjsxntk)

bzr revid: odo@openerp.com-20120727135007-awudey1lkqtzoaot
addons/fetchmail/fetchmail.py
addons/mail/mail_message.py
addons/mail/mail_thread.py