Author Topic: Can't get SMTP working - Always getting "Connection Refused"  (Read 6883 times)

Offline VinnieB

  • Newbie
  • *
  • Posts: 1
I installed this and think it can be a replacement for Squirrelmail which I'm getting sick of.  However, I've spent a few hours today and simply can't SMTP to work right.  IMAP is working and messages are downloading, being deleted, put into folders, etc.  But upon sending I'm always getting connection refused.  I've tried changing the configuration parameters every which way but simply don't connect.  This could easily be a simply mistake on my part as I'm more of a part-time Linux admin than a pro.

I can successfully telnet to this machine using ports 25 and 587.  (I use the latter.)  I've seen a few message board posts about this but not many helpful replies.  I'm ready to just give up on roundcube as it's just not working.  :(  Please help.  I'm willing to keep at it for a while more but I just don't have the time to keep hacking at this.  THANKS!!

Here's the current state of my config file.  As I said, I've tried so many variants of this and always get nothing.

$config['smtp_server'] = 'www.<servername>.com'; // tried localhost, 127.0.0.1, with 'ssl://', with tsl://, and others
$config['smtp_user'] = ''; // tried %u, my actual user name
$config['smtp_pass'] = ''; // tried %p, my actual password
$config['smtp_port'] = 587;  // tried 25, without this line

The log file just shows these lines on each send attempt which aren't too helpful:

[19-Jun-2014 18:27:26] Connection refused (111):
[19-Jun-2014 18:27:26] Failed to connect socket: Connection refused ():
[19-Jun-2014 18:27:26 -0600]: SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection refused in /var/www/html/ <deleted> /program/lib/Roundcube/rcube.php on line 1504 (POST /cuberound/?_task=mail&_unlock=loading1403223237808&_lang=en_US?_task=mail&_action=send)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: Can't get SMTP working - Always getting "Connection Refused"
« Reply #1 on: June 21, 2014, 04:36:19 AM »
Quote
I can successfully telnet to this machine using ports 25 and 587

did you try and telnet from the webserver to you smtp server? are they on the same machine?

Quote
Failed to connect socket: Connection refused ()

would suggest that there is a firewall blocking the connection.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