Re: [SLUG] mime

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sat Feb 02 2008 - 12:24:43 EST


On Sat, Feb 02, 2008 at 10:59:22AM -0500, Ron Youvan wrote:

> I use LINUX and sea monkey exclusively. (Slackware 12 + x)
>
> I have had nothing but failures attempting to decode a few
> E-mail mime encoded files that are in HTML form. These are
> forwarded e-mails including such as PDF or image files.
> Whole or stripped down to HTML or just the mime all I get
> is garbage followed by "invalid input." (base64)
> The E-mail that I get shows an attachment with the subject
> of the E-mail, not that of the original attached file name
> with no extension.
>
> If the sender saves the file to their HD then attaches it
> to a new E-mail I get it fine. (sender is M$ user)
> Anyone know how to decode these?

If you can pare it down to just the mime-encoded part (assuming it hasn't
been trashed by the attachment process) and put that in a file by itself,
a solution that was posted years ago was:

perl -MMIME::Base64 -ne 'print decode_base64($_)' < your_file

This should print it to the console, and I assume you'd add a '> new_file'
on the end to dump the output to a file.

But that won't handle this if it's an ongoing problem. I assume that,
whereas the MUA is supposed to follow certain rules in encoding and
inlining attachments, Microsoft, predictably, doesn't do it right, and
consequently bungs things up. I don't have a solution for brain dead mail
clients from monopolistic behemoths. I wonder if, instead of including an
existing email as an attachment, whether the sender can simply *forward*
the original mail. It *sounds* like they're *attaching* an email to an
email, which may not properly preserve encodings and attachment boundaries
in the original email.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:43:07 EDT