not able to connect to googlemail

Jul 10, 2014 at 2:22 PM
I'm running SMTPproxy in console mode (args = /console), but it seems to hang in "receive"

here is the trace snippet
System.Net.Sockets Information: 0 : [5652] Socket#63835064 - Connessione accettata da 127.0.0.1:3400 a 127.0.0.1:2222.
System.Net.Sockets Verbose: 0 : [5652] Exiting Socket#19515494::Accept()    -> Socket#63835064
System.Net.Sockets Verbose: 0 : [5652] Exiting TcpListener#39451090::AcceptSocket()     -> Socket#63835064
SmtpProxy Information: 1013 : Socket 1312 opened
SmtpProxy Information: 1023 : Connecting to SMTP server smtp.googlemail.com:465
System.Net.Sockets Verbose: 0 : [5268] TcpClient#6044116::TcpClient(smtp.googlemail.com)
System.Net.Sockets Verbose: 0 : [5268] TcpClient#6044116::Connect(smtp.googlemail.com)
System.Net.Sockets Verbose: 0 : [5268] DNS::GetHostAddresses(smtp.googlemail.com)
System.Net.Sockets Verbose: 0 : [5268] DNS::GetHostByName(smtp.googlemail.com)
System.Net.Sockets Verbose: 0 : [5268] Exiting DNS::GetHostByName()     -> IPHostEntry#59817589
System.Net.Sockets Verbose: 0 : [5268] Exiting DNS::GetHostAddresses()  -> IPAddress[]#48209832
System.Net.Sockets Verbose: 0 : [5268] Socket#5773521::Socket(InterNetwork#2)
System.Net.Sockets Verbose: 0 : [5268] Exiting Socket#5773521::Socket() 
System.Net.Sockets Verbose: 0 : [5268] Socket#5773521::Connect(16#272810669)
System.Net.Sockets Verbose: 0 : [5268] Socket#5773521::Connect(16:465#272810876)
System.Net.Sockets Information: 0 : [5268] Socket#5773521 - Connessione creata da 192.168.0.12:3401 a 173.194.66.16:465.
System.Net.Sockets Verbose: 0 : [5268] Exiting Socket#5773521::Connect() 
System.Net.Sockets Verbose: 0 : [5268] Exiting Socket#5773521::Connect() 
System.Net.Sockets Verbose: 0 : [5268] Exiting TcpClient#6044116::Connect() 
System.Net.Sockets Verbose: 0 : [5268] Exiting TcpClient#6044116::TcpClient() 
System.Net.Sockets Verbose: 0 : [5268] TcpClient#6044116::GetStream()
System.Net.Sockets Verbose: 0 : [5268] Exiting TcpClient#6044116::GetStream()   -> NetworkStream#54135081
System.Net.Sockets Verbose: 0 : [5268] Socket#5773521::Receive()
I track down this to the following line in SmtpProxy.SmtpServer.ConnectToServer()
        string ConnectToServer()
        {
            Program.Trace.TraceEvent(TraceEventType.Information, 1023, "Connecting to SMTP server {0}:{1}", Settings.Default.SmtpHostUrl, Settings.Default.SmtpPort);

            // Connect to the TargetServer
            Client = new TcpClient(Settings.Default.SmtpHostUrl, Settings.Default.SmtpPort);
            NetworkStream = Client.GetStream();

            // Create clear text reader/writer to help establish encrypted connection
            ClearTextReader = new StreamReader(NetworkStream);
            ClearTextWriter = new StreamWriter(NetworkStream) { AutoFlush = true };

            string response = ClearTextReader.ReadLine(); // <== HANG HERE
I'm able to connect directly with Thunderbird to smpt.googlemail.com
any suggestion?
thank you in advance
stefano
Jul 17, 2014 at 4:58 PM
just found a configuration error in my installation.
SMTPproxy works fine with STARTTLS (smpt.google.com:587) but just hangs on port 465 (standard SSL) since the server won't respond with code 220
stefano