Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: Strange networking error with IMAP
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted October 13, 2016 3:34 PM

Hi, we are using the 4.3.0.2 PowerTCP Mail for .NET and it is working fine on several Windows servers with different email systems using IMAP. We are now running our Windows service that checks for mail over IMAP at a new client site and have found a strange issue on their server and wanted to see if you have seen this before. They use Office 365 (Microsoft Exchange Server 2016 IMAP4).

At first glance, it seems like a simple networking/routing issue, because our Windows service using the Dart DLL gives the following .NET exception when we try to connect to the IMAP server:
"Message: A socket operation was attempted to an unreachable network 132.245.68.130:993".

When we configure a Thunderbird Mail client on the same server desktop, it works OK and can logon and fetch mail, so we know the firewall is good and the mail server is accessible from their network.

So, we have tried the following:

1) We tried their IMAP account here on our server using our Dart-based Windows service and it works OK.

2) We tried to connect to a gmail account (that works here on our server over IMAP), but on their server it also returns the same error as above. So, it is not email system specific.

3) We asked if they have an special tools, restrictions or policies that prevent Internet or types of network traffic for users or Windows services. The client says "No" and even removed any special AD policies etc. they did have setup. Still the same error persists.

4) We have tried running our Windows service "As" the same Windows network user account that worked for Thunderbird on the desktop, but the service still failed with the same error. We also tried running the Windows service with "Allow interact with Desktop" and that didn't help either.

Is it possible that the customer has several NIC's (network interlace cards) on their server and Dart isn't able to use the proper interface, thus the network routing error?

Any ideas on what to try next?

Thanks,

Mike
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 13, 2016 4:43 PM

Hello Mike,

Does the computer have a proxy configured in its Internet Properties (control panel)? (Thunderbird may be using its settings; our component's proxy settings must be configured specifically)
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted October 13, 2016 5:14 PM

Hi, we will check and let you know.
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted October 17, 2016 11:20 AM

Hi Nick, I was able to help our tech troubleshoot this further at the customer site. They have multiple NIC's in the server and one is their Ethernet backup NIC. Dart seems to want to use that one instead of the primary one for some reason, however it doesn't have a Default Gateway defined. I asked them to disable the "Ethernet adapter Backup Network" and we can now connect to the mail servers as expected.

I seem to recall having this issue before on one of the older Dart DLLs back some time ago, but it may have been the telnet or ftp module that was affected instead of the mail module. We are asking them if they can define the default gateway for the "Ethernet adapter Backup Network" NIC as well so it doesn't matter.

Here is their configuration (ipconfig command):

Windows IP Configuration

  Host Name . . . . . . . . . . . . : ATMDMS01
  Primary Dns Suffix . . . . . . . : dsw.net
  Node Type . . . . . . . . . . . . : Hybrid
  IP Routing Enabled. . . . . . . . : No
  WINS Proxy Enabled. . . . . . . . : No
  DNS Suffix Search List. . . . . . : dsw.net

Ethernet adapter VLAN 20:

  Connection-specific DNS Suffix . :
  Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
  Physical Address. . . . . . . . . : 00-15-5D-0C-96-59
  DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes
  IPv4 Address. . . . . . . . . . . : 10.0.4.207(Preferred)
  Subnet Mask . . . . . . . . . . . : 255.255.252.0
  Default Gateway . . . . . . . . . : 10.0.4.1
  DNS Servers . . . . . . . . . . . : 10.0.4.108
                    10.0.4.57
  NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Backup Network:

  Connection-specific DNS Suffix . :
  Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter #2
  Physical Address. . . . . . . . . : 00-15-5D-0C-96-5A
  DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes
  IPv4 Address. . . . . . . . . . . : 172.16.4.70(Preferred)
  Subnet Mask . . . . . . . . . . . : 255.255.252.0
  Default Gateway . . . . . . . . . :
  NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{7A16F193-4DBC-404C-B85D-A11AF0481A2A}:

  Media State . . . . . . . . . . . : Media disconnected
  Connection-specific DNS Suffix . :
  Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
  Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{BB0ECD9C-7823-4099-B385-CD4A95294EAF}:

  Media State . . . . . . . . . . . : Media disconnected
  Connection-specific DNS Suffix . :
  Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
  Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  DHCP Enabled. . . . . . . . . . . : No
  Autoconfiguration Enabled . . . . : Yes


Thanks for your help!

Mike

Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 17, 2016 11:59 AM

The component binds to the 0.0.0.0 (IPv4) (or :: (IPv6) when connecting to an IPv6 address) local address by default, which should result in it being able to route and connect over the best local NIC for the remote endpoint, but perhaps their network configuration results in Windows or the .NET Framework routing over the 'Ethernet backup NIC' for some reason. You can specify the specific local NIC's IP address to bind to with Imap.Session.LocalEndPoint.HostNameOrAddress.
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted October 18, 2016 3:11 PM

Thanks Nick. It is odd that other apps (like Thunderbird, telnet connection to mail server port, browsers etc.) don't have this same routing issue and don't require specification of which local adapter to use. We can certainly try to specify the LocalEndPoint, but it doesn't seem like it should be required.

Do you think we should open a ticket with support? (assuming you are working with Dart yourself).
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 19, 2016 1:20 PM

I agree it is odd; we've never seen this before. It shouldn't be required to specify the specific local NIC to bind to; that's the explicit purpose of using IPAddress.Any (0.0.0.0).

Yes, I'm with Dart. I've sent you an email for some further investigation.
cainmt

From: USA
Posts: 14
Member Since: 05/04/16
posted December 14, 2016 5:58 PM

Thanks for your help Nick! Just updating this one to make it complete.

Resolution: The LocalEndPoint.HostNameOrAddress property defaults to 0.0.0.0, but setting it to an empty string will result in choosing the first ethernet adapter in Windows' ethernet adapter list. It should be left as 0.0.0.0 in most scenarios so that routing will occur automatically over the best adapter for the remote endpoint.
Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX