mx-connect
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -194,3 +194,3 @@ 'use strict'; | ||
if (!firstError) { | ||
let code = mx.isMX ? 450 : 550; | ||
let code = 450; | ||
firstError = new Error(`Connection timed out when connecting to MX server ${mx.hostname}[${mx.host}] for ${delivery.domain}`); | ||
@@ -197,0 +197,0 @@ firstError.response = code + ' ' + firstError.message; |
@@ -46,4 +46,6 @@ 'use strict'; | ||
firstError.exchange = ip.exchange; | ||
// This is not ENOTFOUND but an actual error, probably an issue with DNS server | ||
// so we return 4xx | ||
firstError.response = | ||
'550 Failed to resolve IP address for ' + | ||
'450 Failed to resolve IP address for ' + | ||
ip.exchange + | ||
@@ -68,2 +70,3 @@ ' of the MX server for ' + | ||
); | ||
// Invalid IP, so nothing to do here, return 5xx | ||
firstError.response = '550 ' + firstError.message; | ||
@@ -107,2 +110,4 @@ firstError.category = 'dns'; | ||
} | ||
// nothing found, we end up here with ENOTFOUND, so return 5xx | ||
let err = new Error('Could not resolve any IP addresses for the MX server for ' + delivery.domain); | ||
@@ -109,0 +114,0 @@ err.response = '550 ' + err.message; |
{ | ||
"name": "mx-connect", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Establish TCP connection to a MX server", | ||
@@ -5,0 +5,0 @@ "main": "lib/mx-connect.js", |
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
54719
940