Struct samotop_core::smtp::SmtpSession
source · [−]pub struct SmtpSession {
pub connection: ConnectionInfo,
pub extensions: ExtensionSet,
pub service_name: String,
pub peer_name: Option<String>,
pub output: Vec<DriverControl>,
pub input: Vec<u8>,
pub mode: Option<&'static str>,
pub transaction: Transaction,
}
Fields
connection: ConnectionInfo
Description of the underlying connection
extensions: ExtensionSet
ESMTP extensions enabled for this session
service_name: String
The name of the service serving this session
peer_name: Option<String>
The name of the peer as introduced by the HELO command
output: Vec<DriverControl>
Output to be processed by a driver - responses and IO controls
input: Vec<u8>
Input to be interpretted
mode: Option<&'static str>
Special mode used to switch parsers
transaction: Transaction
Current e-mail transaction
Implementations
Special mode where classic SMTP data are expected, used after reading some data without CRLF to keep track of the dot state
Reply “250 @info”
Reply “502 Not implemented”
Reply “500 Syntax error”
Reply “503 Command sequence error”
Reply “220 @name service ready”
Reply something like “250 @local greets @remote, we have extensions:
Reply and shut the session down
Reply “421 @name service not available, closing transmission channel” and shut the session down
Reply “421 @name service not available, closing transmission channel” and shut the session down
Processing error
Normal response to quit command