stalwartlabs / mail-auth

DKIM, ARC, SPF and DMARC library for Rust
https://docs.rs/mail-auth/
Apache License 2.0
82 stars 13 forks source link

DKIM verify example is failing #19

Closed edevil closed 1 year ago

edevil commented 1 year ago

I just tried the example in /examples/dkim_verify.rs and it fails with:

thread 'main' panicked at 'assertion failed: result.iter().all(|s| s.result() == &DkimResult::Pass)', examples/dkim_verify.rs:52:5

it seems that the header parsing code does not handle header values that span multiple lines. Was this working before?

mdecimus commented 1 year ago

That is correct, the verification examples will fail because the message was signed with an invalid DKIM key for the fictitious domain name football.example.com. It just shows how to use the library, what is important is that the tests pass.