[issue2551000] MailGW currently broken for multipart messages (python2.7)

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <1536158677.59.0.56676864532.issue2551000@psf.upfronthosting.co.za>
New submission from Ralf Schlatterbeck:

Tested with python2.7, not python3:

The mail parsing in mailgw.py in class RoundupMessage (which now
inherits from email.message.Message) relies on recursively parsing mails
using the method extract_content. After the unpacking step this fails
because get_payload returns a email.message.Message object, not a
RoundupMessage, so subsequent recursive calls fail because the object
has no extract_content method. The traceback (for an attachment of type
message/rfc822 but any multipart mail currently fails) is given below.

Looks like we currently don't have any multipart examples in the mail
gateway tests?

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1450, in handle_Message
    return self.handle_message(message)
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1521, in handle_message
    return self._handle_message(message)
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1533, in _handle_message
    nodeid = self.parsed_message.parse ()
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1196, in parse
    ret = method()
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
1005, in get_content_and_attachments
    html2text=html2text )
  File "/usr/local/lib/python2.7/dist-packages/roundup/mailgw.py", line
309, in extract_content
    new_content, new_attach, html_part = part.extract_content(
AttributeError: Message instance has no attribute 'extract_content'

----------
components: Mail interface
messages: 6239
nosy: schlatterbeck
priority: high
severity: normal
status: new
title: MailGW currently broken for multipart messages (python2.7)
type: crash
versions: devel

________________________________________________
Roundup tracker <[email protected]>
<http://issues.roundup-tracker.org/issue2551000>
________________________________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.