mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-24 06:44:04 +00:00
32 lines
612 B
Go
32 lines
612 B
Go
package protocol
|
|
|
|
// State represents the state of an SMTP conversation
|
|
type State int
|
|
|
|
// SMTP message conversation states
|
|
const (
|
|
INVALID = State(-1)
|
|
ESTABLISH = State(iota)
|
|
AUTHPLAIN
|
|
AUTHLOGIN
|
|
AUTHLOGIN2
|
|
AUTHCRAMMD5
|
|
MAIL
|
|
RCPT
|
|
DATA
|
|
DONE
|
|
)
|
|
|
|
// StateMap provides string representations of SMTP conversation states
|
|
var StateMap = map[State]string{
|
|
INVALID: "INVALID",
|
|
ESTABLISH: "ESTABLISH",
|
|
AUTHPLAIN: "AUTHPLAIN",
|
|
AUTHLOGIN: "AUTHLOGIN",
|
|
AUTHLOGIN2: "AUTHLOGIN2",
|
|
AUTHCRAMMD5: "AUTHCRAMMD5",
|
|
MAIL: "MAIL",
|
|
RCPT: "RCPT",
|
|
DATA: "DATA",
|
|
DONE: "DONE",
|
|
}
|