RoundCube: Could not save new password. Can’t create socket connection to tcp://localhost:2222

If you’re trying to change your E-Mail account’s password using the RoundCube password changing plugin, but get this error:

Could not save new password. Can’t create socket connection to tcp://localhost:2222

then it’s likely that DA isn’t using the default port or ssl settings, and simply needs to be set correctly.

The plugin’s config file is at:

/var/www/html/roundcube/plugins/password/config.inc.php

Update these 2 values as needed to match your system:

// DirectAdmin Driver options
// ————————–
// The host which changes the password
// Use ‘ssl://host’ instead of ‘tcp://host’ when running DirectAdmin over SSL.
// The host can contain the following macros that will be expanded as follows:
//     %h is replaced with the imap host (from the session info)
//     %d is replaced with the domain part of the username (if the username is an email)
$rcmail_config[‘password_directadmin_host’] = ‘tcp://localhost’;

// TCP port used for DirectAdmin connections
$rcmail_config[‘password_directadmin_port’] = 2222;

where, if you’re using a different port, change the 2222 value.. and if you’re running DA with https/ssl, then change tcp:// to be ssl://.

http://help.directadmin.com/item.php?id=475