Subject: PC-Pine 4.21 and display/sending filters

From: Daniel Lungu <[email-masked]>
Date: Tue, 26 Sep 2000 14:30:45 +0200 (MET DST)

Hi!

Is there any answer for the issue addressed by Michael Ruder 
<[email-masked]> on 20th of Sep 1998?

I have encountered the same problem when trying to set up a sending filter
through PGP, under PC-Pine 4.21 / NT4.0:

sending-filters	= C:\bin\pgpe.bat _TMPFILE_ _RECIPIENTS_

I need to run a batch file instead of directly using PGP.exe, since my 
version of PGP 6.5.2 / NT4.0 does not produce standard output. It 
creates instead an output file .pgp or .asc. Here is the content of
"pgpe.bat":

"C:\Program Files\Network Associates\PGPNT\PGP.exe" -ae %1 %2
rem pause
del %1
move %1.asc %1

By inserting a pause before "del %1", you can see PGP's error message:

Pretty Good Privacy(tm) Version 6.5.2
(c) 1999 Network Associates Inc.
Uses the BSafe(tm) Toolkit, which is copyright RSA Data Security, Inc.
Export of this software may be restricted by the U.S. government.

File [C:\TEMP\sfa00215] does not exist.

There is no such temporary file so there should be some bug in Pine
regarding _TMPFILE_ macro.

I decided to try with an existing file instead:

sending-filters	= C:\bin\pgpe.bat C:\TEMP\myfile _RECIPIENTS_

In this case Bill calls Dr. Watson for an access violation from
pine.exe. They claim to generate an application error log but there is
nothing actually reported in "m$ Event Viewer 4.0". In the popped up
shell window PGP generates the encrypted "myfile.asc" message and my batch
moves it back to "myfile" such that Pine would be able to use it through
the _TMPFILE_ mechanism. But at this time Pine has already crashed 8^(

There is another minor bug I would like to mention here, that it is not
possible to specify a filter that resides in a path containing blank
spaces. For instance "C:\Program Files\filter.exe" cannot be installed,
either with or without quotes.

Thank you and sorry for the long story,

daniel

PS: All these are just because I feel really uncomfortable with m$
outlook. How can they fool people...

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: Eduardo Chappa <[email-masked]>
Date: Tue, 26 Sep 2000 09:25:32 -0700 (PDT)

*** Daniel Lungu ([email-masked]) wrote in the pine-info list
about "PC-Pine 4.21 and display/sending filters" today:

:) I have encountered the same problem when trying to set up a sending filter
:) through PGP, under PC-Pine 4.21 / NT4.0:
:) 
:) sending-filters	= C:\bin\pgpe.bat _TMPFILE_ _RECIPIENTS_
:)
[lots of information deleted]

Daniel,

  Your mail makes me believe that you don't understand the way filters
work. I hope my explanation will make it clearer. When you define your
sending filter to be

  C:\bin\pgpe.bat _TMPFILE_

you need to make both, _TMPFILE_ your input and your output file (that is
to say, any file that is generated as the output of your script you should
rename it to be the name of _TMPFILE_). When you write

  C:\bin\pgpe.bat _TMPFILE_ _RECIPIENTS_

it means that the _TMPFILE_ will contain a part of the headers which
includes the list of recipients, so you need to be able to delete that
part of the message before you apply your filter to _TMPFILE_, because
_TMPFILE_ won't only be the message but a little bit of extra headers. (in
another words, the filter never sees the second argument, only Pine does
and interprets it in that way)

  I hope you can get your filter working, and that this helps you a little
bit.

-- 
Eduardo
http://www.math.washington.edu/~chappa/pine/

---

From: Daniel Lungu <[email-masked]>
Date: Tue, 26 Sep 2000 18:57:23 +0200 (MET DST)

On Tue, 26 Sep 2000, Eduardo Chappa wrote:

> Daniel Lungu ([email-masked]) wrote in the pine-info list

That is what I am trying in "pgpe.bat":

del %1
move %1.asc %1

> and interprets it in that way)

The second argument _RECIPIENTS_ does not stand for an output file. It
is the user id whose public key PGP will encrypt the content of
_TMPFILE_ to.

I did not know that _TMPFILE_ contains headers and not only the
message. However, removing headers would not prevent Pine from
crashing.

Meanwhile I found a new flag '-f' that I can pass to PGP to get
a non-interactive (Unix-like) behaviour, i.e. reading from stdin and
writing to stdout (CON:).

So, now I set my sending filters as follows:

sending-filter = C:\bin\PGP.exe -fae _RECIPIENTS_

Unfortunately Pine still crashes...

It crashes as well when I am trying to read an encrypted message:

display-filters = _BEGINNING("-----BEGIN PGP")_ C:\bin\PGP.exe -f

>   I hope you can get your filter working, and that this helps you a little

My filters still do not work as Michael Ruder already pointed out.

By the way they are just fine with my Unix PINE 4.21 on DEC

---

From: Steffen Kaiser <[email-masked]>
Date: Wed, 27 Sep 2000 09:54:38 +0200 (CET)

> sending-filters	= C:\bin\pgpe.bat _TMPFILE_ _RECIPIENTS_

I tried something similiar a while back, my impression is that PC-Pine
uses a wrong way to call external programs, so they don't wait for its
termination, but start them as another background process.
That's the very reason why the tempfile is already gone when the batch
file has been started.

If it is even possible, that pipes work OK in a WinNT GUI application, I
don't know.

However, because the source code is not available to the public, it's hard
to tell, if it's true.

Bye,

-- 

Steffen Kaiser

FH Bonn-Rhein-Sieg        | e-mail: [email-masked]
FB Angewandte Informatik  |
Grantham Allee 20         | phone : +49 2241/865-203
53757 Sankt Augustin      |
Germany - Deutschland     | fax   : +49 2241/865-761