Author Topic: Connection refused to SMTP  (Read 8991 times)

Offline syao

  • Newbie
  • *
  • Posts: 3
Connection refused to SMTP
« on: August 10, 2006, 06:45:30 PM »
i'm very glad new beta 2 finally launch, but i have some issue with beta 2

when i try to sending email thru roundcube, there's always failed to send msg and i check error logs , i found this error

 SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection refused
 in /path/to/roundcube/program/steps/mail/sendmail.inc on line 253

when i try using PHP Mail() all going well. but i guess PHP Mail() isn't a good solution to sending an email thru webmail.

Please advice!

Offline cat0

  • Newbie
  • *
  • Posts: 2
Re: Connection refused to SMTP
« Reply #1 on: August 26, 2006, 07:26:29 AM »
I have the exact same problem, using servage.net. I tried with "user@domain.tdl" instead of %u, and I have tried using all the different AUTH types, to no avail. Any suggestions?

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
$rcmail_config['smtp_server'] = 'smtp1.servage.net';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 5190;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

Offline Gary

  • Newbie
  • *
  • Posts: 8
Re: Connection refused to SMTP
« Reply #2 on: August 27, 2006, 08:09:24 AM »
Does your smtp server require authentication?

In the config you have there it will try to log onto the SMTP server using the username and password that you logged into RoundCube.
If you don't normally have to have a username and password to send email - leave it blank -''.

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '';

Gary

Offline syao

  • Newbie
  • *
  • Posts: 3
Re: Connection refused to SMTP
« Reply #3 on: September 06, 2006, 05:37:55 PM »
i was able to resolve this problem by myself, if you install roundcube in your own server and using cPanel you can re-install exim and set,

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
$rcmail_config['smtp_server'] = 'localhost';

if you use 127.0.0.1 or IP Address or Domain name (eg. smtp.blabla.com) , connection will refused but i found another issue if using " localhost " as smtp server, see below:

Received: from localhost ([127.0.0.1]:55212 ident=nobody)
   by blablaserver.com with esmtpa (Exim 4.52)

all your msg will ident as " nobody " but i guess it isn't matter if oidentd not installed on your server or web hosting server.

Try it!

Offline mattpist

  • Newbie
  • *
  • Posts: 2
Re: Connection refused to SMTP
« Reply #4 on: January 21, 2007, 04:28:20 PM »
Quote from: syao
i'm very glad new beta 2 finally launch, but i have some issue with beta 2

when i try to sending email thru roundcube, there's always failed to send msg and i check error logs , i found this error

 SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection refused
 in /path/to/roundcube/program/steps/mail/sendmail.inc on line 253

when i try using PHP Mail() all going well. but i guess PHP Mail() isn't a good solution to sending an email thru webmail.

Please advice!

i just wanted to say that i had this same problem, and changing $rcmail_config['smtp_server'] to "ssl://localhost" worked for me.