This gives us more flexibility in how we can build our parser,
and is significantly easier to maintain.
Part of this change is allowing the command parser to recognize
the starting command verb in an otherwise failed command line
parse; the intent is to provide slightly better error codes
where SMTP defines them when we encounter such a thing.
This commit doesn't do that; it's already pretty huge.
The recent refactoring meant that the tailer binary was writing
checkpoints with a double . prefix rather than a single .
The batch size could do with being a bit larger by default,
although it doesn't make a huge difference with this use case.
This is useful if your hooks have interior logic to decide to
filter out a given record. For example, you might have multiple
hook endpoints but only messages with certain headers/metadata
should be routed to any one of them for a specific event.
Without the ability to pre-filter, we need to pay the cost of
spooling the event speculatively, and then skipping it when
processing logging for the (hopefully!) batch.
Using pre-filter you can cut out that overhead.
This is not yet documented; we're getting this in to get
some feedback before we finalize this interface.
I noticed that `kumod --validate` on a policy using the dkim
helper would fail to parse the `postmaster@example.com` addresses
passed to make_message.
This commit resolves this issue; it doesn't go in the changelog
because this behavior has not yet been shipped in a stable release
and was only very recently introduced around the binary mime
changes.
This got lost during merge conflict resolution, as well as
incorrectly indicated that it applied to rustls in the original
draft, when it was in fact only applicable to openssl.
Pre-populate a `to_header` template substitution with the default
formatted `To` header for each recipient. Users can reference it via
`{{ to_header }}` and override it per-recipient in substitutions.
closes: https://github.com/KumoCorp/kumomta/pull/501
This was causing some problems with legacy shift_jis content,
so replace it with a binary preserving equivalent, and fixup
the call sites to use the renamed `to_message_bytes` method
instead.
Just render the address in <> to keep it more compact and readable.
This is most visible in the MAIL FROM and RCPT TO responses
when talking to the smtp server.