Attribute Macro milter_callback::on_helo [−][src]
#[on_helo]
Expand description
Generates a callback function of type HeloCallback
that delegates to the
annotated function.
As its sole argument on_helo
takes an identifier to be used as the name of
the generated function.
The on_helo
callback is called when a HELO
or EHLO
SMTP command is
received. The signature of the annotated function must be as specified
below.
Arguments:
Return type:
Status
– the response status
Examples
use milter::{Context, Status};
#[on_helo(helo_callback)]
fn handle_helo(context: Context<MyData>, helo_host: &str) -> Status {
Status::Continue
}