Malte Meiboom 4093e1e8e7 Upgrade dependencies
- especially: upgrade bytes
2026-02-08 20:31:31 +01:00
2026-01-23 12:57:26 +01:00
2026-01-23 13:56:05 +01:00
2026-01-23 13:56:05 +01:00
2026-01-23 12:57:26 +01:00
2025-11-06 11:38:20 +01:00
2025-12-17 12:26:09 +01:00
2026-02-08 20:31:31 +01:00
2026-02-08 20:31:31 +01:00
2025-12-03 20:15:32 +01:00
2026-01-05 16:34:29 +01:00

Husk

Husk is a pass-through solution for automatic OpenPGP encryption.

Husk is an email filter (milter) for MTAs which encrypts emails while they pass through it. It facilitates Web-of-Trust technologies to use decentralized and federated certificate authorities as sources for authenticated OpenPGP certificates. It aims to reduce the amount of administrative effort of obtaining and keeping them up to date by establishing narrow, focused trust delegations. Husk can be used to encrypt emails for services which cannot encrypt on their own like notification systems or issue trackers, or being used at the end of transport to implement zero-access encryption (for email at rest).

Husk is written in Rust and uses Sequoia PGP for encryption and certificate handling.

Status

Milestone 2 is reached:

Husk can encrypt passing mails for simple cases, meaning:

  • for all recipients of an email, a valid certificate is locally available.
  • if that is not the case, Husk will not modify the email.
  • Husk will not query keyservers (or other sources) for certificates - this is part of milestone 3.

Please be patient.

Build

Make sure that you have a toolchain for Rust installed.

Building:

$ git clone https://gitlab.com/husk-project/husk-milter.git
$ cd husk-milter
$ cargo build --release

This creates the binary ./target/release/husk.

Installation

To use with postfix:

  • configure husk, there is an example configuration file in ./config/config.toml.

    #
    # Husk config file
    #
    connection = "localhost:3000"
    
    logfile_config = "./config/log4rs.yml"
    

    Husk uses log4rs for logging. There is an example configuration in the ./config subdirectory as well.

  • Configure postfix:

    Make sure that the main.cf configuration file contains a line like:

    smtpd_milters = inet:localhost:3000
    

    smtpd_milters is used to register milters with postfix, there might be more than one. The string inet:localhost:3000 corresponds to the connection setting in config.toml.

    You can add the line

    non_smtpd_milters = $smtpd_milters
    

    directly after the line containing smtpd_milters, so that local calls to sendmail will also invoke Husk.

  • Start the milter:

    Assuming you are in the root directory of the project:

    $ ./target/release/husk ./config/config.toml
    
  • Restart postfix:

    In case you are using systemd:

    # systemctl restart postfix.service
    
  • Send a mail and check the logfile.

Funding

This project is funded through the NGI0 Commons Fund, a fund established by NLnet.

NLnet NLnet

License

Husk is licensed under AGPL 3.0 - for details read the included license.txt file or find it online.

Languages
Rust 90.5%
Shell 9.5%