[ale] Email, base-64 decoding

Brian Pitts brian at polibyte.com
Mon Jun 22 17:36:18 EDT 2009


On 06/22/2009 03:49 PM, Ken Cochran wrote:
> Seems that nowadays I get more & more email that appears to be
> base-64 encoded.  Is there any way to decode these messages
> without resorting to web or a gui mail client?  "Berkeley"
> mail just gives me something that looks like it's uuencoded
> and mutt might decode it but if what's inside is html, that
> doesn't work either.  I need some kind of command-line tool
> a la munpack; ideas?  What typically generates email in this
> crazy coding scheme in the 1st place?
>   
It looks like it's a hack to make to work around MTA's that don't
support UTF-8.

"As with all encodings apart from US-ASCII, when using Unicode text in
e-mail, MIME must be used to specify that a Unicode transformation
format is being used for the text. To use Unicode in e-mail headers, the
Unicode text has to be encoded using a MIME "Encoded-Word" with a
Unicode encoding as the charset.
UTF-7, although sometimes considered deprecated, has an advantage over
other Unicode encodings in that it does not require a transfer encoding
to fit within the seven-bit limits of many legacy Internet mail servers.
UTF-8 and UTF-16 on the other hand must be transfer encoded in base64 or
quoted-printable to allow safe transmission across seven-bit mail
servers (i.e., those that do not advertise 8BITMIME)."

http://en.wikipedia.org/wiki/Unicode_and_e-mail

All the best,
Brian Pitts


More information about the Ale mailing list