Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset state properly #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Reset state properly #4

wants to merge 3 commits into from

Conversation

dcormier
Copy link

@dcormier dcormier commented Jun 12, 2018

The HELO/EHLO domain was being lost during an RSET. This fixes that.

dcormier added 3 commits June 11, 2018 16:31
Per RFC 5321, sections 4.1.1.5 and  4.1.4, issuing an RSET command
should not result in the HELO/EHLO domain being removed from the
session.

From section 4.1.1.5:

> It is effectively equivalent to a NOOP (i.e., it has no
> effect) if issued immediately after EHLO, before EHLO is
> issued in the session, after an end of data indicator has
> been sent and acknowledged, or immediately before a QUIT.

And:

> Since EHLO implies some additional processing and response by the
> server, RSET will normally be more efficient than reissuing that
> command, even though the formal semantics are the same.
Based on RFC 5321, section 4.1.4, any stored values should be reset
if a HELO/EHLO command is sent subsequent to the original:

> An EHLO command MAY be issued by a client later in the session.  If
> it is issued after the session begins and the EHLO command is
> acceptable to the SMTP server, the SMTP server MUST clear all buffers
> and reset the state exactly as if a RSET command had been issued.  In
> other words, the sequence of RSET followed immediately by EHLO is
> redundant, but not harmful other than in the performance cost of
> executing unnecessary commands.
@dcormier dcormier mentioned this pull request Jul 12, 2019
@dcormier dcormier mentioned this pull request Jan 8, 2020
@dcormier
Copy link
Author

Fixes #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant