PDA

View Full Version : Cannot send messages thru Roundcube mail - PHP error


radim_h
4th September 2009, 12:38
Can someone help me? i have instaleld Roundcubemail under regular site created in ISPC3

But cannot send emails , getting PHP error

Failed to connect socket: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to locahost:25 (php_network_getaddresses: getaddrinfo failed: Name or service not known) (): , referer: http://mail.mydomains.tld/?_task=mail&_id=11497619064aa0da3145f92&_action=compose

I tried php as CGI and Also Mod-PHP

Sending emails via Thunderbird works OK

till
4th September 2009, 12:49
1) Make sure that you have defined localhost in /etc/hosts
2) Check that postfix listens on localhost.

radim_h
4th September 2009, 12:51
Solved!

$rcmail_config['smtp_server'] = 'localhost';

changed to

$rcmail_config['smtp_server'] = '127.0.0.1';


but have no idea why that error happened

localhost is defined in /etc/hosts

127.0.0.1 localhost.localdomain localhost

till
4th September 2009, 12:58
You can try to change:

127.0.0.1 localhost.localdomain localhost

to

127.0.0.1 localhost localhost.localdomain

But not sure if that matters.

radim_h
4th September 2009, 13:03
Exactly

i just switched to

127.0.0.1 localhost localhost.localdomain

and it works ok!


what is that localhost.localdomain for, anyway as you suggest to add localhost.localdomain in Perfect setup tutorial?