1

Closed

Error with RSET command

description

I'm trying to use this with a legacy app that uses the AspNetMailer component and am getting the following error reported when sending:
 
"aspNetEmail.SmtpProtocolException: [Additional Help:Reply From RSET502 Command not implemented"
Closed May 6, 2011 at 2:18 PM by Antix

comments

Antix wrote Mar 3, 2011 at 4:15 PM

This is now in the Dev stream setup
http://antix.co.uk/Projects/SMTPImpostor/Dev/Setup.exe

gjstockham wrote Mar 9, 2011 at 3:33 PM

Thank you, this almost works! . I now get an error "expecting HELO <name>"

I have now managed to dig around the source a bit and understand what's going on

The component I'm using seems to send HELO, RSET then MAIL. The code you added sets the status to Connected, so the MAIL command fails as the Status < Identified

I've downloaded branch 2, and if I change the RSET section to set Identified, then it works for me.

e.g. (Session.cs)
        } else if (command.Equals(Commands.RSET)) {
            Write(ReplyCodes.Completed_250, String.Format(Resources.Hello_250, ClientId));

            Status = States.Identified;
            Host.RaiseEvent(HostEventTypes.SessionIdentified, this);

            Read(Server.LINE_TERMINATOR);

Antix wrote Mar 10, 2011 at 9:07 AM

I've had another look at the rfc, and it doesn't really say what state would be expected after a RSET.
But I think you're right, it would be identified, ie expecting MAIL
I'll update the code and get a release out now

thanks a lot for your help, Ant

Antix wrote May 6, 2011 at 2:18 PM