Author Topic: roundcube cannot connect to imap  (Read 15837 times)

Offline jchutch2

  • Newbie
  • *
  • Posts: 3
roundcube cannot connect to imap
« on: February 12, 2013, 02:08:49 PM »
I guess I'll join the fray. It seems to be that there are a few of these issues. Long story short, I installed a new CENTOS 6 server. I can connect to imap locally as shown below. roundcube cannot. I am new to roundcube, so maybe I'm just missing something. Would love to hear any possible ideas.

The maillog obviously doesn't show any login attempt as roundcube isn't able to connect. I can connect using the exact same credentials and settings as roundcube is attempting to use.

Installed:
dovecot-2.0.9-2.el6_1.1.x86_64
sendmail-8.14.4-8.el6.x86_64
roundcubemail-0.8.4-1.el6.noarch

Code: [Select]
[12-Feb-2013 13:32:21 -0500]: IMAP Error: Login failed for jchutch2 from xxx.xxx.xxx.xxx. Could not connect to gossamer:143: Permission denied in /usr/share/roundcubemail/program/include/rcube_imap.php on line 191 (POST /roundcubemail/?_task=login&_action=login)

[root@gossamer roundcubemail]# telnet gossamer 143
Trying 127.0.0.1...
Connected to gossamer.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a login jchutch2 <password>
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS] Logged in

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: roundcube cannot connect to imap
« Reply #1 on: February 12, 2013, 06:35:04 PM »
I see your tiring to use your hostname as the IMAP server have you tried using localhost instead?

Offline jchutch2

  • Newbie
  • *
  • Posts: 3
Re: roundcube cannot connect to imap
« Reply #2 on: February 12, 2013, 07:01:47 PM »
I have tried localhost, 127.0.0.1, the FQDN, and the internal IP address.

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Re: roundcube cannot connect to imap
« Reply #3 on: February 12, 2013, 07:50:58 PM »
That's a login error, not a no connection error. Looks to me as if the IMAP connection is attempted, but the authentication has failed.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline jchutch2

  • Newbie
  • *
  • Posts: 3
Re: roundcube cannot connect to imap
« Reply #4 on: February 12, 2013, 07:57:19 PM »
That's why I included the snippets. I'm able to log in directly to IMAP with the same credentials. However, I also know it not to be the case as a debug of the IMAP process doesn't show an established connection. Hence the error that it's unable to connect to gossamer on port 143.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: roundcube cannot connect to imap
« Reply #5 on: February 13, 2013, 03:16:53 AM »
The "Permission denied" part suggests may be you have fsockopen disabled in your PHP settings.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline tembo263

  • Newbie
  • *
  • Posts: 2
Re: roundcube cannot connect to imap
« Reply #6 on: February 21, 2013, 12:39:35 PM »
If your server has SELinux enforcing try the following:

setsebool -P httpd_can_network_connect 1

to allow apache to use  fsockopen
« Last Edit: February 21, 2013, 12:41:07 PM by tembo263 »