This describes the idea behind an encrypted maildir on the server, with multiple clients that have access to it, and store unencrypted copies.
Initial setup:
- Generate a gpg key like
[email protected]
- Import the public key into the keyring on the server
- Import private and public keys into keyring on the clients
On the server:
- Create an empty Maildir
- Create a
.gitattributes
file:
* filter=gpg
- Run
git add .gitattributes
and commit. - Configure your mail delivery agent to pass the mail through
gpg --encrypt --recipient [email protected]
before storing it, or well, write your own MDA?
On the client:
- Pull the repository
- Configure the gpg filter, that is add to your
.git/config
(or maybe glboal config?)
[filter "gpg"]
clean = "gpg --encrypt --recipient [email protected]"
smudge = "gpg --decrypt"
Now you can use git pull
and git push
to synchronize your email on the client, and on your client, get a standard unencrypted maildir :)