Author Topic: RoundCube Can be used as General webmail client??  (Read 11165 times)

Offline eyes_drinker

  • Newbie
  • *
  • Posts: 7
RoundCube Can be used as General webmail client??
« on: March 11, 2008, 01:48:48 AM »
Hello everyone,

i had configured roundcube on localhost (windows xp running wamp 5).
on localhost i was able to check any webmail (except yahoo, hotmail, gmail etc. etc.) ...
but when i uploaded it on the production server it turned into specific webmail client. :(
means that i can only checks the webmail of the site hosted on that server NOT any...

its giving error for other webmails 'Connection to IMAP Server Failed', :-\

When i check /logs/errors the following was there

PHP Warning: fsockopen() [function.fsockopen]: unable to connect to mail.mydomain.com:143 in /home/myuser/public_html/program/lib/imap.inc on line 464
[11-Mar-2008 10:44:53 +0500] IMAP Error: Could not connect to mail.mydomain.com at port 143: Connection timed out in on line 0


Please advise... i would like to be able to check any webmail .....hmmmmmm......

thanks in advance to you guyz


Offline btcentral

  • Jr. Member
  • **
  • Posts: 26
Re: RoundCube Can be used as General webmail client??
« Reply #1 on: March 11, 2008, 06:05:19 AM »
Quote from: eyes_drinker
When i check /logs/errors the following was there

PHP Warning: fsockopen() [function.fsockopen]: unable to connect to mail.mydomain.com:143 in /home/myuser/public_html/program/lib/imap.inc on line 464
[11-Mar-2008 10:44:53 +0500] IMAP Error: Could not connect to mail.mydomain.com at port 143: Connection timed out in on line 0


Hi,

To answer your topic title, yes.

As for your problem...

Firstly I assume that you have replaced mail.mydomain.com with your real domain, otherwise this is obviously the problem.
Apart from that, make sure that mail.mydomain.com is an IMAP server, rather than a pop3, SMTP etc. server.

Other possible causes/solutions:
- Port 143 is blocked by your webhost - ask them to allow access to it.
- The IMAP server happened to be down when you were testing the client.
- You need to increase the timeout for fsockopen() to allow it to connect to the server.

http://uk.php.net/fsockopen might be useful for you to take a look at.

Hope this helps.

Kind Regards,
BTCentral
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

Offline eyes_drinker

  • Newbie
  • *
  • Posts: 7
Re: RoundCube Can be used as General webmail client??
« Reply #2 on: March 11, 2008, 08:04:24 AM »
Thanks for your reply,

actualy mail.mydomain.com means that mail.anyrealdomain.com .... hmmmmmm...
and the IMAP server i am accessing is not down ...i am able to check mail from localhost


the default_socket_timeout = 60 in my localhost's php.ini configuration and it works fine... very fine and i can access any web mail....

but on my host .... >:( is it possible that my host blocked the usage of sockets ????? or of scpecific port ????

Thanks for your reply again ...

cooooool.....




Offline btcentral

  • Jr. Member
  • **
  • Posts: 26
Re: RoundCube Can be used as General webmail client??
« Reply #3 on: March 11, 2008, 09:13:28 AM »
Hi again,

It is possible that they blocked external access for specific ports/services. For example they may allow local files to access localhost:143 for example, but not yourdomain.com:143.

What happens if you change the following values in your main.inc.php to those shown below?

$rcmail_config['default_host'] = 'yourdomain.com';
$rcmail_config['default_port'] = 80;

Where yourdomain.com is your real domain name.

If this does not work i.e. you get an unable to connect to etc. error, it will show that fsocketopen() usage is not allowed, as that should open a socket to your website http server, which is obviously not going to be denied access to at your host's end.

When I did the above, test (mydomain.com:80) it simply never logged in (obviously, as it's not an IMAP server), and the only error shown should be the one below (if any!), if this is the case it's likely that the specific port (143) does not allow external access - in which case all you can do is email/submit a support ticked to your host asking them to allow access.

Code: [Select]
PHP Fatal error: Maximum execution time of 120 seconds exceeded in /htdocs/webmail/program/lib/imap.inc on line 483
Cheers,
BTCentral
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

Offline eyes_drinker

  • Newbie
  • *
  • Posts: 7
Re: RoundCube Can be used as General webmail client??
« Reply #4 on: March 11, 2008, 09:20:15 AM »
Yes Yes Yes :D You are Right .... Thanks for your replies

143 was blocked by my host..... i just got it worked

cool ...

Now i have second issue .... ??? that when i send email it sends out but also says that "there is an error in saving your message" (in sent folder on the relevant server) . hmmmm..... :-\ but it sends out .....but not confirm ...

what the possible error can be ??
i think its a permissions issue..... but on which ??


Thanks again.....


Offline btcentral

  • Jr. Member
  • **
  • Posts: 26
Re: RoundCube Can be used as General webmail client??
« Reply #5 on: March 11, 2008, 11:08:56 AM »
Quote from: eyes_drinker
Now i have second issue .... ??? that when i send email it sends out but also says that "there is an error in saving your message" (in sent folder on the relevant server) . hmmmm..... :-\ but it sends out .....but not confirm ...

what the possible error can be ??
i think its a permissions issue..... but on which ??

Glad you got that sorted. Anyhow, i'm not quite sure I understood correctly what you were asking, however try this, I *think* it solves your problem.

In /config/main.inc.php change:

Code: [Select]
$rcmail_config['create_default_folders'] = FALSE;
To:

Code: [Select]
$rcmail_config['create_default_folders'] = TRUE;
Cheers,
BTCentral
http://www.btcentral.org.uk - Cheap, Top Quality Web-design.

Offline eyes_drinker

  • Newbie
  • *
  • Posts: 7
Re: RoundCube Can be used as General webmail client??
« Reply #6 on: March 11, 2008, 11:26:09 AM »
OK, Thank you, i will check that parameter...

But i can send emails without such error... and sent emails saved in sent folder without error ... but on some specific mail servers i got the error ...

is it security point of mail server ??


Offline CyberWarlock

  • Newbie
  • *
  • Posts: 1
Re: RoundCube Can be used as General webmail client??
« Reply #7 on: April 18, 2008, 02:34:18 PM »
I am having the same issue with a new install of Roundcube. I attempt to log in and the webpage say "Connection to IMAP server failed"

My log file shows:
[18-Apr-2008 18:21:24] PHP Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:143 (Permission denied) in /var/www/html/webmail/program/lib/imap.inc on line 468
[18-Apr-2008 18:21:24 +0000] IMAP Error: Could not connect to 127.0.0.1 at port 143: Permission denied in on line 0


I have tried the FQN, using localhost and box the local and public IP addresses in the config to no avail.

I can telnet from the box to 127.0.0.1:143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK Server ready.


No issue with it being blocked, in fact I haven't even enabled the firewall on this system yet.

I also attempted to modify the fsockopen timout in program/lib/imap.inc ... nada.

I attempted to test this connection by using a test page:

Code: [Select]
<?php
$host 
'localhost';
$port 143;
$timeout 30;

$IMAP fsockopen($host$port$errno$errstr$timeout);


if(!
$IMAP){
  print(&
quot;ERROR Number: &quot;.$errno'<br />Error String: '$errstr);
}else{
  echo 
'Everything is fine with PHPs fsockopen() function.';
}

fclose($IMAP);

?>

The results of which were for the most part, the same as those generated by RoundCube:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (Permission denied) in /var/www/html/test.php on line 6
ERROR Number: 13
Error String: Permission denied


This leads me to believe that the issue is PHP based, but I am not sure what the problem could be.

I checked my php.ini to make sure that allow_url_fopen was set to On and have tried to modify the user_agent with no luck.

The system in question is a RedHat Enterprise Linux 5 x86_64 machine using:
Apache/HTTPD 2.2.3-11
PHP 5.1.6-15
Dovecot 1.0-1.2

All patches and packages are up to date.

So, I am at a bit of a loss. I want to get this up and running, because it is a much better, IMO, option than squirelmail or the like, but if I can't get past this I may have to go with something else.

Any help would be greatly appreciated.
Thanks.

cW