Webmail adalah setiap klien email yang diimplementasikan sebagai aplikasi web yang berjalan di server web. Contoh perangkat lunak webmail adalah Roundcube dan SquirrelMail. Contoh penyedia email web adalah AOL Mail, Gmail, Outlook.com/Hotmail.com, dan Yahoo! Mail. Pada artikel kali ini kita kan instalasi dan konfigurasi Roundcube Webmail pada Debian 10. Berikut langkah konfigurasinya.
1. Pastikan mail server sudah berjalan dengan baik.
2. Install database MariaDB
root@www:~# apt -y install mariadb-server |
root@www:~# 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): 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 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 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 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 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 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!
3. Buat database untuk Roundcube
root@www:~# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 104 Server version: 10.3.15-MariaDB-1 Debian 10 Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. # create [roundcube] database (replace 'password' to your own password you'd like to set) MariaDB [(none)]> create database roundcube; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on roundcube.* to roundcube@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
4. Install dan konfigurasi roundcube
root@www:~# apt -y install roundcube roundcube-mysql # select [No] on this example (set manually later) +----------------------+ 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> | | | +---------------------------------------------------------------------------+root@www:~# cd /usr/share/dbconfig-common/data/roundcube/install root@www:/usr/share/dbconfig-common/data/roundcube/install# mysql -u roundcube -D roundcube -p < mysql Enter password: # MariaDB roundcube password root@www:/usr/share/dbconfig-common/data/roundcube/install# root@www:~# vi /etc/roundcube/debian-db.php # set database info $dbuser=' roundcube ';$dbpass=' password ';$basepath=''; $dbname=' roundcube ';$dbserver='localhost'; $dbport='3306'; $dbtype=' mysql ';root@www:~# vi /etc/roundcube/config.inc.php # line 35: specify IMAP server (STARTTLS setting) $config['default_host'] = 'tls://mail.srv.world'; # line 47: specify SMTP server (STARTTLS setting) $config['smtp_server'] = 'tls://mail.srv.world'; # line 51: specify SMTP port (STARTTLS setting) $config['smtp_port'] = 587; # line 55: change (use the same user for SMTP auth and IMAP auth) $config['smtp_user'] = '%u'; # line 59: change (use the same password for SMTP auth and IMAP auth) $config['smtp_pass'] = '%p'; # line 66: change to any title you like $config['product_name'] = 'Server World Webmail'; # add follows to the end # specify IMAP port (STARTTLS setting) $config['default_port'] = 143; # specify SMTP auth type $config['smtp_auth_type'] = 'LOGIN'; # specify SMTP HELO host $config['smtp_helo_host'] = 'mail.srv.world'; # specify domain name $config['mail_domain'] = 'srv.world'; # specify UserAgent $config['useragent'] = 'Server World Webmail'; # specify SMTP and IMAP connection option $config['imap_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'srv.world', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ), ); $config['smtp_conn_options'] = array( 'ssl' => array( 'verify_peer' => true, 'CN_match' => 'srv.world', 'allow_self_signed' => true, 'ciphers' => 'HIGH:!SSLv2:!SSLv3', ), ); root@www:~# vi /etc/apache2/conf-enabled/roundcube.conf # line 3: uncomment Alias /roundcube /var/lib/roundcube # line 11: change access permission if need Require ip 127.0.0.1 10.0.0.0/24 systemctl restart apache2 |
4. Buka alamat webmail atau [https: // (nama host server Anda atau alamat IP /) / roundcube /]
0 Comments