rpdecrypt - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       rpdecrypt (293B)
       ---
            1 #!/bin/sh
            2 
            3 msgids="$*"
            4 
            5 parts=$(rppart -l -- "$msgids" | tail -n +2)
            6 
            7 if [ -n "$(echo -n "$parts" | grep "multipart/encrypted")" ];
            8 then
            9         #
           10         # Bad heuristics. Works for me.
           11         #
           12         rppart -s -t application/octet-stream -- "$msgids" | gpg -d
           13 else
           14         rppart -s -t text/plain -- "$msgids" | gpg -d
           15 fi
           16