how to Digitally sign mails?

Discussion in 'Programming/Scripts' started by cooljai, Oct 3, 2007.

  1. cooljai

    cooljai New Member

    Dear friends,

    I want to send digitally signed mails through my PHP/perl scripts. I'm comfortable with using "gpg" tool, after creating my public/pvt keys, I'm able to sign and mail contents of a file using following command:

    Code:
     /usr/bin/gpg --no-tty --yes  --local-user $email --clearsign $filename
    Now that command will add text " -----BEGIN PGP SIGNED MESSAGE----- " etc. in message and moreover the mail clients are not
    detecting it as a signed mail. To verify that mail, I've to cut/paste contents and pass it to gpg again.

    I saw some mails which comes in inbox (thunderbird, outlook etc), the mail client automatically detects them as digitally signed mails and show their contents. (without extra text like "--Begin PGP SIGNED.." "--End " etc.)

    I need any hint/clue as how to accomplish this using scripts (I'm on CentOS 4.5). Am I able to implement it using GPG or should I concentrate on any other technology (may be S/MIME or digital Certificates/openSSL, though I dont know much about them)

    Your expert comments will be highly appreciated.

    Thanks
     

Share This Page