Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email message with no content and only attachments is not extracted #57

Closed
tonecas opened this issue Nov 30, 2018 · 22 comments
Closed

Email message with no content and only attachments is not extracted #57

tonecas opened this issue Nov 30, 2018 · 22 comments

Comments

@tonecas
Copy link

tonecas commented Nov 30, 2018

When a .msg file has no content there is no extraction. the directory is not created and the attachments are not extracted into it

@TheElementalOfDestruction
Copy link
Collaborator

Can you send me a physical example ( arceusthe@gmail.com ) so I can better figure out what is causing this?

@BenJoParadise
Copy link

I've encountered this issue as well, here's a stacktrace:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/site-packages/extract_msg/__main__.py", line 54, in <module>
    msg = Message(filename)
  File "/usr/local/lib/python2.7/site-packages/extract_msg/message.py", line 76, in __init__
    self.attachments
  File "/usr/local/lib/python2.7/site-packages/extract_msg/message.py", line 432, in attachments
    self._attachments.append(self.__attachmentClass(self, attachmentDir))
  File "/usr/local/lib/python2.7/site-packages/extract_msg/attachment.py", line 63, in __init__
    self.__data = msg.__class__(self.msg.path, self.__prefix, self.__class__)
  File "/usr/local/lib/python2.7/site-packages/extract_msg/message.py", line 76, in __init__
    self.attachments
  File "/usr/local/lib/python2.7/site-packages/extract_msg/message.py", line 432, in attachments
    self._attachments.append(self.__attachmentClass(self, attachmentDir))
  File "/usr/local/lib/python2.7/site-packages/extract_msg/attachment.py", line 28, in __init__
    constants.TYPE_ATTACHMENT)
  File "/usr/local/lib/python2.7/site-packages/extract_msg/properties.py", line 18, in __init__
    self.__len = len(stream)
TypeError: object of type 'NoneType' has no len()

@TheElementalOfDestruction
Copy link
Collaborator

Hello, @BenJoParadise, would you mind running the following code for me and responding with the output? Thank you.

import olefile
import pprint
a = olefile.OleFileIO('Path/to/msg/file.msg') # replace the path with the path to the
                                              # msg file you are trying to get to work.
pprint.pprint(a.listdir(True, True))

@BenJoParadise
Copy link

Sure, here's the output:

