← Back to team overview

credativ team mailing list archive

[Bug 812072] Re: Invalid Mail Message Date format makes fetchmail crash permanently

 

Hello Eric,

Would you please try with the latest updated code.

If you still face the problem then you can reopen this with more
information.

Thanks.


** Changed in: openobject-addons
       Status: Expired => Invalid

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/812072

Title:
  Invalid Mail Message Date format makes fetchmail crash permanently

Status in OpenERP Addons (modules):
  Invalid

Bug description:
  A date format causes the cron job to crash and cannot recover.

  [2011-07-18 08:22:40,863][company] INFO:imap:fetchmail start checking
  for new emails on contact@xxxxxxxxxxxxxx

  [2011-07-18 08:22:41,245][company]
  DEBUG:tools:tools.misc.html2plaintext: cannot use BeautifulSoup,
  fallback to lxml.etree.HTMLParser

  [2011-07-18 08:22:41,273][company] DEBUG:translate:no translation
  language detected, skipping translation for "'receive'"

  [2011-07-18 08:22:41,280][company] ERROR:db.cursor:bad query: insert
  into "mailgate_message"
  (id,"description","server_type","email_bcc","email_to","email_cc","date","partner_id","server_id","user_id","name","email_from","references","model","res_id","message_id","history",create_uid,create_date)
  values (2714,E'

  ×ð¾´µÄÓû§ÄúºÃ:

  

  ½üÆÚÒòÃÜÂë¼òµ¥¶øÔì³ÉÓÊÏäÕ˺ű»µÁÇé¿öƵ·¢£¬ÎªÁË·ÀÖ¹ÄúÕý³£µÄÓÊÏäÕ˺ű»ÓÃÓÚ·Ç·¨À¬»øÓʼþ·¢ËÍ£¬ÎÒÃǶÔϵͳÔö¼ÓÁËÈõÃÜÂë¼ì²â¹æÔò£¬

  ¾­ÏµÍ³¼ì²âÄúµÄÃÜÂë¹ýÓÚ¼òµ¥,¼«Ò×±»·Ç·¨·Ö×Ó½øÐÐÃÜÂëÆƽ⣬µ«ÊÇÓÉÓÚÄúµÄÃÜÂëÊôÓÚ¼ÓÃÜÐÅÏ¢£¬ÎÒÃÇÎÞ·¨²é¿´£¬ËùÒÔÇëÄú×ÔÐм°Ê±ÊÖ¶¯ÐÞ¸ÄÃÜ

  Â룬·ñÔòϵͳ½«ÏÞÖÆÄúÿÈÕÍâ·¢ÓʼþµÄÊýÁ¿Îª20·â£¬ÐÞ¸ÄÍêÃÜÂëºóϵͳ½«×Ô¶¯È¡Ïû¶ÔÄúµÄÓÊÏäÏÞÖÆ!

  

  *ÃÜÂëÉèÖÃСÌùÊ¿*

  

  ÇëÄú²ÉÄÉÎÒÃÇÌṩ¸øÄúµÄÒÔϹØÓÚÃÜÂëÉèÖõÄС½¨Ò飺

  

  1. ÃÜÂ볤¶È±ØÐëÔÚ6-20λ

  

  2. ±ØÐë²ÉÓÃÎÞÐòµÄ¡°×Öĸ+Êý×Ö¡±µÄ×éºÏ·½Ê½£»¸ñʽÈ磺c1h2i3n4a5

  

  3.
  ²»Òª²ÉÓõÝÔö»òÕߵݼõµÄÄÚÈÝ£¬È磺¡°ABCD1234¡±¡¢¡°4321DCBA¡±£¬ÒòΪÕâÑùµÄÃÜÂëºÜÈÝÒ×±»ÃÜÂë¼ÆË㹤¾ßËùÆƽ⣻

  

  4. ÃÜÂëÖв»Òª°üº¬ÓʼþÕ˺ż°ÓʼþÓòÃû

  

  5.
  Èç¹ûÄúʹÓÿͻ§¶ËÈí¼þ£¨foxmail,outlookµÈ£©ÊÕ·¢Óʼþ£¬ÔÚwebmailÉÏÐÞ¸ÄÃÜÂëºó£¬ÇëÁ¢¼´½øÈë¿Í»§¶Ëͬ²½½øÐÐÃÜÂëÉèÖ㬷ñÔò¿Í»§¶Ë½«ÎÞ·¨Õý³£ÊÕ·¢Óʼþ¡£

  

  ±£»¤ÄúµÄÓÊÏäÃÜÂ룬¾ÍÊDZ£»¤ÄúÆóÒµµÄÎÞÐÎ×ʲú£¬¸ÐлÄú¶ÔÖйúÍòÍø¡°ÈõÃÜÂëÓÅ»¯¡±¹¤×÷С×éµÄÖ§³Ö£¡

  ',E'imap',NULL,E'contact@xxxxxxxxxxxxxx',NULL,E'Date: Tue, 12 Jul 2011
  01:29:56 +0800',NULL,6,10,E'ÄúµÄÃÜÂë¹ýÓÚ¼òµ¥,
  Ç뾡¿ìÐÞ¸Ä!',E'do_not_reply@xxxxxxxxxxx;',NULL,E'crm.lead',698,E'<1310405396$19244$22878693@do_not_reply@xxxxxxxxxxx>',E'True',10,now())

  Traceback (most recent call last):

    File "/usr/local/lib/python2.6/dist-packages/openerp-
  server_9040/sql_db.py", line 131, in execute

      res = self._obj.execute(query, params)

  DataError: invalid input syntax for type timestamp: "Date: Tue, 12 Jul
  2011 01:29:56 +0800"

  LINE 23: ',E'imap',NULL,E'contact@xxxxxxxxxxxxxx',NULL,E'Date: Tue, 12
  J...

                                                      ^


  [2011-07-18 08:22:41,281][company] WARNING:imap:[01]: invalid input
  syntax for type timestamp: "Date: Tue, 12 Jul 2011 01:29:56 +0800"

  [2011-07-18 08:22:41,281][company] WARNING:imap:[02]: LINE 23:
  ',E'imap',NULL,E'contact@xxxxxxxxxxxxxx',NULL,E'Date: Tue, 12 J...

  [2011-07-18 08:22:41,281][company] WARNING:imap:[03]:
  ^

  [2011-07-18 08:22:41,282][company] ERROR:db.cursor:bad query: SELECT
  email_server.active,email_server.user,email_server.date,email_server.password,email_server.port,email_server.note,email_server.user_id,email_server.name,email_server.is_ssl,email_server.object_id,email_server.server,email_server.priority,email_server.attach,email_server.state,email_server.type,email_server.action_id,email_server.id
  FROM "email_server" WHERE email_server.id IN (7) ORDER BY id

  Traceback (most recent call last):

    File "/usr/local/lib/python2.6/dist-packages/openerp-
  server_9040/sql_db.py", line 131, in execute

      res = self._obj.execute(query, params)

  InternalError: current transaction is aborted, commands ignored until
  end of transaction block


  [2011-07-18 08:22:41,283][company] WARNING:imap:current transaction is
  aborted, commands ignored until end of transaction block

  [2011-07-18 08:22:41,284][company] ERROR:db.cursor:bad query: SELECT
  email_server.active,email_server.user,email_server.date,email_server.password,email_server.port,email_server.note,email_server.user_id,email_server.name,email_server.is_ssl,email_server.object_id,email_server.server,email_server.priority,email_server.attach,email_server.state,email_server.type,email_server.action_id,email_server.id
  FROM "email_server" WHERE email_server.id IN (8) ORDER BY id

  Traceback (most recent call last):

    File "/usr/local/lib/python2.6/dist-packages/openerp-
  server_9040/sql_db.py", line 131, in execute

      res = self._obj.execute(query, params)

  InternalError: current transaction is aborted, commands ignored until
  end of transaction block


  I temporarily changed the mail_gateway/History function around line 162 as followed:
  #                    'date': email_date or time.strftime('%Y-%m-%d %H:%M:%S'),
                      'date': time.strftime('%Y-%m-%d %H:%M:%S'),#EC

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/812072/+subscriptions