User Tools

Site Tools


roundcube

Roundcube

So a few people said to me how squirrelmail was slow and another few people who had 1000's of emails in their inbox and squirrelmail wouldn't cut it.

I did think of using ilohamail as it was on apt-get, but I heard and used roundcube before, so I said I'd go with that, even though it wasn't on apt-get for lenny.

Setup Roundcube on Debian Bullseye with SQLite

Install

apt-get install roundcube-core roundcube-sqlite3

Configure database for roundcube with dbconfig-common? 
YES

When prompted choose
sqlite

That should be it installed.

Configure Apache

By default roundcube gets enabled in apache and its config is placed in: /etc/apache2/conf-enabled/roundcube.conf

vi /etc/apache2/conf-enabled/roundcube.conf
#uncomment
#Alias /roundcube /var/lib/roundcube/public_html

/etc/init.d/apache2 reload

In your browser navigate to: http://server/roundcube and it should show.

Config Roundcube

Need to config for imaps and to ignore self-signed cert.

vi /etc/roundcube/config.inc.php

$config['default_host'] = 'ssl://server.com';
$config['default_port'] = 993;

$config['imap_conn_options'] = array(
  'ssl'         => array(
     'verify_peer'  => false,
     'verify_depth' => 3,
     'cafile'       => '/etc/ssl/certs/ca-certificates.crt',
   ),
 );

Now you should be able to login.

Sending Emails with Roundcube Config

I was getting error: SMTP Error (250): Authentication failed

Config used:

vi /etc/roundcube/config.inc.php
#add/set/amend to
$config['smtp_server'] = 'tls://server.domain.com';
$config['smtp_port'] = 25;
$config['smtp_conn_options'] = array(
   'ssl'         => array(
     'verify_peer'  => false,
     'verify_peer_name' => false,
     'verify_depth' => 3,
     'cafile'       => '/etc/ssl/certs/ca-certificates.crt',
   ),
 );
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = PLAIN;

I tried to get roundcube to send without auth, but it wouldn't work. The above works. This works with postfix setup here

Setup Roundcube on Debian Lenny with SQLite

As I only had a few users using webmail, sqlite would suffice. I chose to install via svn, as hopefully upgrading it will be nice and easy. I'll also have to keep an eye on the news and announcements: http://sourceforge.net/export/rss2_projnews.php?group_id=139281 and http://roundcube.net/news

 cd /var/www/
 mkdir roundcube
 cd roundcube
 svn co https://svn.roundcube.net/tags/roundcubemail/v0.3.1 .
 #get latest version number from: https://svn.roundcube.net/tags/roundcubemail/
 #choose p to accept cert.
 
 chgrp -R www-data temp
 chgrp -R www-data logs
 chmod -R 775 temp
 chmod -R 775 logs
 #not sure how this will work when going svn sw to update. Might be easier to go chmod 777. Will see.
 
 mkdir db
 sqlite -init SQL/sqlite.initial.sql db/sqlite.db
 #type .exit to exit sqlite.
 chgrp -R www-data db
 chmod -R 775 db
 
 #Website http://url/roundcube/installer
 #Next 3 lines may not be necessary:
 #apt-get install sqlite2
 #apt-get install php5-sqlite
 #/etc/init.d/apache2 reload
 
 #Step 2 of Installer:
 #Database setup
 SQLite - Database type
 Database Server - blank
 Database Name - /var/www/roundcube/db/sqlite.db
 Database Username - blank
 Database Password - blank
 
 #IMAP Settings
 default_host: ssl://mail.burkesys.com
 default_port: 993
 
 #SMTP Settings
 smtp_server: mail.burkesys.com
 
 #Display Settings
 pagesize: 30
 preview_pane: tick
 draft_autosave: 3 min 
 
 #Make the two files as asked.
 #When at end of installer:
 #chmod 000 installer (folder)
 
 #Login.
 #Couple of tweaks.
 Login: Settings - Identities

Notes

I was happy I could use ssl on 993 as I have imap 143 blocked at the firewall. I think roundcube bottom posts (as opposed to top post) when replying to emails. I think this will be fixed down the line. It wasn't much of an issue.

Issues

chmod 777 or setting the permissions on sqlite.db was unsufficient on its own. The folder in which sqlite.db is located must be writable by the server (to create temp lock files). As a result I chose to create a db folder and to place sqlite.db in that! Otherwise you might get this error:

 [[08-Jan-2010|01:19:38 +0000]]: DB Error: MDB2 Error: unknown error Query: _doQuery: [[Error|message: Could not execute statement]] [Last executed query: INSERT INTO users (created, last_login, username, mail_host, alias, language) VALUES (now(), now(), 'sburke', 'localhost', //, 'en_US')] [[Native|code: 14]] [Native message: unable to open database file]  in /home/sburke/public_html/rc/roundcubemail-0.3.1/program/include/rcube_mdb2.php on line 627 (POST /stephen/rc/roundcubemail-0.3.1/?_task=&_action=login)
 [[08-Jan-2010|01:19:38]] MDB2 Error: unknown error (-1): lastInsertID: [[Error|message: Could not get last insert ID]]
 [[Last|executed query: INSERT INTO users
        (created, last_login, username, mail_host, alias, language)
       VALUES (now(), now(), 'sburke', 'localhost', //, 'en_US')]]
 [[Native|code: 14]]
 [[Native|message: unable to open database file]]

The actual config for sqlite is:

 $rcmail_config[['db_dsnw']] = 'sqlite:/<nowiki>//</nowiki>/var/www/roundcube/db/sqlite.db?mode=0646';
 #thats 4 forward slashes!!

Dont use sqlite3 to create the sqlite.db. It wont work. Looks good apart from that.

References:

roundcube.txt · Last modified: 2022/07/27 20:56 by admin