[['__attach_version1.0_#00000000'],
 ['__attach_version1.0_#00000000', '__properties_version1.0'],
 ['__attach_version1.0_#00000000', '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000000', '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000000', '__substg1.0_3701000D'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__properties_version1.0'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_37010102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_37020102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_370E001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_3712001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000000',
  '__substg1.0_8000001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__properties_version1.0'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_37010102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_37020102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_370E001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_3712001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__attach_version1.0_#00000001',
  '__substg1.0_8000001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__properties_version1.0'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__properties_version1.0'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_0FF60102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_0FFF0102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_3002001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_3003001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_300B0102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_5FF6001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__recip_version1.0_#00000000',
  '__substg1.0_5FF70102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_001A001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0037001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_003D001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0070001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_00710102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0E02001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0E03001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0E04001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_0E1D001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_1000001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_10090102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_300B0102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_3FFA001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_8007001F'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_800C0102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_800D0102'],
 ['__attach_version1.0_#00000000',
  '__substg1.0_3701000D',
  '__substg1.0_800E0102'],
 ['__attach_version1.0_#00000000', '__substg1.0_37020102'],
 ['__attach_version1.0_#00000000', '__substg1.0_37090102'],
 ['__attach_version1.0_#00000001'],
 ['__attach_version1.0_#00000001', '__properties_version1.0'],
 ['__attach_version1.0_#00000001', '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000001', '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000001', '__substg1.0_37010102'],
 ['__attach_version1.0_#00000001', '__substg1.0_37020102'],
 ['__attach_version1.0_#00000001', '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000001', '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000001', '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000001', '__substg1.0_37090102'],
 ['__attach_version1.0_#00000001', '__substg1.0_8000001F'],
 ['__attach_version1.0_#00000002'],
 ['__attach_version1.0_#00000002', '__properties_version1.0'],
 ['__attach_version1.0_#00000002', '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000002', '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000002', '__substg1.0_37010102'],
 ['__attach_version1.0_#00000002', '__substg1.0_37020102'],
 ['__attach_version1.0_#00000002', '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000002', '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000002', '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000002', '__substg1.0_37090102'],
 ['__attach_version1.0_#00000002', '__substg1.0_8000001F'],
 ['__attach_version1.0_#00000003'],
 ['__attach_version1.0_#00000003', '__properties_version1.0'],
 ['__attach_version1.0_#00000003', '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000003', '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_37010102'],
 ['__attach_version1.0_#00000003', '__substg1.0_37020102'],
 ['__attach_version1.0_#00000003', '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_370E001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_3712001F'],
 ['__attach_version1.0_#00000003', '__substg1.0_8000001F'],
 ['__attach_version1.0_#00000005'],
 ['__attach_version1.0_#00000005', '__properties_version1.0'],
 ['__attach_version1.0_#00000005', '__substg1.0_0FF90102'],
 ['__attach_version1.0_#00000005', '__substg1.0_3001001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_37010102'],
 ['__attach_version1.0_#00000005', '__substg1.0_37020102'],
 ['__attach_version1.0_#00000005', '__substg1.0_3703001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_3704001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_3707001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_370E001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_3712001F'],
 ['__attach_version1.0_#00000005', '__substg1.0_8000001F'],
 ['__nameid_version1.0'],
 ['__nameid_version1.0', '__substg1.0_00020102'],
 ['__nameid_version1.0', '__substg1.0_00030102'],
 ['__nameid_version1.0', '__substg1.0_00040102'],
 ['__nameid_version1.0', '__substg1.0_10000102'],
 ['__nameid_version1.0', '__substg1.0_10010102'],
 ['__nameid_version1.0', '__substg1.0_10020102'],
 ['__nameid_version1.0', '__substg1.0_10030102'],
 ['__nameid_version1.0', '__substg1.0_10040102'],
 ['__nameid_version1.0', '__substg1.0_10050102'],
 ['__nameid_version1.0', '__substg1.0_10060102'],
 ['__nameid_version1.0', '__substg1.0_10070102'],
 ['__nameid_version1.0', '__substg1.0_10080102'],
 ['__nameid_version1.0', '__substg1.0_10090102'],
 ['__nameid_version1.0', '__substg1.0_100A0102'],
 ['__nameid_version1.0', '__substg1.0_100B0102'],
 ['__nameid_version1.0', '__substg1.0_100C0102'],
 ['__nameid_version1.0', '__substg1.0_100D0102'],
 ['__nameid_version1.0', '__substg1.0_100E0102'],
 ['__nameid_version1.0', '__substg1.0_100F0102'],
 ['__nameid_version1.0', '__substg1.0_10100102'],
 ['__nameid_version1.0', '__substg1.0_10110102'],
 ['__nameid_version1.0', '__substg1.0_10120102'],
 ['__nameid_version1.0', '__substg1.0_10130102'],
 ['__nameid_version1.0', '__substg1.0_10140102'],
 ['__nameid_version1.0', '__substg1.0_10150102'],
 ['__nameid_version1.0', '__substg1.0_10160102'],
 ['__nameid_version1.0', '__substg1.0_10170102'],
 ['__nameid_version1.0', '__substg1.0_10180102'],
 ['__nameid_version1.0', '__substg1.0_10190102'],
 ['__nameid_version1.0', '__substg1.0_101A0102'],
 ['__nameid_version1.0', '__substg1.0_101B0102'],
 ['__nameid_version1.0', '__substg1.0_101C0102'],
 ['__nameid_version1.0', '__substg1.0_101D0102'],
 ['__nameid_version1.0', '__substg1.0_101E0102'],
 ['__properties_version1.0'],
 ['__recip_version1.0_#00000000'],
 ['__recip_version1.0_#00000000', '__properties_version1.0'],
 ['__recip_version1.0_#00000000', '__substg1.0_0FF60102'],
 ['__recip_version1.0_#00000000', '__substg1.0_0FF90102'],
 ['__recip_version1.0_#00000000', '__substg1.0_0FFF0102'],
 ['__recip_version1.0_#00000000', '__substg1.0_3001001F'],
 ['__recip_version1.0_#00000000', '__substg1.0_3002001F'],
 ['__recip_version1.0_#00000000', '__substg1.0_3003001F'],
 ['__recip_version1.0_#00000000', '__substg1.0_300B0102'],
 ['__recip_version1.0_#00000000', '__substg1.0_5FF6001F'],
 ['__recip_version1.0_#00000000', '__substg1.0_5FF70102'],
 ['__substg1.0_001A001F'],
 ['__substg1.0_0037001F'],
 ['__substg1.0_003D001F'],
 ['__substg1.0_0070001F'],
 ['__substg1.0_00710102'],
 ['__substg1.0_0E02001F'],
 ['__substg1.0_0E03001F'],
 ['__substg1.0_0E04001F'],
 ['__substg1.0_0E1D001F'],
 ['__substg1.0_1000001F'],
 ['__substg1.0_10090102'],
 ['__substg1.0_300B0102'],
 ['__substg1.0_3FFA001F'],
 ['__substg1.0_65E20102'],
 ['__substg1.0_65E30102'],
 ['__substg1.0_8007001F'],
 ['__substg1.0_800C0102'],
 ['__substg1.0_800D0102'],
 ['__substg1.0_800E0102']]

Process finished with exit code 0

@TheElementalOfDestruction
Copy link
Collaborator

Thank you.

In case you are curious, @BenJoParadise, from what I can tell, what is happening in your case is that the program found an embedded msg file, which also has an attachment. However the attachment does not have a properties file, which shouldn't be possible. However, I will need to take a bit of time to investigate.

@TheElementalOfDestruction
Copy link
Collaborator

Or not. Huh. This is very strange.

@BenJoParadise
Copy link

Thanks for the quick and informative response @TheElementalOfCreation, standing by to see what you find out.

@TheElementalOfDestruction
Copy link
Collaborator

Give me one second and I'll need you to run one more code for me.

@GavrielFilippov
Copy link

attached is a zipped email returning the same error:
eml and txt files attached.zip

@TheElementalOfDestruction
Copy link
Collaborator

@BenJoParadise

import olefile
import pprint

a = olefile.OleFileIO('Path/to/msg/file.msg') # replace the path with the path to the
                                              # msg file you are trying to get to work.
b = ['/'.join(x) for x in a.listdir()]
c = {x: a.get_size(x) for x in b}
pprint.pprint(c)

@BenJoParadise
Copy link

{'__attach_version1.0_#00000000/__properties_version1.0': 312,
 '__attach_version1.0_#00000000/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000000/__substg1.0_3001001F': 38,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__properties_version1.0': 408,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_3001001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_37010102': 3191,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_3704001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_3707001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_370E001F': 20,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_3712001F': 60,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000000/__substg1.0_8000001F': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__properties_version1.0': 408,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_3001001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_37010102': 1459,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_3704001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_3707001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_370E001F': 20,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_3712001F': 60,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__attach_version1.0_#00000001/__substg1.0_8000001F': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__properties_version1.0': 744,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__properties_version1.0': 312,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_0FF60102': 4,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_0FF90102': 86,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_0FFF0102': 86,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_3001001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_3002001F': 8,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_3003001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_300B0102': 18,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_5FF6001F': 24,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__recip_version1.0_#00000000/__substg1.0_5FF70102': 86,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_001A001F': 16,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0037001F': 38,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_003D001F': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0070001F': 38,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_00710102': 22,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0E02001F': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0E03001F': 0,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0E04001F': 26,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_0E1D001F': 38,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_1000001F': 438,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_10090102': 28761,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_300B0102': 16,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_3FFA001F': 44,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_8007001F': 8,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_800C0102': 3132,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_800D0102': 314,
 '__attach_version1.0_#00000000/__substg1.0_3701000D/__substg1.0_800E0102': 16,
 '__attach_version1.0_#00000000/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000000/__substg1.0_37090102': 3512,
 '__attach_version1.0_#00000001/__properties_version1.0': 424,
 '__attach_version1.0_#00000001/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000001/__substg1.0_3001001F': 40,
 '__attach_version1.0_#00000001/__substg1.0_37010102': 4361,
 '__attach_version1.0_#00000001/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000001/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000001/__substg1.0_3704001F': 0,
 '__attach_version1.0_#00000001/__substg1.0_3707001F': 40,
 '__attach_version1.0_#00000001/__substg1.0_37090102': 3512,
 '__attach_version1.0_#00000001/__substg1.0_8000001F': 0,
 '__attach_version1.0_#00000002/__properties_version1.0': 424,
 '__attach_version1.0_#00000002/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000002/__substg1.0_3001001F': 32,
 '__attach_version1.0_#00000002/__substg1.0_37010102': 11,
 '__attach_version1.0_#00000002/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000002/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000002/__substg1.0_3704001F': 0,
 '__attach_version1.0_#00000002/__substg1.0_3707001F': 32,
 '__attach_version1.0_#00000002/__substg1.0_37090102': 3512,
 '__attach_version1.0_#00000002/__substg1.0_8000001F': 0,
 '__attach_version1.0_#00000003/__properties_version1.0': 408,
 '__attach_version1.0_#00000003/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000003/__substg1.0_3001001F': 24,
 '__attach_version1.0_#00000003/__substg1.0_37010102': 3191,
 '__attach_version1.0_#00000003/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000003/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000003/__substg1.0_3704001F': 24,
 '__attach_version1.0_#00000003/__substg1.0_3707001F': 24,
 '__attach_version1.0_#00000003/__substg1.0_370E001F': 20,
 '__attach_version1.0_#00000003/__substg1.0_3712001F': 60,
 '__attach_version1.0_#00000003/__substg1.0_8000001F': 0,
 '__attach_version1.0_#00000005/__properties_version1.0': 408,
 '__attach_version1.0_#00000005/__substg1.0_0FF90102': 4,
 '__attach_version1.0_#00000005/__substg1.0_3001001F': 24,
 '__attach_version1.0_#00000005/__substg1.0_37010102': 3813,
 '__attach_version1.0_#00000005/__substg1.0_37020102': 0,
 '__attach_version1.0_#00000005/__substg1.0_3703001F': 8,
 '__attach_version1.0_#00000005/__substg1.0_3704001F': 24,
 '__attach_version1.0_#00000005/__substg1.0_3707001F': 24,
 '__attach_version1.0_#00000005/__substg1.0_370E001F': 20,
 '__attach_version1.0_#00000005/__substg1.0_3712001F': 60,
 '__attach_version1.0_#00000005/__substg1.0_8000001F': 0,
 '__nameid_version1.0/__substg1.0_00020102': 176,
 '__nameid_version1.0/__substg1.0_00030102': 1624,
 '__nameid_version1.0/__substg1.0_00040102': 3290,
 '__nameid_version1.0/__substg1.0_10000102': 56,
 '__nameid_version1.0/__substg1.0_10010102': 48,
 '__nameid_version1.0/__substg1.0_10020102': 48,
 '__nameid_version1.0/__substg1.0_10030102': 40,
 '__nameid_version1.0/__substg1.0_10040102': 48,
 '__nameid_version1.0/__substg1.0_10050102': 40,
 '__nameid_version1.0/__substg1.0_10060102': 64,
 '__nameid_version1.0/__substg1.0_10070102': 48,
 '__nameid_version1.0/__substg1.0_10080102': 48,
 '__nameid_version1.0/__substg1.0_10090102': 64,
 '__nameid_version1.0/__substg1.0_100A0102': 56,
 '__nameid_version1.0/__substg1.0_100B0102': 48,
 '__nameid_version1.0/__substg1.0_100C0102': 48,
 '__nameid_version1.0/__substg1.0_100D0102': 72,
 '__nameid_version1.0/__substg1.0_100E0102': 48,
 '__nameid_version1.0/__substg1.0_100F0102': 64,
 '__nameid_version1.0/__substg1.0_10100102': 32,
 '__nameid_version1.0/__substg1.0_10110102': 32,
 '__nameid_version1.0/__substg1.0_10120102': 40,
 '__nameid_version1.0/__substg1.0_10130102': 40,
 '__nameid_version1.0/__substg1.0_10140102': 48,
 '__nameid_version1.0/__substg1.0_10150102': 96,
 '__nameid_version1.0/__substg1.0_10160102': 64,
 '__nameid_version1.0/__substg1.0_10170102': 48,
 '__nameid_version1.0/__substg1.0_10180102': 88,
 '__nameid_version1.0/__substg1.0_10190102': 56,
 '__nameid_version1.0/__substg1.0_101A0102': 32,
 '__nameid_version1.0/__substg1.0_101B0102': 64,
 '__nameid_version1.0/__substg1.0_101C0102': 64,
 '__nameid_version1.0/__substg1.0_101D0102': 48,
 '__nameid_version1.0/__substg1.0_101E0102': 32,
 '__properties_version1.0': 784,
 '__recip_version1.0_#00000000/__properties_version1.0': 312,
 '__recip_version1.0_#00000000/__substg1.0_0FF60102': 4,
 '__recip_version1.0_#00000000/__substg1.0_0FF90102': 86,
 '__recip_version1.0_#00000000/__substg1.0_0FFF0102': 86,
 '__recip_version1.0_#00000000/__substg1.0_3001001F': 24,
 '__recip_version1.0_#00000000/__substg1.0_3002001F': 8,
 '__recip_version1.0_#00000000/__substg1.0_3003001F': 24,
 '__recip_version1.0_#00000000/__substg1.0_300B0102': 18,
 '__recip_version1.0_#00000000/__substg1.0_5FF6001F': 24,
 '__recip_version1.0_#00000000/__substg1.0_5FF70102': 86,
 '__substg1.0_001A001F': 16,
 '__substg1.0_0037001F': 114,
 '__substg1.0_003D001F': 0,
 '__substg1.0_0070001F': 114,
 '__substg1.0_00710102': 22,
 '__substg1.0_0E02001F': 0,
 '__substg1.0_0E03001F': 0,
 '__substg1.0_0E04001F': 26,
 '__substg1.0_0E1D001F': 114,
 '__substg1.0_1000001F': 418,
 '__substg1.0_10090102': 11192,
 '__substg1.0_300B0102': 16,
 '__substg1.0_3FFA001F': 44,
 '__substg1.0_65E20102': 20,
 '__substg1.0_65E30102': 21,
 '__substg1.0_8007001F': 8,
 '__substg1.0_800C0102': 3132,
 '__substg1.0_800D0102': 314,
 '__substg1.0_800E0102': 16}

@TheElementalOfDestruction
Copy link
Collaborator

Okay, this is VERY interesting. I just saw the example and took a look at it and I am baffled at the moment. I'm going to take a deeper look at this. I'll get back to you when I know more, and then once we eventually have a fix, @BenJoParadise

I also took a look at the data you posted and it confirms that what I thought was happening is NOT what is happening.

@BenJoParadise
Copy link

@TheElementalOfCreation sounds good, thanks for the help, let me know if you need anything else.

@TheElementalOfDestruction
Copy link
Collaborator

@BenJoParadise Found the problem. I accidentally forgot to change a line when I made a change to the way Message._getStream function. Should be fixed when we push version 0.21.0, although that will be at least a few days away as we need to finish with some major stuff we are working on right now.

@BenJoParadise
Copy link

@TheElementalOfCreation awesome news! Thanks for the quick fix, i'll be looking forward for the next release.

@BenJoParadise
Copy link

@tonecas sorry for hijacking your issue. I hope the solution will work for you too.

@TheElementalOfDestruction
Copy link
Collaborator

For now, you can manually modify your installation to fix it. Simply change

self.__props = Properties(
    self.msg._getStream(self.msg.prefixList + [self.__dir, '__properties_version1.0']),
    constants.TYPE_ATTACHMENT)

in attachment.Attachment.__init__ to:

self.__props = Properties(
    self.msg._getStream([self.__dir, '__properties_version1.0']),
    constants.TYPE_ATTACHMENT)

@BenJoParadise
Copy link

Will do, thanks.

@TheElementalOfDestruction
Copy link
Collaborator

@BenJoParadise Going to be honest, I have no idea how any emails with embedded msg files have been working properly at all. Well, actually I think it was literally lust plain luck that the properties files existed in the right places or something. I don't know. shrugs

@BenJoParadise
Copy link

Don't you just love it when that happens XD

@BenJoParadise
Copy link

@TheElementalOfCreation I noticed that if the message has an attached .msg file, it is parsed.

  1. Is there an option to save it as a .msg file instead of parsing it?
  2. When using the package with the --json option, it isn't passed to the inner messages (their output format is "text" instead of "json").

@TheElementalOfDestruction
Copy link
Collaborator

@BenJoParadise No it is not. This has to do with the structure of .msg files. Our program does not have the capability to generate a new olefile which would be needed for the msg files, so as such it is impossible. Embedded messages are not saved as a stream but as a storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants