Tutorial Ubuntu 20.04 LTS : Cara Install dan Konfigurasi Roundcube Webmail
Roundcube merupakan salah satu webmail populer yang hingga saat ini masih banyak digunakan dikarenakan konfigurasinya yang mudah serta tampilan hingga fungsi-fungsi yang bisa dicustom secara manual. Pada kesempatan kali ini kita akan melakukan cara instalasi dan konfigurasi Roundcube Webmail pada Ubuntu Server 20.04 LTS.
Prerequisite
Baca Juga :
Install
Sebelum melakukan instalasi terlebih dahulu lakukan update dan upgrade sistem.
$ sudo apt update && sudo apt upgrade
Install MariaDB
Karena Roundcube memerlukan mysql database maka kita harus menginstalnya, disini kita menggunakan mariadb
database.
$ sudo apt install -y mariadb-server
Lakukan instalasi mariadb menggunakan perintah berikut. Jangan lupa untuk melakukan set root password.
$ sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): [enter]
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Install Roundcube
Kita dapat mulai instalasi roundcube dengan perintah berikut.
$ sudo apt install -y roundcube
Pilih Yes
.
Package configuration
┌──────────────────────┤ Configuring roundcube-core ├───────────────────────┐
│ │
│ The roundcube package must have a database installed and configured │
│ before it can be used. This can be optionally handled with │
│ dbconfig-common. │
│ │
│ If you are an advanced database administrator and know that you want to │
│ perform this configuration manually, or if your database has already │
│ been installed and configured, you should refuse this option. Details on │
│ what needs to be done should most likely be provided in │
│ /usr/share/doc/roundcube. │
│ │
│ Otherwise, you should probably choose this option. │
│ │
│ Configure database for roundcube with dbconfig-common? │
│ │
│ Yes No │
│ │
└───────────────────────────────────────────────────────────────────────────┘
Masukan password user root mysql (yang tadi dibuat saat instalasi).
Package configuration
┌─────────────────────┤ Configuring roundcube-core ├──────────────────────┐
│ Please provide a password for roundcube to register with the database │
│ server. If left blank, a random password will be generated. │
│ │
│ MySQL application password for roundcube: │
│ │
│ ******_________________________________________________________________ │
│ │
│ Ok Cancel │
│ │
└─────────────────────────────────────────────────────────────────────────┘
Ulangi masukan password.
Package configuration
┌────┤ Configuring roundcube-core ├─────┐
│ │
│ │
│ Password confirmation: │
│ │
│ ******_______________________________ │
│ │
│ Ok Cancel │
│ │
└───────────────────────────────────────┘
Config
Config Alias
Agar roundcube bisa diakses via alias (http://ip-address/roundcube) kita harus enable terlebih dahulu
$ sudo nano /etc/apache2/conf-available/roundcube.conf
Hapus tanda #
. Lalu save & exit.
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
Alias /roundcube /var/lib/roundcube
Jangan lupa untuk melakukan restart service apache2.
$ sudo systemctl restart apache2
Config Roundcube
Lakukan konfigurasi mail server pada file config.inc.php
.
$ sudo nano /var/lib/roundcube/config/config.inc.php
Isikan nama host dan smtp server email. Untuk smtp server secara default running pada port 25
. Isi juga autentikasi smtp server seperti smtp_user
dan smtp_pass
jika smtp server kalian sebelumnya menggunakan autentikasi dan jika tidak cukup dikosongi saja ''
.
// The IMAP host chosen to perform the log-in. // Leave blank to show a textbox at login, give a list of hosts // to display a pulldown menu or set one host as string. // Enter hostname with prefix ssl:// to use Implicit TLS, or use // prefix tls:// to use STARTTLS. // Supported replacement variables: // %n - hostname ($_SERVER['SERVER_NAME']) // %t - hostname without the first part // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %s - domain name after the '@' from e-mail address provided at login screen // For example %n = mail.domain.tld, %t = domain.tld $config['default_host'] = 'zonabiner.dev'; // SMTP server host (for sending mails). // Enter hostname with prefix ssl:// to use Implicit TLS, or use // prefix tls:// to use STARTTLS. // Supported replacement variables: // %h - user's IMAP hostname // %n - hostname ($_SERVER['SERVER_NAME']) // %t - hostname without the first part // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %z - IMAP domain (IMAP hostname without the first part) // For example %n = mail.domain.tld, %t = domain.tld $config['smtp_server'] = 'zonabiner.dev'; // SMTP port. Use 25 for cleartext, 465 for Implicit TLS, or 587 for STARTTLS (default) $config['smtp_port'] = 25; // SMTP username (if required) if you use %u as the username Roundcube // will use the current username for login $config['smtp_user'] = ''; // SMTP password (if required) if you use %p as the password Roundcube // will use the current user's password for login $config['smtp_pass'] = '';
Pengujian
Open Roundcube
Untuk pengujian buka web browser kemudian ketik url http://ip-address/roundcube
.
Login Test
Sekarang kita lakukan pengujian login akun email menggunakan roundcube. Cukup kita ketikan username akun kemudian di ikuti dengan password.
Send Email Test
Pada percobaan berikut kita akan lakukan skenario pengujian kirim dan terima email. Akun email alfa@zonabiner.dev
akan melakukan pengiriman email ke akun joko@zonabiner.dev
.
Akhirnya sampai disini kita sudah bisa melakukan instalasi Roundcube Webmail. Happy Config!! 😉