You are not logged in.
Hi, my first post here...
I'm writing a shell script (using tcl/expect) to show mails on pop server.
How do I convert e-mail headers containing text like this:
Subject: =?iso-8859-1?B?ZGl2ZXJ0aW1lbnRvIHNlbnphIGZpbmUgMjQgb3JlIHN1IDI0?=
to make it readable?
I already tried with 'iconv' and 'recode' with no luck...
Thanks.
Last edited by mr.entropy (2010-11-02 16:34:39)
Offline
These subjects have (probably unnecessarily) been encoded according to RFC 2047.
The "B" in between the 2nd and 3rd ? indicates that it is encoded using Base64 (if there's a Q it's "Quoted-Printable" see RFC RFC 2045).
So you're looking for a Base64 decoder.
EDIT: and there happens to be one in coreutils.
man base64
Last edited by skanky (2010-11-02 14:39:06)
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
You can check this: http://stackoverflow.com/questions/1260 … ail-header it should be enough to point you in the right direction
Kind regards, enrique
Offline
echo "ZGl2ZXJ0aW1lbnRvIHNlbnphIGZpbmUgMjQgb3JlIHN1IDI0" | base64 -d
divertimento senza fine 24 ore su 24
Offline
Thank you guys, very quick solution
Offline