# indymilter changelog

All notable, publicly visible changes are listed in this changelog.

This project follows Rust-flavoured [semantic versioning], with changes to the
minimum supported Rust version being considered breaking changes.

[semantic versioning]: https://doc.rust-lang.org/cargo/reference/semver.html

## 0.3.0 (2024-03-04)

With this release, development has moved from GitLab to the [Codeberg] platform.

The minimum supported Rust version is now 1.65.0.

[Codeberg]: https://codeberg.org

### Changed

* The minimum supported Rust version has been raised to 1.65.0.
* The listener argument of main function `indymilter::run` is now a new trait
  [`Listener`]. This trait replaces the existing design with trait
  `IntoListener` and enum `Listener`.

  This change eliminates the dependency on UNIX-only types such as UNIX domain
  sockets, and makes the library usable on other platforms.
* The generated public API of `Actions` and `ProtoOpts` has a few minor changes
  due to upgrading the bitflags dependency to version 2.4.0.

### Added

* New enum [`EitherListener`] (with companion `EitherStream`) has been added to
  help with existing usage patterns of `indymilter::run` (similar to the former
  `Listener` enum).

[`Listener`]: https://docs.rs/indymilter/0.3.0/indymilter/trait.Listener.html
[`EitherListener`]: https://docs.rs/indymilter/0.3.0/indymilter/enum.EitherListener.html

## 0.2.0 (2023-01-09)

### Changed

* The `body` callback now receives the message body chunks as `bytes::Bytes`
  instead of as `Vec<u8>`, avoiding an additional copy of the body contents.
  Milters using the `body` callback may need to add a direct dependency on the
  [bytes] crate.
* `Stage` has been renamed to `MacroStage`. Its `all_stages*` methods have been
  renamed to `all*`.
* `ProtoOpts::HEADER_LEADING_SPACE` has been renamed to
  `ProtoOpts::LEADING_SPACE`.

### Added

* The new methods `Command::into_message` and `Reply::parse_reply` have been
  added to complement the existing command and reply methods. They complete the
  low-level API and are intended to support uses outside of indymilter itself.
* Implementations of `From<SocketAddr>` and `From<CString>` have been added for
  `SocketInfo`.
* Some additional remarks on usage have been added to the API documentation.

### Removed

* The unused enum variant `ParseCommandError::UnsupportedProtocolVersion` has
  been removed.

[bytes]: https://crates.io/crates/bytes

## 0.1.1 (2022-05-04)

### Changed

* The default value of `Config::connection_timeout` has been increased from 305
  to 7210 seconds. 7210 seconds, or slightly above two hours, is the timeout
  duration used in libmilter.
* During option negotiation, milter protocol versions below version 6 are now
  accepted. While using such ancient versions is not advisable, they are now
  supported just like in libmilter.

## 0.1.0 (2022-02-11)

Initial release.
