Author Topic: Roundcube, no login possible in chroot areas?  (Read 5678 times)

Offline ghoster1970

  • Newbie
  • *
  • Posts: 2
Roundcube, no login possible in chroot areas?
« on: February 09, 2008, 08:40:38 AM »
Hello,

I have s special issue regarding RC installment. In case my mailserver is running outside chroot area, everything's ok. Peoples are able to login and are receiving/sending any mails. In case it runs in chroot areas it becomes very strange.
Webserver: Lighttpd 1.4.18

I edit first db.inc.php and do add following

Code: [Select]
$rcmail_config['db_dsnw'] = 'mysql://roundcube:$mypass@127.0.0.1/roundcubemail';

Back to browser, it shows me a login and password context. What says, roundcube is connected with mysql database, located outside that chroot.

Back to main.inc.php and edit following:

Code: [Select]
$rcmail_config['default_host'] = '127.0.0.1';
$rcmail_config['smtp_server'] = '127.0.0.1';
I also tried both with addition of mysql port 3306 [127.0.0.1:3306]

Back to login context in browser, enter *working* username@domain.com and its password. Result is: login failed.
In logfile is this given:
Code: [Select]
[09-Feb-2008 14:26:39 +0100] IMAP Error: Invalid password

OK, reason for that error message above looks like clear for the first moment.
Have installed squirrelmail for testing that issue, result: login successful.
Server (IMAP, SMTP): 127.0.0.1 - exactly the same server settings, same username and same password...

My question to you is, how to solve this issue for chroot areas? I really won't finish my installment without roundcube, because it is still one of the best webmail applications!

Every helping hand and comments are welcome.

Many thanks,

Greetz Christian

Offline ghoster1970

  • Newbie
  • *
  • Posts: 2
Re: Roundcube, no login possible in chroot areas?
« Reply #1 on: February 11, 2008, 12:46:17 PM »
hmmm, no one have an idea what went wrong? No one have ever tried to run roundcube in chroot envionment? hmmm....

Greetz Christian

Offline s3ntient

  • Newbie
  • *
  • Posts: 2
Re: Roundcube, no login possible in chroot areas?
« Reply #2 on: March 09, 2008, 03:35:52 PM »
I'm having similar issues :/
I'm using mod_security to chroot apache. In the chrooted env I can't login, if I start apache as normal without the chroot I can login no problem.

Offline me2008

  • Newbie
  • *
  • Posts: 1
Re: Roundcube, no login possible in chroot areas?
« Reply #3 on: March 11, 2008, 01:56:00 PM »
Hi there,

I have had the same problem and I figured out it has something todo with characterset conversion using the php function iconv().
Copying the /usr/lib/gconv/ directory (debian etch) into the chrooted environment solved the problem.

Carsten

Offline s3ntient

  • Newbie
  • *
  • Posts: 2
Re: Roundcube, no login possible in chroot areas?
« Reply #4 on: March 11, 2008, 02:12:23 PM »
Hi me2008,

Thanks for the tip, unfortunately it didn't solve my problem.

I am on my way to getting it working though, the error I was getting was due to the fact that there was no /etc/hosts file in my chroot env.
I can now semi-connect to my server, but I'm getting this error:
Code: [Select]
Warning: fsockopen() [function.fsockopen]: SSL: Success in /var/www/webmail/htdocs/program/lib/imap.inc on line 464

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /var/www/webmail/htdocs/program/lib/imap.inc on line 464

Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://localhost:993 (Unknown error) in /var/www/webmail/htdocs/program/lib/imap.inc on line 464
IMAP connect: NOT OK(Could not connect to ssl://localhost at port 993: )

I'm guessing my chrooted env is missing some more stuff, just need to figure out what.

Offline Pixel

  • Newbie
  • *
  • Posts: 5
Roundcube, no login possible in chroot areas?
« Reply #5 on: March 13, 2009, 12:12:45 PM »
Is there already a solution for the problem above?
I'm also running lighttpd in chroot with PHP running as cgi.

Is there a way I can debug this, so I can discover which files I'm missing?
Quote
[13-Mar-2009 00:15:42] PHP Warning:  fsockopen() [function.fsockopen]: SSL: Success in /var/www/***/public/webmail/program/lib/imap.inc on line 596
[13-Mar-2009 00:15:42] PHP Warning:  fsockopen() [function.fsockopen]: Failed to enable crypto in /var/www/***/public/webmail/program/lib/imap.inc on line 596
[13-Mar-2009 00:15:42] PHP Warning:  fsockopen() [function.fsockopen]: unable to connect to ssl://127.0.0.1:993 (Unknown error) in /var/www/***/public/webmail/program/lib/imap.inc on line 596
[13-Mar-2009 00:15:42 +0100] IMAP Error: Could not connect to ssl://127.0.0.1 at port 993:  (POST /webmail/?_task=&_action=login)
/var/www is actually /webroot/var/www