Author Topic: SMTP "Failed to connect to socket"  (Read 9101 times)

Offline ljp

  • Newbie
  • *
  • Posts: 2
SMTP "Failed to connect to socket"
« on: November 13, 2007, 01:29:12 AM »
Hi all,

First, thanks for writing Roundcube. I've been playing with it this evening and it's totally cool.

Second, I'm wondering if someone can help with my outgoing SMTP setup...

I want to send to a secure SMTP server with authentication. The server uses STARTTLS.

If I use localhost for sending mail, it works fine. But when I switch to the remote server, I get this---

SMTP Error: SMTP error: Connection failed: Failed to connect socket: in /usr/share/roundcube-webmail/program/steps/mail/sendmail.inc on line 334


That line of sendmail.inc is just the call to smtp_mail() failing.

My config follows. (I've tried all the different AUTH options, none work)

$rcmail_config['smtp_server'] = 'ssl://mail.example.edu';
$rcmail_config['smtp_port'] = 587;  # (I'm sure this is the correct port)
$rcmail_config['smtp_auth_type'] = 'LOGIN';


Any ideas on how I can debug this? Until I get a real webmail client working, I'm stuck using Outlook Web Access with Firefox... PLEASE HELP!




Offline cheongseeker

  • Newbie
  • *
  • Posts: 5
Re: SMTP "Failed to connect to socket"
« Reply #1 on: November 13, 2007, 01:59:43 AM »
If I'm not wrong SSl default port is 443. Port 587 is the alternative smtp port. Some service provider block smtp port 25. Thus, the alternative smtp port 587.

Offline ljp

  • Newbie
  • *
  • Posts: 2
Re: SMTP "Failed to connect to socket"
« Reply #2 on: November 13, 2007, 11:57:25 AM »
SSL defaults to 443. I think the convention for SSL+SMTP is 465, but my service provider arbitrarily uses 587.

I can confirm that much with telnet-

$ telnet mail.example.edu 587
Trying xxx.xx.xx.xx...
Connected to exchfe.example.edu.
Escape character is '^]'.
220 exchfe2.example.edu Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at Tue, 13 Nov 2007 11:56:00 -0500