Computer Tips - Roundcube/Squirrel Mail say: Connection to storage server failed.

Date: 2016nov25 Product: Roundcube, Squirrel Mail, webmail OS: Linux Q. Roundcube/Squirrel Mail say: Connection to storage server failed. Server Error: Could not connect to localhost4:143: php_network_getaddresses: getaddrinfo failed: System error How can I fix this? A. It appears they are having trouble connecting to IPv6 localhost. My /etc/hosts file has:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
So in /etc/roundcubemail/config.inc.php I changed
$config['default_host'] = 'localhost';
to
$config['default_host'] = 'localhost4';
To make it connect to localhost4 with IPv4 and it worked And to correct Squirrel Mail I added the following to /etc/squirrelmail/config_local.php
<? ... $imapServerAddress = 'localhost4'; $smtpServerAddress = 'localhost4'; ?>