# Release 2023.11.28-b5252a41

## Breaking Changes

None known

## Other Changes and Enhancements
* New RFC-conformance options are available to control server behavior
  when receiving messages that are non-conformant:
     * [invalid_line_endings](../reference/kumo/start_esmtp_listener/invalid_line_endings.md) #22 #23
     * [line_length_hard_limit](../reference/kumo/start_esmtp_listener/line_length_hard_limit.md) #25
     * [message:check_fix_conformance](../reference/message/check_fix_conformance.md) #17 #24 #26
* HTTP injection API will now parse and re-encode the message content to ensure
  that it has appropriate transfer encoding applied when `content` is set to a
  string, rather than using the builder variant of the API.
* Preliminary support for
  [MTA-STS](https://datatracker.ietf.org/doc/html/rfc8461). It defaults to
  enabled. See
  [make_egress_path](../reference/kumo/make_egress_path/enable_mta_sts.md) for
  more details. At this time, we do not support
  [TLSRPT](https://datatracker.ietf.org/doc/html/rfc8460).
* Preliminary support for
  [DANE](https://datatracker.ietf.org/doc/html/rfc7672). It defaults to
  disabled because it requires additional configuration to enable DNSSEC. See
  [make_egress_path](../reference/kumo/make_egress_path/enable_dane.md) for
  more details. At this time, we do not support
  [TLSRPT](https://datatracker.ietf.org/doc/html/rfc8460).
* The [DKIM
  helper](../userguide/configuration/dkim.md#using-the-dkim_signlua-policy-helper)
  now allows setting `body_canonicaliation` and `header_canonicalization`.
  Thanks to @cai-n! #81
* [msg:dkim_verify()](../reference/message/dkim_verify.md) and
  [msg:add_authentication_results()](../reference/message/add_authentication_results.md)
  #82
* You may now use `log_record` to refer to the entire log record when using
  templated log files. See
  [kumo.configure_local_logs](../reference/kumo/configure_local_logs/index.md) for
  more information.
* You may now specify an optional `segment_header` and optional `filter_event`,
  when customizing local logs.
  See [kumo.configure_local_logs](../reference/kumo/configure_local_logs/index.md)
  for more information.
* Delivery log records now include information about the TLS cipher, protocol
  version and peer subject name for SMTP deliveries that used TLS
* New [regex_set_map](../reference/kumo.regex_set_map/new.md) type for efficiently
  matching multiple regular expressions in a single search operation and returning
  an associated value.
* New
  [smtp_client_rewrite_delivery_status](../reference/events/smtp_client_rewrite_delivery_status.md)
  event to enable rewriting SMTP client status codes.
* minijinja templates now provide date/time formatting filters and globals
  via [minijinja_contrib](https://docs.rs/minijinja-contrib/latest/minijinja_contrib/index.html).
  Thanks to @cai-n! #91
* It is no longer necessary to call `shaper.get_queue_config` when using the shaping
  helper together with TSA.  You should change your config from:

  ```lua
  kumo.on('get_queue_config', function(domain, tenant, campaign, routing_domain)
    local cfg = shaper.get_queue_config(domain, tenant, campaign)
    if cfg then
        return cfg
    end

    -- Do your normal queue config handling here
  end)
  ```

  to:

  ```lua
  kumo.on('get_queue_config', function(domain, tenant, campaign, routing_domain)
    -- Do your normal queue config handling here
  end)
  ```

* It is no longer necessary to register `shaper.should_enqueue_log_record` when using the shaping
  helper together with TSA.  You should remove this line from your config:

  ```lua
  -- Remove this next line
  kumo.on('should_enqueue_log_record', shaper.should_enqueue_log_record)
  ```

* New [pre_init](../reference/events/pre_init.md) event to aid in building optional
  modular lua helpers.
* log records now only log *meta* values which are non-null. Thanks to @cai-n! #94
* Admin bounces now have the option to suppress generation of `AdminBounce` log
  records. #75

## Fixes
* HTTP injection API did not expand templating in `From`, `Reply-To` or
  `Subject` headers unless they were set in the additional headers object
* Allow optional spaces after the colon in `MAIL FROM:` and `RCPT TO:`. #76
* Missing 334 response to clients using multi-step SMTP `AUTH PLAIN`
* Messages that require "dot stuffing" could hang an outgoing SMTP session
  and tie up a connection until the data and/or data-dot timeout was reached.
* DKIM Signature headers with a long list of signed headers would wrap on
  hyphens instead of colons, which caused problems with some but not all
  verifiers.
