mauritson has asked for the wisdom of the Perl Monks concerning the following question:

I have tons of email encrypted by way of certs (mine from verisign) and I need to be able to search through the morass of messages for a certain string. The email is in ASCII format and not binary (I use netscape mail) and of course have my cert. So the question is: Is there a module or code that can use my cert, decode each mail message, and output in plain text, provided a supply my cert password? The thought of going through hundreds of emails using the client is really daunting and I thought this might be a good perl exercise. -mauritson

Replies are listed 'Best First'.
Re: module or code for mail decrypt?
by demerphq (Chancellor) on Feb 14, 2002 at 12:44 UTC
    You have to use something like OpenSSL.

    OpenSSL is a powerful SSL/SMIME package. Here is a wrapper that I wrote to integrate OpenSSL with MIME::Parser. You will have to hunt out openssl on the net, get it set up and configured (the right certs) which can be a bit of a bitch. Once you do however with a bit of configuration the below modle will enable you to open and authenticate. Modifying the module to handle decryption should be realtively easy, and modifying to enable writing a signed/encrypted mail should also not be so difficult.

    Unfortunately at this point I dont have time to explain how to use it, but it shouldnt be too hard to figure out.

    If you have any substantial question then email me or post your questions and ill _try_ to help, but my time is limited.

    Good luck!

Re: module or code for mail decrypt?
by rob_au (Abbot) on Feb 14, 2002 at 11:57 UTC