A mailgate for Postfix to encrypt incoming and outgoing email with S/MIME and/or OpenPGP and decrypting OpenPGP encrypted emails https://lacre.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fkrone fd1b7517db Informing user about key submitting status. Needs some rework. 8 years ago
GnuPG Adding a key on a non-English system does not fail any longer 8 years ago
gpg-mailgate-web Informing user about key submitting status. Needs some rework. 8 years ago
templates Create registrationSuccess.md 9 years ago
.gitignore Added .gitignore for python 10 years ago
INSTALL.md Update INSTALL.md 9 years ago
LICENSE Update license to GNU GPL v3. 9 years ago
README.md Update README.md 9 years ago
gpg-mailgate.conf.sample Update gpg-mailgate.conf.sample 9 years ago
gpg-mailgate.py preserve X-GPG-Mailgate header for S/MIME enc. 9 years ago
register-handler.py Now GPG keys could be verified by cron job without problems (did not for me without this fix) 8 years ago



gpg-mailgate is a content filter for Postfix that automatically encrypts unencrypted incoming email using PGP or S/MIME for select recipients.

For installation instructions, please refer to the included INSTALL file.


  • Correctly displays attachments and general email content; currently will only display first part of multipart messages
  • Public keys are stored in a dedicated gpg-home-directory
  • Encrypts both matching incoming and outgoing mail (this means gpg-mailgate can be used to encrypt outgoing mail for software that doesn't support PGP or S/MIME)
  • Easy installation
  • gpg-mailgate-web extension is a web interface allowing any user to upload PGP keys so that emails sent to them from your mail server will be encrypted (see gpg-mailgate-web directory for details)
  • people can submit their public key like to any keyserver to gpg-mailgate with the gpg-mailgate-web extension
  • people can send an S/MIME signed email to register@yourdomain.tld to register their public key
  • people can send their public OpenPGP key as attachment to register@yourdomain.tld to register it

This is forked from the original project at http://code.google.com/p/gpg-mailgate/


This is a combined work of many developers and contributor:s

To Do

  • clean up code
  • add optional email registration with attached public key to register@domain.tld done
  • outsource templates for emails and mailgate-web
  • rename from gpg-mailgate to openpgp-s-mime-mailgate or something.....