smtp-server
Advanced tools
Comparing version 1.0.0 to 1.0.1
'use strict'; | ||
var SMTPStream = require('./smtp-stream').SMTPStream; | ||
var Joi = require('joi'); | ||
var dns = require('dns'); | ||
@@ -367,8 +366,5 @@ var tls = require('tls'); | ||
var parts = command.toString().split(/\s+/); | ||
var hostname = parts[1]; | ||
var hostname = parts[1] || ''; | ||
var schema = Joi.string().hostname().required(); | ||
var validation = Joi.validate(hostname, schema); | ||
if (parts.length !== 2 || validation.error) { | ||
if (parts.length !== 2) { | ||
this.send(501, 'Error: syntax: EHLO hostname'); | ||
@@ -378,3 +374,3 @@ return callback(); | ||
this.hostNameAppearsAs = validation.value; | ||
this.hostNameAppearsAs = hostname.toLowerCase(); | ||
@@ -402,8 +398,5 @@ var features = ['PIPELINING', '8BITMIME', 'SMTPUTF8']; | ||
var parts = command.toString().split(/\s+/); | ||
var hostname = parts[1]; | ||
var hostname = parts[1] || ''; | ||
var schema = Joi.string().hostname().required(); | ||
var validation = Joi.validate(hostname, schema); | ||
if (parts.length !== 2 || validation.error) { | ||
if (parts.length !== 2) { | ||
this.send(501, 'Error: Syntax: HELO hostname'); | ||
@@ -413,3 +406,3 @@ return callback(); | ||
this.hostNameAppearsAs = validation.value; | ||
this.hostNameAppearsAs = hostname.toLowerCase(); | ||
@@ -416,0 +409,0 @@ this._startSession(); // HELO is effectively the same as RSET |
{ | ||
"name": "smtp-server", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Create custom SMTP servers on the fly", | ||
@@ -11,5 +11,3 @@ "main": "lib/smtp-server.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"joi": "^5.1.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
@@ -16,0 +14,0 @@ "chai": "^2.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
85314
1867
- Removedjoi@^5.1.0
- Removedhoek@2.16.3(transitive)
- Removedisemail@1.2.0(transitive)
- Removedjoi@5.1.0(transitive)
- Removedmoment@2.30.1(transitive)
- Removedtopo@1.1.0(transitive)