Author Topic: Connection to IMAP server failed  (Read 4457 times)

Offline BenB

  • Newbie
  • *
  • Posts: 2
Connection to IMAP server failed
« on: October 18, 2017, 10:09:02 AM »
When trying to send emails from my Roundcube Webmail server I'm getting the following error:

Connection to IMAP server failed. Server Error: Could not connect to localhost:143: php_network_getaddresses: getaddrinfo failed: System error

I can telnet to localhost 143 and receive the following:

root@webmail:/home/ubuntu# telnet localhost 143 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.

My /etc/hosts file seems to be setup correctly.

127.0.0.1 localhost localhost.localdomain 127.0.1.1 webmail.mydomain.co.uk webmail

The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts

Running out of ideas as to what it could be, any help is appreciated

Thanks

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,878
    • SKaero - Custom Roundcube development
Re: Connection to IMAP server failed
« Reply #1 on: October 18, 2017, 12:30:19 PM »
Something regarding your name server setup on the server is incorrect. Try using 127.0.0.1:143 and see if that works.

Offline BenB

  • Newbie
  • *
  • Posts: 2
Re: Connection to IMAP server failed
« Reply #2 on: October 21, 2017, 04:56:45 PM »
That solved it, thanks for the help!