1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-18 14:47:03 +00:00

test/t-21-dkim: Add cross-tool check against driusan/dkimverify

This patch adds a cross-tool integration check that uses
driusan/dkim's dkimverify to confirm it can verify our own DKIM signatures.

It is optional, since the tool may not be present.
This commit is contained in:
Alberto Bertogli
2024-03-09 21:58:55 +00:00
parent 8abed11ede
commit 7a2e49c849
5 changed files with 44 additions and 4 deletions

View File

@@ -82,6 +82,13 @@ func dkimVerify() {
})
}
if txt, ok := args["--txt"]; ok {
ctx = dkim.WithLookupTXTFunc(ctx,
func(ctx context.Context, domain string) ([]string, error) {
return []string{txt}, nil
})
}
results, err := dkim.VerifyMessage(ctx, string(msg))
if err != nil {
Fatalf("Error verifying message: %v", err)