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.
pfm 9f1c4db49d Merge pull request 'doc-updates' (#108) from doc-updates into main 1 month ago
GnuPG Reformat GnuPG module 2 months ago
cron_templates All mails from cron script are now passed through the GPG-Mailgate so they are encrypted if possible. 8 years ago
doc Add basic daemon documentation 2 months ago
lacre Only reload on pubring.kbx file modifications 1 month ago
register_templates Inform the user if registration failed because GPG-Mailgate-Web could not be reached. 8 years ago
test Add a test for message with PGP inline markers that's not encrypted 1 month ago
.gitignore Ignore random_seed 11 months ago
INSTALL.md improved formatting 1 month ago
LICENSE Update license to GNU GPL v3. 9 years ago
Makefile Adjust cron tests after recent FE decoupling 2 months ago
README.md Replace UTF-8 non-breaking space with a plain space 1 month ago
gpg-lacre-logging.conf.sample Improve logging 2 months ago
gpg-mailgate.conf.sample Make key-loading async, remove unused parameter 2 months ago
gpg-mailgate.py Simplify code, improve log entries, add comments 1 month ago
register-handler.py Use Lacre logging and configuration in register-handler 7 months ago
requirements.txt Add aiosmtpd dependency 1 month ago
webgate-cron.py Use proper name in webgate-cron.py logs 1 month ago


GPG Lacre Project

GPG Lacre is a fork and continuation of original work of gpg-mailgate project: gpg-mailgate. It is still actively developed and should be considered as beta -- with all APIs and internals being subject to change. Please only use this software if you know GnuPG well.

GPG Lacre (wax seal in Portuguese) is a content filter for Postfix that automatically encrypts unencrypted incoming email using PGP or S/MIME for select recipients. This project is the continuation of the work of "gpg-mailgate" on providing open source, GnuPG based email encryption for emails at rest. All incoming emails are automatically encrypted with user's public key before they are saved on the server. It is a server side encryption solution while the control of the encryption keys are fully at the hands of the end-user and private keys are never stored on the server.

The scope of the project is to improve on the already existing code, provide easy to use key upload system (standalone as well as Roundcube plugin) and key discoverability. Beside providing a solution that is easy to use we will also provide easy to digest material about encryption, how it works and how to make use of it in situations other the just mailbox encryption. Understanding how encryption works is the key to self-determination and is therefore an important part of the project.

GPG Lacre will be battle tested on the email infrastructure of https://disroot.org (an ethical non-profit service provider).

The work on this project in 2021 is funded by https://nlnet.nl/thema/NGIZeroPET.html for which we are very thankful.

The scope of the work for 2021 is:

  • Rewrite code to python3
  • Improve standalone key upload website
  • Provide Roundcube plugin for key management
  • Improve key server features
  • Provide webiste with information and tutorials on how to use GPG in general and also Lacre
  • (Optional) provide Autocrypt support

Made possible thanks to:

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)
  • Decrypts PGP encrypted mails for present private keys (but no signature check and it does not always work with PGP/INLINE encrypted mails)
  • 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 or inline 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 contributors. We would like to pay honours to original gpg mailbox developers for making this project happen, and providing solid solution for encryption emails at rest: