class EventMachine::Protocols::SmtpServer
def reset_protocol_state
senders and recipients.
The standard may allow multiple DATA segments with the same set of
after a message has been received. Although the latter may be wrong.
won't see the overridable fire except after EHLO and RSET, and
override method. This enables us to promise the users that they
well as during reset_protocol_state. It does NOT call the user
init_protocol_state is called when we initialize the connection as
using only receive_xxx for user-overridable stubs.
internal method names except receive_line (which we inherit), and
We try to follow the convention of avoiding the verb "receive" for
of senders, recipients, and whatnot.
We also have to callback user code, in case they're keeping track
any valid command except EHLO and STARTTLS.
to a pre-transaction state. In essence, we "forget" having seen
This is called at several points to restore the protocol state
--
def reset_protocol_state init_protocol_state s,@state = @state,[] @state << :starttls if s.include?(:starttls) @state << :ehlo if s.include?(:ehlo) receive_transaction end