Webmail: roundcube + sqlite3 + lighttpd


A small footprint solution for webmail is using roundcube in conjunction with sqlite3 and lighttpd. The order of installing PHP packaches is important as otherwise we end up with Apache dependencies.

apt-get install lighttpd php-cgi php

Debian 9: Because of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898040 installing roundcube needs some help to work correctly. Install roundcube while also getting low priority questions. Choose default answers where applicable but don’t select any https serverto be configured.

DEBIAN_PRIORITY=low apt-get install dbconfig-sqlite3 roundcube-core roundcube-sqlite3

Manually enable roundcube in lighttpd with

ln -s /etc/roundcube/lighttpd.conf /etc/lighttpd/conf-available/50-roundcube.conf
lighty-enable-mod roundcube fastcgi fastcgi-php

Debian 10: The bugfix was included for this release so we can install easily via aptitude install dbconfig-sqlite3 roundcube-sqlite3 roundcube.


Session timeout can be configured in /etc/roundcube/defaults.inc.php via

// Session lifetime in minutes
$config['session_lifetime'] = 360;

Default host can be configured in /etc/roundcube/config.inc.php:

$config['default_host'] = array("localhost");

Debian 10: Set smtp_user and smtp_pass to empty strings, this was the default setting previously but OpenSMPTD does not authenticate on the loopback device!

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

Setting attachment sizes in /etc/php/7.*/cgi/php.ini

upload_max_filesize = 20M
post_max_size = 30M

Roundcube user settings are stored in /var/lib/dbconfig-common/sqlite3/roundcube (see /etc/dbconfig-common/roundcube.conf)