Edit README
- Add build and installation instructions
This commit is contained in:
@@ -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/).
|
||||
|
||||
Reference in New Issue
Block a user