Skip to content

Commit

Permalink
Merge pull request #64 from codingphil/implement_missing_commands
Browse files Browse the repository at this point in the history
Implemented "NOOP" command
  • Loading branch information
andris9 committed Jan 16, 2014
2 parents 951850f + 707485c commit e8afdaa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/server.js
Expand Up @@ -301,6 +301,11 @@ SMTPServerConnection.prototype._onCommand = function(command, payload){
this._onCommandSTARTTLS();
break;

// No operation
case "NOOP":
this._onCommandNOOP();
break;

// Display an error on anything else
default:
this.client.send("502 5.5.2 Error: command not recognized");
Expand Down Expand Up @@ -607,6 +612,13 @@ SMTPServerConnection.prototype._onCommandEHLO = function(host){
}).join("\r\n"));
};

/**
* <p>No operation. Just returns OK.</p>
*/
SMTPServerConnection.prototype._onCommandNOOP = function(){
this.client.send("250 OK");
}

/**
* <p>Detect login information from the payload and initiate authentication
* by emitting <code>'authorizeUser'</code> and waiting for its callback</p>
Expand Down

0 comments on commit e8afdaa

Please sign in to comment.