From 0f3a05e8115e0f26f58c770f5e2b249b398e2321 Mon Sep 17 00:00:00 2001 From: Malte Meiboom Date: Thu, 4 Dec 2025 13:24:52 +0100 Subject: [PATCH] Edit README - Add build and installation instructions --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/README.md b/README.md index 7fc12d3..e1955e2 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,65 @@ Currently the milter does nothing but filling a logfile :) 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`. + +- 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.services + ``` + +- 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/).