[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pine



-----BEGIN PGP SIGNED MESSAGE-----

On Mon, 6 Apr 1998, Usman Roshan wrote:

> Hello everybody,  
>  Does anyone know how to create filters in pine ? Thanks.
> 

I get the feeling that most, if not all of the people who
replied to this message mis-interpreted the question (but I guess I might
be...).  Pine does indeed offer filtering.  It's different than what
procmail does, but they still call it filtering.  If you open up the pine
configuration and scroll down a ways, you'll see a couple of options for
"display-filters" and "sending-filters".  A good example of pine filters
is the pinepgp package, which automates pgp signing, key verification,
encryption, and decryption.  I used the attached filter, part of the
pinepgp package, to PGP sign this message.  I don't know anything about
how to write one, but, as you'll see by viewing the attachment, a pine
filter can be a simple shell script.  But I don't know which arguement
to the script is what.  I'd be willing to bet pine filter writing is
documented in the pine-docs package (the contents of which are
also available at ftp://ftp.cac.washington.edu/pine/docs.).

noah

  
  PGP public key available at
  http://lynx.dac.neu.edu/home/httpd/n/nmeyerha/mail.html
  or by 'finger -l frodo@ccs.neu.edu'




-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBNSmXC4dCcpBjGWoFAQFTKwP9Fd+2g91VxKmW/jtsOFgbbo+DQsL33q1N
ME5EpkS619mDoDM2SuRnPfzZ+n1TgVq4KQRssz5yH6iLLX36n/z4fgcjqmVIwDkr
+EjsmQbmQn0b1qXY2HL5PGNG1tUZt7SnqXPXhnsQdscdob0XyLTN0MacTkwkTbou
VibvsoSAUgQ=
=EIvd
-----END PGP SIGNATURE-----
#!/bin/sh

TO="$2"

#Check if we got the public key 
function check_key()
{
  RES=`pgp -kv $TO 2>&1 | grep "0 matching keys found."`
  if [ ! -z "$RES" ]; then
    echo
    echo "Can't find public key for $TO"
    echo -n "Try a diffrent pgp user-id or press enter to abort: "
    TO=`head -1`
    if [ ! -z "$TO" ]; then
      check_key
    fi
  fi
}

TMP="$1"
TOS=""
shift
for i in $*; do
  TO="$i"
  check_key
  if [ -z "$TO" ]; then
    exit -1
  fi
  TOS="$TOS $TO"
done



if [ ! -z "$TOS" ]; then
  pgp -sea $TMP -o ~/.pgp/tmp.crypt $TOS
  mv ~/.pgp/tmp.crypt $TMP
else
  exit -1
fi

Reply to: