Yeraze / ytnef

Yeraze's TNEF Stream Reader - for winmail.dat files
GNU General Public License v2.0
32 stars 22 forks source link

Not understanding the errors received? #108

Open AndyM48 opened 4 months ago

AndyM48 commented 4 months ago

I am very grateful for your tnef decoding work, but I am not sure that I understand the errors that I get using it. For example, with a simple winmail.dat file - being a message and no embedded attachment:

$ ytnef -f -v . winmail.dat
ERROR: Error reading signature
$ echo $?
0

Same file

$ ytnef -f -H -F -v . winmail.dat
Attempting to parse ....
ERROR: Error reading signature
Attempting to parse winmail.dat...
$ echo $?
0

And now a winmail.dat file with three embedded attachments:

$ ytnef -f . winmail.dat
./FILENAME_1.pdf
./FILENAME_2.pdf
./FILENAME_3.pdf
$ echo $?
0

Same file

$ ytnef -f -H -F -v . winmail.dat
Attempting to parse ....
ERROR: Error reading signature
Attempting to parse winmail.dat...
Aid Owner: [4] 
Request Response: [2] 
ERROR: Error writing -H/FILENAME_1.pdf to disk!
ERROR: Error writing -H/FILENAME_2.pdf to disk!
ERROR: Error writing -H/FILENAME_3.pdf to disk!
$ echo $?
253

It seems that I receive an error with almost any use of the +-H and/or the +-F flags, and the files are not extracted.

I am not entirely sure that I know what the H and F flags are supposed to do, I thought that they would write out the email message in HTML or RTF format, but surely they should not fail to extract the attachment if the -f flag is present?