Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
// Receive receives the output of an SMTP conversation
Receive(output *Output) error
// Chan returns a channel to send notifications to
Chan() chan MessageID
// List returns a list of messages
List(start, limit int) ([]*Output, error)
// Fetch returns a message based on message ID
Fetch(MessageID) (*Output, error)
// Close closes the backend
Close() error
}
Backend represents a server backend
type Data ¶
type Data struct {
Date time.Time
Sender DataSender
Line string
}
Data represents an individual line of the SMTP conversation
type DataSender ¶
type DataSender string
DataSender represents the data origin
const Client DataSender = "CLIENT"
Client represents data sent by the client
const Server DataSender = "SERVER"
Server represents data sent by the server
type Output ¶
type Output struct {
Context string
RemoteAddress string
TLS bool
Messages []*data.SMTPMessage
Data []Data
Proto []Proto
Events []Event
LogData, LogProto, LogEvents bool
// contains filtered or unexported fields
}
Output represents an SMTP conversation
func (*Output) RecordData ¶
func (s *Output) RecordData(sender DataSender, line string)
RecordData records a line of the SMTP conversation
func (*Output) RecordEvent ¶
RecordEvent records an event from the server
func (*Output) RecordMessage ¶
func (s *Output) RecordMessage(message *data.SMTPMessage)
RecordMessage records a message received in the SMTP conversation
func (*Output) RecordProto ¶
RecordProto records data from the protocol state machine
Click to show internal directories.
Click to hide internal directories.