Posts tagged Roundcube SMTP error

How to change SMTP ports for Horde,Squirelmail,Roundcube

Some times while accessing the Webmail we may encounter errors like :

Horde Failed to connect to localhost:25

In that case we can change the SMTP port from 25 to 26.

In-order to change the SMTP port follow the below steps :

For Horde :

root@server[#] cd /usr/local/cpanel/base/horde/imp/config
root@server[#] vi conf.php

Search for the line

‘smtphost’ => ‘localhost’,
‘smtpport’ => 25,

and change it to

‘smtphost’ => ‘localhost’,
‘smtpport’ => 26,

For Squirelmail

root@server[#] cd /usr/local/cpanel/base/3rdparty/squirrelmail/config
root@server[#] vi config.php

Search for the lines

$smtpServerAddress = ‘localhost’;
$smtpPort = 25;

and change it to

$smtpServerAddress = ‘localhost’;
$smtpPort = 26;

For Roundcube

root@server[#] cd /usr/local/cpanel/base/3rdparty/roundcube/config
root@server[#] vi

Search for the line :

$rcmail_config[‘smtp_port’] = 25;

and change it to

$rcmail_config[‘smtp_port’] = 26;

That’s all you are done.

Roundcube Throwing SMTP error: Connection failed: Failed to connect socket

If you get the below error while sending emails from rouncube.

SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out in /usr/local/cpanel/base/3rdparty/roundcube/program/steps/mail/ on line 1418

It happens if you have CSF firewall installed and it is upgraded automatically or something like that. Just make following changes in to firewall configuration and it will fix the issue

root@server[#] vi /etc/csf/csf.conf
and search for
Replace it with

Save and Quit.

That’s all your are done.

Note : Restart the csf service after making theĀ  changes.