#command #milter #modification #action #client #server

miltr-common

A miltr commons library in pure rust

2 releases

0.1.1 Jan 26, 2025
0.1.0 Feb 26, 2024

#321 in Email

Download history 2/week @ 2024-11-04 9/week @ 2024-12-09 56/week @ 2025-01-20 57/week @ 2025-01-27 8/week @ 2025-02-03 45/week @ 2025-02-10

166 downloads per month
Used in 2 crates

MIT license

97KB
2.5K SLoC

Miltr Common

Single source of truth for miltr-server and miltr-client implementations.

The milter protocol basically works as follows:

  1. A client establishes a connection to a server, negotiating Options via both sending optneg::OptNeg packages.
  2. The client send a commands::Command for each SMTP command it receives
  3. The server responds to each of those commands with an actions::Action
  4. After commands::EndOfBody the server responds with a list of modifications::ModificationAction to instruct the client what to change in the processed mail.

This is what's contained within the actions, commands, modifications and optneg module.

As all packages share some logic on how to be (de-)serialized, modules encoding and decoding contain the implementation of that.

All parsing is based on splitting bytes::BytesMut into smaller parts.

Dependencies

~1.7–2.7MB
~51K SLoC