Cannot send messages thru Roundcube mail - PHP error

Discussion in 'Installation/Configuration' started by radim_h, Sep 4, 2009.

  1. radim_h

    radim_h Member HowtoForge Supporter

    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
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Make sure that you have defined localhost in /etc/hosts
    2) Check that postfix listens on localhost.
     
  3. radim_h

    radim_h Member HowtoForge Supporter

    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
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  5. radim_h

    radim_h Member HowtoForge Supporter

    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?
     

Share This Page