mirror of
https://github.com/mailscope/kumomta.git
synced 2026-10-27 08:46:13 +00:00
0fa0de10ced93fbebf7c8309948a2a85f9023ae1
This is a much more efficient implementation with ~20% improved
throughput and latency with the simple signing benchmark.
signing/sign time: [1.3024 ms 1.3050 ms 1.3076 ms]
thrpt: [2.2886 MiB/s 2.2933 MiB/s 2.2978 MiB/s]
change:
time: [-19.016% -18.855% -18.691%] (p = 0.00 < 0.05)
thrpt: [+22.987% +23.237% +23.482%]
Performance has improved.
cfdkim
DKIM (RFC6376) implementation
Features
Verifying email signatures
Example:
let res: DKIMResult = cfdkim::verify_email(&logger, &from_domain, &parsed_email).await?;
if let Some(err) = &res.error() {
error!(logger, "dkim verify fail: {}", err);
}
println!("dkim={}", res.with_detail());
The verify_email arguments are the following:
Signing an email
Example:
let private_key =
rsa::RsaPrivateKey::read_pkcs1_pem_file(Path::new("./test/keys/2022.private"))?;
let signer = SignerBuilder::new()
.with_signed_headers(["From", "Subject"])?
.with_private_key(private_key)
.with_selector("2020")
.with_signing_domain("example.com")
.build()?;
let signature = signer.sign(&email)?;
println!("{}", signature); // DKIM-Signature: ...
See the SignerBuilder object documentation for more information.
Generate a test DKIM key
Using OpenDKIM:
opendkim-genkey \
--testmode \
--domain=example.com \
--selector=2022 \
--nosubdomains
Description
The first Open-Source high-performance MTA developed from the ground-up for high-volume email sending environments.
37 MiB
Languages
Rust
91.8%
Lua
6.3%
Python
0.9%
Shell
0.8%
JavaScript
0.1%