Skip navigation.

Syndicate

Syndicate content

User login

AJAX Web-based IMAP Mail: RoundCube

I’m trying out RoundCube, an early-stage web-based IMAP mail client with the AJAX interface I’ve come to expect.

I’m putting 0.1-20051021 on bonzo.

After unzipping the tarball, I have to create a new MySQL database for RoundCube, per the INSTALL file in the tarball:

$ mysqladmin -u root -p create roundcube
$ mysql -u root -p
mysql> grant all privileges on roundcube.* to 'roundcube'@'localhost' identified by '[secret]';
Query OK, 0 rows affected (0.13 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

Next I edited the DB config, in config/db.inc.php. The only line that needed changing was:

$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';

I changed it to:

$rcmail_config['db_dsnw'] = 'mysql://roundcube:[secret]@localhost/roundcube';

General settings are in config/main.inc.php. My changed lines are:

$rcmail_config['default_host'] = 'ssl://mail.celatrix.com:993';
$rcmail_config['smtp_server'] = 'mail.celatrix.com';
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = 'CRAM-MD5';

I also need to make sure the www user can write temp/ and logs/.

chgrp www temp logs
chmod 0775 logs temp

I went to http://bonzo.celatrix.com/~anelson/roundcube/index.php, and got an Internal Server Error. From /var/log/httpd-error.log:

/home/anelson/public_html/roundcube/.htaccess: php_flag not allowed here

Doh. An .htaccess issue. Apache by default is very restrictive as to what directives can appear in a .htaccess file; whatever php_flag is, it clearly isn’t on the list.

I’m trying to run RoundCube out of my ~/public_html folder, so the Apache settings for the UserDir applies. By default, my /usr/local/etc/apache2/httpd.conf has this to say:

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

From a post discussion a similar issue with Gallery, I determined that Options must be in the AllowOverride list as well, in addition a FileInfo which is already there. So the revised Directory entry for public_html is:

<Directory /home/*/public_html>
    AllowOverride Options FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

One apachectl restart later, and it was on to the next error.

Next, I got this:

Parse error: parse error, unexpected T_VARIABLE in /home/anelson/public_html/roundcube/config/main.inc.php on line 56

That would be me, forgetting a semicolon on the smtp_pass line in main.inc.php. I’ve updated the dump above with the correct trailing semicolon.

Now it’s:

DB Error in /home/anelson/public_html/roundcube/program/include/rcube_db.inc (129): DB Error: no such table
DB Error in /home/anelson/public_html/roundcube/program/include/rcube_db.inc (204): DB Error: no such table Query: SELECT vars, ip, UNIX_TIMESTAMP(changed) AS changed FROM session WHERE sess_id='ekt27u4asatlcar7lgjjulkcn4'

Fatal error: Call to a member function fetchRow() on a non-object in /home/anelson/public_html/roundcube/program/include/rcube_db.inc on line 196

Oh, I forgot to actually create the database:

 mysql -D roundcube -u roundcube -p < SQL/mysql.initial.sql

Aha, now I get a login prompt. Logging in with my ender email account credentials…waiting…60 seconds now…timed out

Hmm. My mail server, ender, seems to be hosed himself. Even the console is hung. No error messages are visible, but clearly something is hosed. I’ll reboot I guess…

Ok, it’s back up. No indication what happened; some minor FS corruption which seems repaired without incident. Trying again…ha! It worked. I have a nice view of my mailboxes.

It’s kind of slow. I assume this will improve as RoundCube builds up a cache of mail.

Hmm, it seems ok. I was hoping for a bit more Gmail-ish functionality (wtf for? It’s an alpha for God’s sake!); it’s fairly limited atm. I think SquirrelMail will be better for now, until RoundCube builds out more functionality.