When given an extension/tagged domain, we didn't include the closing
square bracket when rendering it as text.
Note that this looks like an IPv6 address, but it is not a conforming
IPv6 address which looks like `[IPv6:aaaa::bbbb]` rather than
`[aaaa:bbbb]`. The latter uses tag "aaaa" to define a different
addressing namespace that has no known implementation.
<https://datatracker.ietf.org/doc/html/rfc5321#section-4.1.3>
This has our first end-to-end integration test that validates
smtp -> source mta -> sink mta -> maildir
and confirms that the message has the right bits inside it.
The end to end test will get refactored into more easily usable
pieces in follow-up commit(s).
The classifier can load and merge rules from multiple files.
A basic iana enhanced status codes ruleset is provided.
A deployment can define their own to augment that set.
This commit is just the core classifier functionality; it
is not yet connected to kumod.
The classification enum is a bit of an amalgam of categories
defined by other well-known vendors/products and the categories
defined by IANA. Some classifications have no corresponding
rules at the current time.
Tidy up the logging around this; move some error logs to debug level,
especially since we log message events to the log file for that purpose;
there is no need to log errors to the console for this.
Same for "rcpt to". The <> are required in the ABNF in the spec,
but they are widely considered to be optional by major implementations,
which makes it convenient when ad-hoc testing via telnet.
We require the <> when ESMTP mail from or rcpt to parameters are
used.