mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 07:53:56 +01:00
Fixed compiler warnings and rewrote documentation for meson.
This commit is contained in:
37
README.md
37
README.md
@ -1,8 +1,7 @@
|
||||
# exim-encrypt-dlfunc
|
||||
|
||||
This library injects functions for string encryption and decryption into [exim4](https://www.exim.org/). It is basically
|
||||
a little glue code to parts of the [libsodium library](https://github.com/jedisct1/libsodium)
|
||||
to exim at runtime.
|
||||
glue code that exports certain parts of the [libsodium library](https://github.com/jedisct1/libsodium) to exim at runtime.
|
||||
|
||||
## Installation
|
||||
|
||||
@ -11,37 +10,31 @@ These instructions are currently only tested on Debian Linux.
|
||||
1. Install development tools and libsodium development files:
|
||||
|
||||
```shell
|
||||
apt-get install build-essential exim4-dev libsodium-dev
|
||||
apt-get build-essential exim4-dev libsodium-dev meson pkg-config openssl exim4-daemon-heavy
|
||||
```
|
||||
|
||||
2. Clone this repository:
|
||||
|
||||
```shell
|
||||
git clone https://git.scc.kit.edu/mail/exim-encrypt-dlfunc.git
|
||||
cd exim-encrypt-dlfunc/src
|
||||
cd exim-encrypt-dlfunc
|
||||
```
|
||||
|
||||
3. Build `genkey` if needed (see below for an explanation):
|
||||
3. Build and test everything:
|
||||
|
||||
```shell
|
||||
make genkey
|
||||
```
|
||||
|
||||
4. Build the library:
|
||||
|
||||
```shell
|
||||
make
|
||||
meson build # run only once
|
||||
cd build
|
||||
ninja
|
||||
```
|
||||
|
||||
5. Copy to final destination (feel free to pick another place than `/usr/local/lib/`):
|
||||
|
||||
```shell
|
||||
sudo install --group=Debian-exim --owner=Debian-exim libexim-encrypt-dlfunc.so /usr/local/lib/
|
||||
```
|
||||
TBD…
|
||||
|
||||
6. Ensure you have the correct exim flavor:
|
||||
6. Ensure you have the correct exim build:
|
||||
|
||||
Not every flavor of exim is able to load libraries at runtime. Please refer to the
|
||||
Not every build of exim is able to load libraries at runtime. Please refer to the
|
||||
[documentation](https://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html)
|
||||
of the `${dlfunc{…}}` function for details. exim from the debian package `exim4-daemon-heavy` meets all the
|
||||
requirements.
|
||||
@ -63,11 +56,11 @@ Public key encryption that uses a key pair that needs to be created beforehand:
|
||||
* `sodium_crypto_box_seal_open(private key, public key, ciphertext) → cleartext`
|
||||
|
||||
The second pair needs a proper key pair in the correct format. This is what the
|
||||
`genkey` utility is for. Simply run it once to generate a pair. Be aware that every invocation will overwrite the
|
||||
previous key pair without confirmation! Please save both parts in a safe place before proceeding.
|
||||
`generate_encryption_keys` utility is for. Simply run it once to generate a pair. Be aware that every invocation will
|
||||
overwrite the previous key pair without confirmation! Please save both parts in a safe place before proceeding.
|
||||
|
||||
```shell
|
||||
$ ./genkey
|
||||
$ ./generate_encryption_keys
|
||||
=== Creating cryptobox key pair ===
|
||||
Wrote »cryptobox_recipient_pk_exim.conf«
|
||||
Wrote »cryptobox_recipient_pk.raw«
|
||||
@ -75,8 +68,8 @@ $ ./genkey
|
||||
Wrote »cryptobox_recipient_sk.raw
|
||||
```
|
||||
|
||||
The `*_exim.conf` files contain the keys in a format that can simply be pasted into
|
||||
`exim.conf` (the first line contains the key as C code and can usually be discarded):
|
||||
The `*_exim.conf` files contain the keys in a format that can simply be used in
|
||||
`exim.conf` (the first line contains the key as a C code comment and can usually be discarded):
|
||||
|
||||
```shell
|
||||
$ cat cryptobox_recipient_pk_exim.conf
|
||||
|
||||
Reference in New Issue
Block a user