I have modified my cleanfeed filter so it recognizes pgp signatures and sorts according to them.
The cleanfeed perl script uses the module win32-spgp which uses spgp.dll to access pgp5 functions.
My problem is, that the cleanfeed script works fine from the command line, but not when called by dnews.
When I just start "cleanfeed < testfile" it successfully checks the signature and gives me the result I want.
If I then run the script via dnews I get an error message from the spgp.dll whenever it tries to check the signature.
It complains that it could not open a file, although I only decrypt a buffer in the script.
So my question is:
Is there anything different from starting cleanfeed from the command line to the way dnews runs it ? It is very odd that it works from command line but not when started by dnews. Do you maybe restrict file access for the cleanfeed filter ? Or does it not have access to the registry ? It can only be a problem with pgp not finding files it needs for decryption, like its key files, so I wonder if you do a kind of chroot-jail ?
Thanks for your help,
Hosni
The problem is probably related to environment variables
not being carried through to the process, or not existing at
all for dnews in service mode.
Try running dnews interactively.
net stop dnewssvc
dnews -test
And see if it works like that.
You may be able to fix it by running a script instead of the
actual cleanfeed, and in the script define the environement variables
you need.
chrisP.
Just wanted to let you know that you where right, dnews starts the cleanfeed filter with very limited environment variables.
Of course PGP needs to know the login name to be able to find the keyrings, so a simple:
$ENV{'USERPROFILE'} = 'C:\\Documents and Settings\\Administrator';
in my cleanfeed script did the trick.
Thanks for your help,
Cheers,
Hosni