#1563 Trap IndexError on malformed incoming email

v1.0.0
closed
sf-2 (994)
General
nobody
2015-08-20
2011-02-24
No

Example traceback:

Module allura.command.reactor:204 in callback
>>  method(msg.delivery_info['routing_key'], data)
Module forgemail.reactors.common_react:38 in received_email
>>  msg = util.parse_message(data['data'])
Module forgemail.lib.util:66 in parse_message
>>  result['message_id'] = _parse_message_id(msg.get('Message-ID'))[0]
IndexError: list index out of range
app: None
exchange: 'audit'
key: u'forgemail.received_email'
message:
'''{\'data\': \'From: "Rxadhl" <xbeilp@geek.net>\
Subject: =?gb2312?B?tdoyMDExxOoxMDm97NbQufq9+LP2v9rJzMa3tLq9u7vhUbTz1bm66M3D?=\
To: dagong123@qq.com\
Content-Type: text/html;\
\\tcharset="gb2312"\
MIME-Version: 1.0\
Content-Transfer-Encoding: base64\
Reply-To: quangjh@163.com\
Date: Thu, 24 Feb 2011 22:16:53 +0800\
\
PEhUTUw+PEhFQUQ+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4wMC4yOTAwLjYwMDMiIG5hbWU9\
R0VORVJBVE9SPjwvSEVBRD4NCjxCT0RZIHNjcm9sbD15ZXM+PElNRyBzcmM9Imh0dHA6Ly9pbWcu\
ZGl5dHJhZGUuY29tL2NkaW1nLzEyMDQ1MzAvMTc3NDY3NzUvMC8xMjkyMzczNDc4LmpwZyI+PC9C\
T0RZPjwvSFRNTD4NCg==\',
 \'mailfrom\': \'xbeilp@geek.net\',
 \'peer\': (\'183.18.78.4\', 8290),
 \'rcpttos\': [\'dagong123@qq.com\']}'''

project: None
user: None

Discussion

  • Rick Copeland - 2011-02-24
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,4 +1,5 @@
     Example traceback:
    +
     ~~~~
     Module allura.command.reactor:204 in callback
     >>  method(msg.delivery_info['routing_key'], data)
    
     
  • Rick Copeland - 2011-02-24
    • status: in-progress --> code-review
    • assigned_to: Rick Copéland --> Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2011-02-24
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2011-02-24

    Looks good

     
  • Rick Copeland - 2011-02-24
    • assigned_to: Dave Brondsema --> Rick Copéland
     

Log in to post a comment.