[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Decode mail attachements from Eudora via a filter



On 26-Feb-99 Conrado Badenas wrote:
> I recently begun to receive messages with information like this:
> 
> Dear Conrado:
> Here you have the file requested. I'm sorry but I wrote it with MSWord.
> 
> Your mom
> 
> --=====================_920025339==_
> Content-Type: application/msword; name="File.doc";
>  x-mac-type="42494E41"; x-mac-creator="4D535744"
> Content-Transfer-Encoding: base64
> Content-Disposition: attachment; filename="File.doc"
> 
> How can I restore the file "File.doc" from the attachement made with
> Eudora?. I have tried with uudecode but it doesn't work (it seems it is
> not uuencoded).

This is your clue:

  Content-Transfer-Encoding: base64

base64-encoding is not the same as uuencoding. Eudora, as such, has
nothing to do with it. Lots of mailers use base64.

A base64-encoded file can be decoded with the command

  cat codedfile | mmencode -u > decodedfile

However, note one important difference:

An encapsulated uuencoded block begins with a line like

  begin 664 filename

and ends with a line like

  end

and so you can submit a text file which includes a uuencoded block to
uudecode, and it will decode the block into "filename". This is a very
convenient way to handle it when encapsulated in email, since it ignores
everything except what's between the two encapsulating lines.

base64 encoding knows nothing about that sort of thing, so you have to
separate out the encoded block on its own, with nothing else at all.

If the encoded block is a separate (and clean) email attachment, then
you should be able to save the attachment and run "mmencode -u" on it.

However, if the base64-encoded block is within the text of the body of
the message (as sometimes happens), then you have to save the message and
edit out by hand everything except the encoded block.

Hope this helps.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Date: 26-Feb-99                                       Time: 17:40:14
------------------------------ XFMail ------------------------------


Reply to: