[−][src]Attribute Macro milter_callback::on_rcpt
#[on_rcpt]
Generates a callback function of type RcptCallback
that delegates to the
annotated function.
As its sole argument on_rcpt
takes an identifier to be used as the name of
the generated function.
The on_rcpt
callback handles processing of an envelope recipient (RCPT TO
SMTP command). It can be called multiple times for a single message. The
signature of the annotated function must be as specified below.
Arguments:
Context<T>
– the callback contextVec<&str>
– the SMTP command arguments (the first element is the recipient address)
Return type:
Status
– the response status
Examples
use milter::{Context, Status}; #[on_rcpt(rcpt_callback)] fn handle_rcpt(context: Context<MyData>, smtp_args: Vec<&str>) -> Status { Status::Continue }