Hi,

do you remember that I asked for a recursive MIME attachment recognition in mutt?
The problem was, that I often receive MIME attachment as octet-stream which are PGP 
encrypted HTML pages.
What I need is an octet-filter, which recognizes the pgp encryption, starts the 
decryption, recognizes the .html extension and opens a netscape window.

I managed this with the mutt_octet-filter script.
The following entries have been added by myself:

---- mutt_octet-filter script ----
[...]

ShowPGP()
{
    encfilename="$1"
    decfilename=${encfilename%.pgp}
    cat "$1" | pgp +language=mutt +verbose=0 +force -f -o ${decfilename} 2> /dev/null
    mutt_octet-filter ${decfilename}
    rm -f ${decfilename} 2> /dev/null
}

ShowHTML()
{
    echo "Using netscape to read html..."
    mutt_bgrun mutt_netscape "$1" 2> /dev/null
}

[...]

    case "$1" in
        *.pgp )     ShowFileType "$1"; ShowPGP    "$1";;
        *.PGP )     ShowFileType "$1"; ShowPGP    "$1";;
        *.htm )     ShowFileType "$1"; ShowHTML   "$1";;
        *.html )    ShowFileType "$1"; ShowHTML   "$1";;
        *.HTM )     ShowFileType "$1"; ShowHTML   "$1";;
        *.HTML )    ShowFileType "$1"; ShowHTML   "$1";;
[...]
---- end of mutt_octet-filter script ----

This is some sort of recursive octet-filter and it works fine.

But there is some thing, that is not nice:
The PGP decryption tool needs to ask for the passphrase. I haven't managed it to 
display the question for the passphrase in mutt.
The only solution was to suppress all pgp std output. But then I have to enter the 
passphrase "blindly".
Is there a way to use the passphrase mutt remembers?


Cu,
Daniel.

Reply via email to