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.
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
Session timeout can be configured in
// Session lifetime in minutes $config['session_lifetime'] = 360;
Setting attachment sizes in
upload_max_filesize = 20M post_max_size = 30M