Push to Document Content database with rendertortitem - problem with encrypted E-mails

In a mailin database with a high incoming traffic:We receive sometimes encrypted E-mails that give on document open a warning

“You cannot access portions of this document because it is encypted and not intended to you…”

When we try to open the attached file in on of these E-mails, we get a popup

“You must supply the bulk description key…”

The problem is:

an automatic LS agent (using the RenderToRtItem method) polls this mailin database and automatically dispatches the content of the incoming mails in a Document content database.

Thus, the document is succesfully dispatched in the Document content database, but is unreadable!

Is there any way to programatically (in the LS agent) decrypt and/or remove the encryption so the document becomes readable?

Thank you by advance for your help,

Regards

Subject: Push to Document Content database with rendertortitem - problem with encrypted E-mails

The document can only be decrypted by the user whose public key was used to encrypt it. (Otherwise, what good would encryption be??) There is no way for an agent, running on the server, to get access to the private key – unless the message was encrypted with the server’s public key, which is unlikely – ergo you are out of luck. The best you can hope for is to defer the decryption – i.e., copy the message intact, preserving the encryption, so that the user with the proper key will be able to read the copy.

I’m a bit surprised that RenderToRTItem doesn’t throw an error, but learn something new every day, I guess. Anyhow, I know that if you use CopyToDatabase the message will be readable – though still only by the user id with the correct public key. That’s the technique I use to defer the decryption.