This tool can encrypt and decrypt emails using PGP/MIME. When encrypting, the tool preserves all headers in the original email in the encrypted part, and copies relevant headers to the output. When decrypting, any headers are ignored, and only the encrypted headers are restored.
Encrypted email are not reencrypted. This is check based on the content type.
- Python 3.9 or newer
- python-gnupg
- gnupg
- from Source:
make install
- deb-Package:
make deb
Update smtp
, smtps
and submission
in /etc/postfix/master.cf
, add -o content_filter=gpgmail-pipe
to the end, for example:
smtp inet n - - - - smtpd -o content_filter=gpgmail-pipe
And add to the end of /etc/postfix/master.cf
:
gpgmail-pipe unix - n n - - pipe
flags=Rq user=gpgmail argv=/usr/bin/gpgmail-postfix --sign-encrypt --gnupghome /home/gpgmail/.gnupg --encrypt-headers --key KEYID --passphrase PASSPHRASE --recipient ${recipient} -oi -f ${sender}