Skip to main content

Status

Status

Namespace: global/status

Functions used to interact with the rule engine. Use states in rules to deny, accept, or quarantine emails.

fn accept

fn accept() -> SMTP ReceiverStatus
fn accept(code: String) -> Result<SMTP ReceiverStatus>
Tell the rule engine to accept the incoming transaction for the current stage. This means that all rules following the one `accept` is called in the current stage will be ignored.

fn next

fn next() -> SMTP ReceiverStatus
Tell the rule engine that a rule succeeded. Following rules in the current stage will be executed.

fn deny

fn deny() -> SMTP ReceiverStatus
fn deny(code: String) -> Result<SMTP ReceiverStatus>
Sends an error code to the client and closes the transaction.

fn quarantine

fn quarantine(queue: String) -> SMTP ReceiverStatus
Skip all rules until the email is received and place the email in a quarantine queue. The email will never be sent to the recipients and will stop being processed after the `PreQ` stage.

op ==

op ==(status_1: SMTP ReceiverStatus, status_2: SMTP ReceiverStatus) -> bool
Check if two statuses are equal.

op !=

op !=(status_1: SMTP ReceiverStatus, status_2: SMTP ReceiverStatus) -> bool
Check if two statuses are not equal.

fn to_string

fn to_string(status: SMTP ReceiverStatus) -> String
Convert a status to a string. Enables string interpolation.

fn to_debug

fn to_debug(status: SMTP ReceiverStatus) -> String
Convert a status to a debug string Enables string interpolation.