Commit Briefs
Remove trailing \r characters.
These come in before filtering, but don't survive upon delivery
Fix line-counting by skipping over \r on the end of the line.
Also fix wrong signature length check while here
Don't do event_pending check before trying to write.
If we can flush multiple mails at once this can result in major contingency on the output buffer before we hit the output check
Canonicalize line before applying test rules to it
This makes 100% from 12200 mails succeed
Rmove mentioning of sha1.
According to RFC8301 it's dead (as it should be)
Replace custom hash functions with context based.
minus 51 LoC
