Encrypting the maildir

[mm]

New member
Joined
Feb 12, 2010
Messages
2
Hi, I'm using the Dovecot mail-server and I have about 20 different mail-accounts on my server and they all have their separate maildirs.

What I want to do now is to encrypt those directories in a way that their content can only be decrypted by the users account-password. Encryption would have to work with a public key each time a new email is received. A simple public/private key approach wouldn't work here because I don't want to force my users to choose a 256Bit prime number as their email password...

Does anyone know about an existing solution for this problem?
 
What about dm-crypt, truecrypt or any other simple filesystem encryption method?
That is if you trust your system of course, which would have decrypted access anyway.
But if you don't trust your system, your way won't work either: it needs the private key to be stored or written on memory in order to decrypt files, therefore the level of security is the same one.
 
You're right, a decryption key that is stored somewhere on the system wouldn't work. Thats why I was thinking about using the users email password as decryption key.
 
I don't think that would work. If you really want a system that, given a password, sends back plain text data, it means that the system must be trusted. It can read the password, and the plain text data.

That's the reason for S/MIME and PGP/GPG to be client-side: the client system is trusted, the server system is not. All the server sees is always garbage without the private key [and password], which resides within the client system.
If you don't trust your server, use one or the other solution for each account.
 
I agree with tillo. GPG is the way to go.
Make sure your email client encrypts everything and use Horde as a webmail and a blackberry as a phone. This will give you access to all your emails wherever you are.
 
Last edited:
Strange. Why isnt it included with directadmin then?
 
Using GPG encryption within a webmail is just as insecure as using it within Dovecot or using an encrypted disk. It's almost worst, since the private key is not only within the system, but it must also be readable by a script or program that is directly accessed via web (!).

As I said, use a client solution. If you really want to use a web interface to read/write your messages, use Firegpg. It manages signing/encryption/decryption on a client basis.
 
Using GPG encryption within a webmail is just as insecure as using it within Dovecot or using an encrypted disk. It's almost worst, since the private key is not only within the system, but it must also be readable by a script or program that is directly accessed via web (!).
No, it's not. Nobody, but you has the passphrase and you don't need to store the private key in the webmail system.
 
The private key is stored within the webmail system. It is just encrypted using a passphrase, which is what it asks you when using it.

Having a passphrase on a private key does not mean that you should put it at risk; it's just an additional way to prevent fast and easy access to the private key when stolen, in order to allow you to correctly create a new key pair and revoke the old public one within the various keyservers, while also rechiphering all of your encrypted data.

The level of protection of a passphrase-protected private key on a shared system is not the same as having the private key stored only once, in your own system, with (better) or without passphrase.

This, of course, unless Horde uses some different system... like a browser plugin? Maybe Javascript? I'm not aware of any JS GPG library, but I may be wrong.
EDIT: doesn't seem like it: http://git.horde.org/co.php/imp/pgp.php?r=db011a2a40263b0bddcc42b1071f52a1e1bd2a83#l116
 
Last edited:
Back
Top