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

Extracted attachments are corrupted #32

Closed
Mikelly1984 opened this issue Feb 25, 2021 · 6 comments
Closed

Extracted attachments are corrupted #32

Mikelly1984 opened this issue Feb 25, 2021 · 6 comments

Comments

@Mikelly1984
Copy link

Mikelly1984 commented Feb 25, 2021

when converting .eml files, extracted attachments wont open. they say they are corrupted. i tested all earlier version. starting on version 2.4 attachments are currupted when extracted.

@mrchang0815
Copy link

I can confirm corrupted extracted attachments. But the extracted files are not all the time corrupted. If I export the file directly from my mail client, it is not corrupted. Example for a corrupted file is a .docx-file:

`…

Content-Type: multipart/mixed; boundary=19046660-30413-1613741647-0

--19046660-30413-1613741647-0
Content-Type: multipart/alternative; boundary=19046660-21017-1613741647-0

--19046660-21017-1613741647-0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

blablablub
=20
=20
=20
=20

=20

--19046660-21017-1613741647-0
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<style></style>

blablablub

--19046660-21017-1613741647-0--

--19046660-30413-1613741647-0
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="

UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNd
LnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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G1sUEsBAi0AFAAGAAgAAAAhAGkpwCDhAQAA3wMAABAAAAAAAAAAAAAAAAAA
9TwAAGRvY1Byb3BzL2FwcC54bWxQSwUGAAAAAAwADAABAwAADEAAAAAA

--19046660-30413-1613741647-0
Content-Type: image/jpeg; name="image004.jpg"
Content-Transfer-Encoding: base64
Content-ID: [email protected]
Content-Disposition: inline; filename="image004.jpg"

/9j/4AAQSkZJRgABAQEAeAB4AAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0N

ZXZFLFgVdAMZA6P19vwpbrxlLJM3lWx8r7Q0qnzGRipcsAdpxnJrl80Zo9rL
uL+z8Pzc1vxOjbxfcsF22kCeVMHUISqgBlbGBgHJX9Tx0xWXXVjms5obFU+x
gCJTKxUHcCTj1POT7j0FYuaM0e0l3LWCoLZfiblx4mnuLOa2+zpGsiBQVdsq
Airj34QdfU1iUmaM1Dk3ub0qNOirQVj/2Q==

--19046660-30413-1613741647-0
Content-Type: image/jpeg; name="image005.jpg"
Content-Transfer-Encoding: base64
Content-ID: [email protected]
Content-Disposition: inline; filename="image005.jpg"

/9j/4AAQSkZJRgABAQEAeAB4AAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0N
Dh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/

KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoo
ooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiii
gAooooA//9k=

--19046660-30413-1613741647-0
Content-Type: image/jpeg; name="image006.jpg"
Content-Transfer-Encoding: base64
Content-ID: [email protected]
Content-Disposition: inline; filename="image006.jpg"

/9j/4AAQSkZJRgABAQEAeAB4AAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0N
Dh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/

rCitwQoBp9cvtqnc6PZQ7HP23hSOynsJbW9kjNjYvZx5QEndj5z7gjpUG
k+CbeytDa6jdHU0E/wBoQvH5bLJzliVOWJ9/Sunoqfaz7j5I9gooorMsKKKK
ACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA/9k=

--19046660-30413-1613741647-0--
`

@nickrussler
Copy link
Owner

It would be very helpful if you could send me an example for a msg or eml which produces these corrupted attachments.
Please send to: [email protected]

@mrchang0815
Copy link

Thank you very much for your message.

Unfortunately I cannot provide the original file (data privacy). But I tested around and found out the following:

Original eml-file:
...
--19046660-30413-1613741647-0
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="
...

Result: docx-file is corrupted, IO-Error.

Manipulated eml-file V1 (cut parts within #CUT# #/CUT#):
--19046660-30413-1613741647-0
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; #CUT#*name="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="#/CUT#
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="

Result: docx-file is not corrupted and opens fine!

Manipulated eml-file V2 (replace parts within #CUT# #/CUT# by "filename"):
--19046660-30413-1613741647-0
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; #CUT#name#/CUT#="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?iso-8859-1?Q?Konzept_neue_=D6ffnungsstrukturen=2Edocx?="

Result: docx-file is not corrupted and opens fine!

Hopefully my hints can nevertheless be helpful.

Regards, mrchang08154

@nickrussler
Copy link
Owner

This might be related with this bug in java-simple-mail

nickrussler added a commit that referenced this issue Apr 29, 2021
Caused by java-simple-mail dependency bug (https://git.io/J3qV9).
@nickrussler
Copy link
Owner

Please test if this is fixed with release 2.5.3.

@mrchang0815
Copy link

Good Morning,

wow, I can confirm that the issue has gone in release 2.5.3. Thank you very much!

Nice weekend and regards,
MrChang0815

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

No branches or pull requests

3 participants