emersion / go-msgauth

🔏 A Go library and tools for DKIM, DMARC and Authentication-Results
MIT License
162 stars 51 forks source link

dkim: export isFail #22

Closed mschneider82 closed 3 years ago

mschneider82 commented 4 years ago

Hi,

It would be nice to have the private function dkim.isFail() public available. In case of a "bad signature (body hash mismatched; bh=)" dkim.IsPermfail() and dkim.IsTempfail() returns false.

Thanks Matthias

emersion commented 4 years ago

If dkim.IsPermfail() and dkim.IsTempfail() both return false, then the error will verify dkim.isFail(). Why would you need this function?

emersion commented 3 years ago

Ref https://github.com/emersion/go-msgauth/blob/3bd269157ff3da507527a94fcd0756e76e4b0e90/cmd/dkim-milter/main.go#L275