Crate indymilter
source · [−]Expand description
A library for writing asynchronous milter applications.
This library provides an API for creating milters that can be integrated with MTAs using the sendmail mail filter protocol, also known as libmilter.
Usage
The function run is the main entry point to the indymilter API. This
function returns a future that can be awaited in order to execute a milter
application.
The API presented for implementing a milter is modeled after the sendmail milter (libmilter) API. Refer to the sendmail milter documentation for details and background. The documentation included in indymilter is less complete.
Trace logging
This library uses the tracing crate for internal trace logging. For
insight into library operation, use a tracing
subscriber and enable logging at trace level.
A word of warning: Trace logging is very noisy, and can be misleading. Even during normal operation it is common to see ‘errors’ such as inability to parse macro definitions from the MTA. However, this is expected, historically grown behaviour (no different from libmilter) and does not impact operation.
Modules
Milter protocol messages.
Structs
Flags that represent eom actions.
Callback closures for each milter stage.
Milter configuration.
Callback context.
End-of-message actions.
Callback context for the eom stage.
Currently defined macros.
Callback context for the negotiate stage.
Flags that represent milter protocol options.
Current custom SMTP reply.
Enums
An error that occurs when executing a context action.
A Tokio-based listener.
An error that occurs when configuring the SMTP reply.
Socket information.
The milter stage.
The status returned from callbacks.
Traits
Context actions.
Infallible conversion to a C string.
Conversion to a listener.
Customisation of an SMTP reply.
Functions
Runs a milter that handles MTA connections until it is shut down.
Type Definitions
The type returned by milter callbacks.