Archived Forum Post

Index of archived forum posts

Question:

IMAP connect times out from 2003 Server, works in dev and from 2008 server

Sep 08 '15 at 14:01

We are connecting to a IMAP server of an internal exchange server. The process works fine from Debug on Windows 7 Visual Studios, It works fine on 2008 Server, but when we run from a 2003 server it just times out. I thought it was being blocked for some reason, but from that same 2003 server I can telnet to server 143 it connects, i can login, List mailboxes, read mail, and logout. Firewall is Off, virus software shutdown, the imap server is open to any internal address.

So what could be wrong in my environment where a telnet imap session works but the chilkat connect will just sit and timeout after a minute. Here is the code and session log and lasterrorhtml.

Any suggestions would be greatly appreciated.

            Imap imapSrv = new Imap();
            imapSrv.UnlockComponent("...");
            imapSrv.KeepSessionLog = true;

        imapSrv.Connect("server.domain.com");

        Console.WriteLine(imapSrv.LastErrorText);
        Console.WriteLine(imapSrv.SessionLog);
        Console.ReadLine();

        imapSrv.Disconnect();
        imapSrv.Dispose();

ChilkatLog: Connect_Imap: DllDate: May 8 2014 ChilkatVersion: 9.5.0.39 UnlockPrefix: ..... Username: server:userid Architecture: Little Endian; 32-bit Language: .NET 4.0 VerboseLogging: 0 hostname: server.domain.com port: 143 socketOptions: SO_SNDBUF: 8192 SO_RCVBUF: 8192 --socketOptions ConnectionType: Unencrypted TCP/IP Timeout waiting to read socket or accept connection timeoutMs: 60000 recvUntilMatch: Socket operation timeout. getImapResponseLine: Socket operation timeout. Failed to get greeting. connect failed. --Connect_Imap --ChilkatLog

----INFO---- Connecting to IMAP server at server.domain.com:143 ----IMAP RESPONSE---- ----ERROR---- Failed to get command response on socket ----ERROR---- Connect Failed (3)


Answer

Your library version is about a year old - I'd try again with the latest release and see if it's a problem that's already been fixed.


Answer

Downloaded the latest and greatest and have the same issue.

2015-09-08 11:51:52.959 [D] LastErrorText: ChilkatLog:
  Connect_Imap(120047ms):
    DllDate: Aug 26 2015
    ChilkatVersion: 9.5.0.52
    UnlockPrefix: SMFRLNIMAPMAILQ
    Username: SAIACLAIMS:p8admin
    Architecture: Little Endian; 32-bit
    Language: .NET 4.0
    VerboseLogging: 1
    connectInner(120047ms):
      connectToImapServer(120047ms):
        hostname: saiahgofrnt.saia.com
        port: 143
        socket2Connect(31ms):
          connect2(31ms):
            hostname: saiahgofrnt.saia.com
            port: 143
            ssl: 0
            connectSocket(31ms):
              domainOrIpAddress: saiahgofrnt.saia.com
              port: 143
              connectTimeoutMs: 30000
              connect_ipv6_or_ipv4(31ms):
                Multi-threaded domain to IP address resolution
                connecting to IPV4 address...
                ipAddress: 172.16.1.17
                createSocket:
                  Setting SO_SNDBUF size
                  sendBufSize: 262144
                  Setting SO_RCVBUF size
                  recvBufSize: 4194304
                --createSocket
                connect:
                  myIP: 172.16.1.36
                  myPort: 2006
                  socket connect successful.
                --connect
              --connect_ipv6_or_ipv4
            --connectSocket
          --connect2
        --socket2Connect
        Turning on TCP_NODELAY.
        socketOptions:
          SO_SNDBUF: 262144
          SO_RCVBUF: 4194304
        --socketOptions
        ConnectionType: Unencrypted TCP/IP
        recvUntilMatch: Socket operation timeout.
        nReceived: 0
        getImapResponseLine: Socket operation timeout.
        Failed to get greeting.
      --connectToImapServer
      connect failed.
    --connectInner
    Failed.
  --Connect_Imap
--ChilkatLog