Encrypt/decrypt mail using GPG/MIME. Takes an email from stdin and outputs to stdout. Written to be used as a Sieve filter through
sieve_extprograms
.
.gitignore | ||
gpgmymail | ||
LICENCE | ||
README.md | ||
requirements.txt |
gpgmymail
Takes an email from stdin and encrypts it using the recipient's PGP key, provided as an argument when calling the script.
Written to be a Sieve filter to be used with sieve_extprograms
. Can be used
in a Sieve filter e.g.:
require ["vnd.dovecot.filter"];
filter "gpgmymail" "pid1@revsuine.xyz";
Will encrypt all incoming mail with the pid1@revsuine.xyz
PGP key.
TODO link my blog post when I make it fully explaining how to use as Sieve filter.
I use this script on my own mail server so this should be maintained to work with the up-to-date versions of Python and python-gnupg
Requirements
- Python 3
- python-gnupg
Credits
- Julian Klode for the original code
- revsuine for some modifications:
- Not encrypting already encrypted mail
- Retaining mail attachments