Linux – Automatically encrypting incoming email

emailgpglinux

I have a small website and would like to encrypt incoming email using gpg. Is there a way to force sendmail to check email and encrypt it if its not already encrypted?

I'm using GPG on a linux server.

Thanks

[added]Someone asked what I hope to accomplish. My intent is for the users of the email to become more familiar with seeing thier own email encrypted and losing that fear of the unknown. The side benefit is that the email can't be looked at later down the road. If the email isn't encrypted on its way in, I'm unable to do anything about it. I'm assuming most email would be nosed around with once its already on my hard drive, so GPG would protect against those issues.

Best Answer

For a specific inbox, this is easy enough to do with procmail. Here's a link to get you started.

The problem is if you want to do this to all incoming emails. That, too, could be done, but it's a little more involved due to trying to determine the correct public key for each recipient. If you want to encrypt with the same key for all messages, then it gets easier.

However, as someone else said, if you want to do wholesale encryption, I'd resort to partition-level encryption, which is an entirely different (and much more involved) discussion .

More specific requirements and your desired goal would be helpful to provide you with an answer.

Related Topic