On Tue, 2018-08-07 at 17:28 -0400, Bill Cole wrote:

> Maybe check how you did that. Using the mimeexplode tool from the
> Perl MIME-Tools package:
> 
> # mimeexplode /tmp/xpsspam
> Message: msg0 (/tmp/xpsspam)
>      Part: msg0/msg-53100-1.txt (text/plain)
>      Part: msg0/msg-53100-2.html (text/html)
>      Part: msg0/Remittance Copy.xps (application/octet-stream)
> # ls -lAR msg0/
> total 720
> -rw-r--r--  1 root  wheel  354446 Aug  7 16:49 Remittance Copy.xps
> -rw-r--r--  1 root  wheel     336 Aug  7 16:49 msg-53100-1.txt
> -rw-r--r--  1 root  wheel    4629 Aug  7 16:49 msg-53100-2.html
> # file msg0/Remittance\ Copy.xps
> msg0/Remittance Copy.xps: Zip archive data, at least v2.0 to extract
>
Yep, that all works, and 'unzip -t msg0/Remittance\ Copy.xps' did too.

Thanks for the pointer to mimeexplode - I hadn't run across that
before. Its a useful tool.

I didn't think to use 'file' - and should have, just did what I've done
in the past, manually unpacked by using a text editor to discard
everything before and after the body of that message part and expected
'base64' to process it into something I could inspect. That's worked
for me in the past, but in this case I notice that the .xps file has
CRLF line separators, which probably got converted to LF by my text
editor - shouldda used vi, which doesn't do that.


Martin


Reply via email to