mx-connect
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -95,3 +95,9 @@ 'use strict'; | ||
) { | ||
delivery.localAddress = net.isIPv6(mx.host) ? delivery.localAddressIPv6 : delivery.localAddressIPv4; | ||
if (net.isIPv6(mx.host)) { | ||
delivery.localAddress = delivery.localAddressIPv6; | ||
delivery.localHostname = delivery.localHostnameIPv6 || delivery.localHostname || delivery.localAddress; | ||
} else { | ||
delivery.localAddress = delivery.localAddressIPv4; | ||
delivery.localHostname = delivery.localHostnameIPv4 || delivery.localHostname || delivery.localAddress; | ||
} | ||
} | ||
@@ -108,2 +114,3 @@ | ||
} | ||
options.localHostname = delivery.localHostname || delivery.localAddress; | ||
@@ -110,0 +117,0 @@ let emitConnectHook = done => { |
{ | ||
"name": "mx-connect", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Establish TCP connection to a MX server", | ||
@@ -5,0 +5,0 @@ "main": "lib/mx-connect.js", |
@@ -50,2 +50,3 @@ # mx-connect | ||
* **localAddress** is the local IP address to use for the connection | ||
* **localHostname** is the hostname of the local address | ||
* **localAddressIPv4** is the local IPv4 address to use for the connection if you want to specify an address both for IPv4 and IPv6 | ||
@@ -52,0 +53,0 @@ * **localAddressIPv6** is the local IPv6 address to use for the connection if you want to specify an address both for IPv4 and IPv6 |
53216
907
78