verdammelt / tnef

tnef

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tnef support for recognising / handling e-mail bodies in TNEF format

martin-cs opened this issue · comments

Hi,
I've been having issue with TNEF format and thought it best to write up what I've found so far. I've been receiving e-mail from a colleague running what I suspect to be a newer Microsoft mail client. These have an "attachment" in TNEF format which (with the aid of a hex editor) turns out to be the HTML formatted (ofcourse) contents of the e-mail. tnef silently "fails" to handle these because:

*. TNEF key is 695e rather than 363
*. There is no attATTACHRENDDATA 0x9002 object, so no file is set-up and hence there is no output, debug or otherwise.
*. However the 0x9003 field is still present and contains a byte stream which is the e-mail.

I'll see if I can get you an example.

Although it may be outside of scope of tnef, would it be possible to warn in verbose or debug mode that the winmail.dat file is not empty but does not contain an attachment? Thanks.

Please give me an example I'll need it for testing and investigation. Especially good would be an example file that I could include in the project for my automated tests.

It could be that the TNEF format has been changed (thus the change in key) - I'll need to research that.

If you can, it would be interesting to see if --save-body option of tnef could be used to get the HTML body out (after working around the key issue...)

Please email me the example at verdammelt@gmail.com

It looks like the examle file ended up in my spam folder (thanks gmail!). I will try to review it soon.

I got them - thanks. And, hopefully I'll get a chance to look at them soon. Sorry for the delay.

I have taken a look at the 3 data files you have sent me. In no case have I had any particular problem using tnef to process the files. In no case were there any problems with the TNEF keys.

The first file (which you sent to me in a compressed tar archive contained an RTF message body which matches the body.rtf file you sent me.

The second and third (which you sent me as copies of email messages - I extracted the attachment and base64-decoded them...) contained HTML message bodies.

I was using tnef version 1.4.17 which is the latest version (released on 2018-01-13) on the MacOSX platform. What version and OS are you using?

Excellent! Glad it was just a misunderstanding / poorly advertised features. Sorry it took so long to figure that out.