<<< Date Index >>>     <<< Thread Index >>>

searching in base64-encoded messages



Hi all

Occasionally, I get mail where the content is base64 encoded
    
    [...headers...]
    
    Content-Type: text/plain; charset="utf-8"
    Content-Transfer-Encoding: base64
    
    [...more headers...]
    
    SGkgR2HDq2wsCgpBY3R1YWxseSB3aGVuIHdvcmtpbmcgd2l0aCBncmFwaHMgSSBwcmVmZXJyZWQg
    aWdyYXBoIG92ZXIgbmV0d29ya3g6Cmh0dHA6Ly9jbmV1cm9jdnMucm1raS5rZmtpLmh1L2lncmFw
    aC8KCi1qZWxsZQoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f

The problem is that I can search the message body for some text only when I
view it in the pager since Mutt correctly decodes the content. But from the
message index a search "~b EXPR" matches nothing b/c, I guess, Mutt does not
decode anything then.

Can I solve this from within Mutt, e.g. decode a message before a search, just
like it is done when viewing it?  I found nothing in the manual and also
http://wiki.mutt.org/?MuttFaq/Charset didn't help much.

If not, I have to decode the message content before Mutt reads it. Python and
Perl have facilities to do that, but I will need to parse the message and
fiddle out the encoded content (at least with the Python route, I played with
that a little). If possible, I would like to save this work if anybody knows if
there are tools which do that already ... ?  Of course the best would be if I
could solve it with some macros/hooks with Mutt since, apparently, Mutt can do
exactly that :)

Many thanks!

steve