Roundcube

From Alpine Linux

Jump to: navigation, search

Roundcube is a free and open source webmail software for the masses, written in PHP.

Contents

Set up Roundcube from source on Alpine Linux

This document will be a quick c/p guide to setup Roundcube from Source on Alpine Linux and connecting to MS Exchange Server. We assume you have Alpine Linux installed and running. What we will install is the following:

Installing PHP and Lighttpd

Install the additional packages:

apk add lighttpd php-common php-iconv php-json php-gd php-curl php-xml php-pgsql php-imap

apk add php-pdo php-pdo_pgsql php-soap php-xmlrpc php-posix php-mcrypt php-gettext php-ldap php-ctype php-dom

Configure Lighttpd

vi /etc/lighttpd/lighttpd.conf

Uncomment line:

include "mod_fastcgi.conf"

Start lighttpd service and add to needed runlevel

/etc/init.d/lighttpd start && rc-update add lighttpd default

To add security, configure https access in Lighttpd.

Add additional packages

apk add php-openssl php-intl

vHost

vi /etc/lighttpd/lighttpd.conf

 "mod_simple_vhost"
 simple-vhost.server-root   = "/var/www/localhost/htdocs/"
 simple-vhost.default-host  = "/"
 simple-vhost.document-root = "www/"
 $SERVER["socket"] == "round.cube.mail.ipaddres:443" {
 ssl.engine    = "enable"
 ssl.pemfile   = "/etc/lighttpd/server-bundle.pem"
 }
  

/etc/init.d/lighttpd restart

vi /etc/php/php.ini

Download and Install Rouncube

mkdir -p /usr/share/webapps cd /usr/share/webapps

wget http://downloads.sourceforge.net/project/roundcubemail/roundcubemail/0.5.2/roundcubemail-0.5.2.tar.gz

tar zxvf roundcubemail-0.5.2.tar.gz

mv roundcubemail-0.5.2 roundcubemail chmod 775 -R roundcubemail

mv /var/www/localhost/htdocs/ /var/www/localhost/htdocs.old ln -s /usr/share/webapps/roundcube/ /var/www/localhost/htdocs/

mkdir -p /var/log/roundcube/ chown -R lighttpd:lighttpd /var/log/roundcube/ chmod 775 /var/log/roundcube/ -R

Postgres installation

apk add postgresql postgresql-client /etc/init.d/postgresql setup /etc/init.d/postgresql start rc-update add postgresql

su postgres createuser roundcube

Answers: N,N,Y

createdb -O roundcube -E UNICODE -T template0 roundcubemail

Note: Set the same timzone you use in the php.ini (e.g. 'America/Asuncion')

 psql roundcubemail
 ALTER USER roundcube WITH PASSWORD 'the_new_password';
 ALTER DATABASE roundcubemail SET timezone TO 'America/Asuncion';
 \c - roundcube
 \i /usr/share/webapps/roundcube/SQL/postgres.initial.sql
 roundcubemail=> \q
 exit

Roundcube Web Configuration

Start your browser and visit: https://round.cube.mail.ipaddres/installer/

Roundcube Webmail Installer have 3 steps:

Check if all is ok, click NEXT

Here you need to set:

a. General configuration
product_name
Your Country Branch Webmail Access
temp_dir
/tmp/
identities_level
one identity with possibility to edit all params
b. Logging & Debugging
log_driver
syslog
log_dir
/var/log/roundcube/
c. Database setup
db_dsnw
Database settings for read/write operations:
PgSQL Database type
localhost Database server
roundcubemail Database name
roundcube Database user name
********* Database password
d. IMAP Settings
default_host
The IMAP host(s) chosen to perform the log-in
your.exchange.ip.address
username_domain
your.domain
e. SMTP Settings
smtp_server
your.exchange.ip.address

Now need to download and copy both files (main.inc.php and db.inc.php) to /etc/roundcube/

Test the SMTP config sending a mail and the IMAP config using a username and password.

Final Steps

Personal tools
Namespaces
Variants
Actions
Welcome
Services
Wiki
Toolbox