2014-11-22 19:15:50 +00:00
|
|
|
package protocol
|
2014-11-22 19:05:21 +00:00
|
|
|
|
|
|
|
// State represents the state of an SMTP conversation
|
|
|
|
type State int
|
|
|
|
|
|
|
|
// SMTP message conversation states
|
|
|
|
const (
|
|
|
|
INVALID = State(-1)
|
|
|
|
ESTABLISH = State(iota)
|
2014-11-23 00:36:32 +00:00
|
|
|
AUTHPLAIN
|
2014-11-22 19:05:21 +00:00
|
|
|
AUTHLOGIN
|
2014-11-23 00:36:32 +00:00
|
|
|
AUTHLOGIN2
|
|
|
|
AUTHCRAMMD5
|
2014-11-22 19:05:21 +00:00
|
|
|
MAIL
|
|
|
|
RCPT
|
|
|
|
DATA
|
|
|
|
DONE
|
|
|
|
)
|
|
|
|
|
|
|
|
// StateMap provides string representations of SMTP conversation states
|
|
|
|
var StateMap = map[State]string{
|
2014-11-23 00:36:32 +00:00
|
|
|
INVALID: "INVALID",
|
|
|
|
ESTABLISH: "ESTABLISH",
|
|
|
|
AUTHPLAIN: "AUTHPLAIN",
|
|
|
|
AUTHLOGIN: "AUTHLOGIN",
|
|
|
|
AUTHLOGIN2: "AUTHLOGIN2",
|
|
|
|
AUTHCRAMMD5: "AUTHCRAMMD5",
|
|
|
|
MAIL: "MAIL",
|
|
|
|
RCPT: "RCPT",
|
|
|
|
DATA: "DATA",
|
|
|
|
DONE: "DONE",
|
2014-11-22 19:05:21 +00:00
|
|
|
}
|