Files
husk-milter/README.md
T

106 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 in 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](https://nlnet.nl/core), a fund established by [NLnet](https://nlnet.nl/).
<table>
<tr>
<td>
<img src="https://nlnet.nl/logo/banner.svg" style="max-width: 250px;width: 75%" alt="NLnet">
</td>
<td>
<img src="https://nlnet.nl/image/logos/NGI0Core_tag.svg" style="max-width: 250px;width: 75%" alt="NLnet">
</td>
</tr>
</table>
## License
Husk is licensed under AGPL 3.0 - for details read the included `license.txt` file or find it [online](https://www.gnu.org/licenses/agpl-3.0.html).