{
  "states": [
    "ConnectionEstablished",
    "AwaitingEhloHelo",
    "MailTransactionStart",
    "WaitingForRcpt",
    "DataTransfer",
    "AwaitingQuit",
    "SessionEnd",
    "VrfyExpnEnabled",
    "VrfyExpnDisabled",
    "AuthenticatedVrfyExpnEnabled"
  ],
  "initial_state": "ConnectionEstablished",
  "final_states": [
    "SessionEnd"
  ],
  "transitions": [
    {
      "from": "ConnectionEstablished",
      "event": "send 220 greeting",
      "action": "reply 220",
      "to": "AwaitingEhloHelo"
    },
    {
      "from": "ConnectionEstablished",
      "event": "send 554 rejection",
      "action": "reply 554",
      "to": "AwaitingQuit"
    },
    {
      "from": "AwaitingEhloHelo",
      "event": "receive EHLO",
      "action": "reply 250",
      "to": "MailTransactionStart"
    },
    {
      "from": "AwaitingEhloHelo",
      "event": "receive HELO",
      "action": "reply 250",
      "to": "MailTransactionStart"
    },
    {
      "from": "AwaitingEhloHelo",
      "event": "receive unrecognized command",
      "action": "reply 500",
      "to": "AwaitingEhloHelo"
    },
    {
      "from": "MailTransactionStart",
      "event": "receive MAIL",
      "action": "reply 250",
      "to": "WaitingForRcpt"
    },
    {
      "from": "MailTransactionStart",
      "event": "receive other command",
      "action": "reply 503",
      "to": "MailTransactionStart"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive RCPT",
      "action": "reply 250",
      "to": "WaitingForRcpt"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive RCPT rejected",
      "action": "reply 550",
      "to": "WaitingForRcpt"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive DATA",
      "action": "reply 354",
      "to": "DataTransfer"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive DATA no_recipients",
      "action": "reply 554",
      "to": "MailTransactionStart"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive other command",
      "action": "reply 503",
      "to": "MailTransactionStart"
    },
    {
      "from": "DataTransfer",
      "event": "receive end_of_data",
      "action": "reply 250",
      "to": "MailTransactionStart"
    },
    {
      "from": "DataTransfer",
      "event": "receive end_of_data rejected",
      "action": "reply 550",
      "to": "MailTransactionStart"
    },
    {
      "from": "MailTransactionStart",
      "event": "receive QUIT",
      "action": "reply 221",
      "to": "SessionEnd"
    },
    {
      "from": "WaitingForRcpt",
      "event": "receive QUIT",
      "action": "reply 221",
      "to": "SessionEnd"
    },
    {
      "from": "DataTransfer",
      "event": "receive QUIT",
      "action": "reply 221",
      "to": "SessionEnd"
    },
    {
      "from": "AwaitingEhloHelo",
      "event": "receive QUIT",
      "action": "reply 221",
      "to": "SessionEnd"
    },
    {
      "from": "AwaitingQuit",
      "event": "receive QUIT",
      "action": "reply 221",
      "to": "SessionEnd"
    },
    {
      "from": "AwaitingQuit",
      "event": "receive other command",
      "action": "reply 503",
      "to": "AwaitingQuit"
    },
    {
      "from": "ConnectionEstablished",
      "event": "cond site_disables_VRFY_EXPN",
      "action": "reply 252",
      "to": "VrfyExpnDisabled"
    },
    {
      "from": "ConnectionEstablished",
      "event": "cond site_enables_VRFY_EXPN",
      "action": "None",
      "to": "VrfyExpnEnabled"
    },
    {
      "from": "VrfyExpnEnabled",
      "event": "receive VRFY_or_EXPN",
      "action": "check address_validity",
      "to": "VrfyExpnEnabled"
    },
    {
      "from": "VrfyExpnEnabled",
      "event": "cond address_valid",
      "action": "reply 250",
      "to": "VrfyExpnEnabled"
    },
    {
      "from": "VrfyExpnEnabled",
      "event": "cond address_invalid",
      "action": "reply 550",
      "to": "VrfyExpnEnabled"
    },
    {
      "from": "VrfyExpnDisabled",
      "event": "receive VRFY_or_EXPN",
      "action": "reply 252",
      "to": "VrfyExpnDisabled"
    },
    {
      "from": "ConnectionEstablished",
      "event": "cond smtp_authentication_enabled",
      "action": "None",
      "to": "AuthenticatedVrfyExpnEnabled"
    },
    {
      "from": "AuthenticatedVrfyExpnEnabled",
      "event": "receive VRFY_or_EXPN",
      "action": "check authenticated_requestor",
      "to": "AuthenticatedVrfyExpnEnabled"
    },
    {
      "from": "AuthenticatedVrfyExpnEnabled",
      "event": "cond authenticated",
      "action": "check address_validity",
      "to": "AuthenticatedVrfyExpnEnabled"
    },
    {
      "from": "AuthenticatedVrfyExpnEnabled",
      "event": "cond not_authenticated",
      "action": "reply 550",
      "to": "AuthenticatedVrfyExpnEnabled"
    },
    {
      "from": "AuthenticatedVrfyExpnEnabled",
      "event": "cond address_valid",
      "action": "reply 250",
      "to": "AuthenticatedVrfyExpnEnabled"
    },
    {
      "from": "AuthenticatedVrfyExpnEnabled",
      "event": "cond address_invalid",
      "action": "reply 550",
      "to": "AuthenticatedVrfyExpnEnabled"
    }
  ]
}