Install Roundcube Debian 12: Perbedaan antara revisi

Dari Dokumentasi Robie
Loncat ke navigasi Loncat ke pencarian
Tidak ada ringkasan suntingan
 
(13 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
apt update && apt -y upgrade


= Tujuan Pembelajaran =
Setelah mempelajari modul ini, peserta didik diharapkan dapat:


# Memahami konsep dasar mail server
Mail Server: Install postfix
# Menginstal dan mengkonfigurasi mail server
# Mengintegrasikan Roundcube sebagai webmail
# Melakukan konfigurasi dasar keamanan


= Prasyarat =
<code>apt -y install postfix sasl2-bin</code>
root@mail-server:~# apt -y install postfix sasl2-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.7.11-0+deb12u1).
The following additional packages will be installed:
  db-util db5.3-util
The following NEW packages will be installed:
  db-util db5.3-util sasl2-bin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 179 kB of archives.
After this operation, 736 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 db5.3-util amd64 5.3.28+dfsg2-1 [64.0 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 db-util all 5.3.2 [2176 B]
Get:3 http://deb.debian.org/debian bookworm/main amd64 sasl2-bin amd64 2.1.28+dfsg-10 [112 kB]
Fetched 179 kB in 0s (800 kB/s)
Preconfiguring packages ...
Selecting previously unselected package db5.3-util.
(Reading database ... 19138 files and directories currently installed.)
Preparing to unpack .../db5.3-util_5.3.28+dfsg2-1_amd64.deb ...
Unpacking db5.3-util (5.3.28+dfsg2-1) ...
Selecting previously unselected package db-util.
Preparing to unpack .../archives/db-util_5.3.2_all.deb ...
Unpacking db-util (5.3.2) ...
Selecting previously unselected package sasl2-bin.
Preparing to unpack .../sasl2-bin_2.1.28+dfsg-10_amd64.deb ...
Unpacking sasl2-bin (2.1.28+dfsg-10) ...
Setting up db5.3-util (5.3.28+dfsg2-1) ...
Setting up db-util (5.3.2) ...
Setting up sasl2-bin (2.1.28+dfsg-10) ...
Processing triggers for man-db (2.11.2-2) ...
root@mail-server:~#
cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf


* Sistem Operasi: Debian 12 (Bookworm)
nano /etc/postfix/main.cf
* Hak akses: Root atau sudo
* Koneksi Internet
* Domain atau subdomain yang telah disiapkan
 
= Perangkat Lunak yang Dibutuhkan =
 
* Postfix (Mail Transfer Agent)
* Dovecot (IMAP/POP3 Server)
* Roundcube (Webmail Interface)
* Apache Web Server
* PHP
* MariaDB
 
= Langkah Instalasi =
 
== Langkah 1: Update Sistem ==
 
 
sudo apt update
sudo apt upgrade -y
 
== Langkah 2: Instalasi Paket Dasar ==
 
sudo apt install -y postfix dovecot-core dovecot-imapd dovecot-pop3d \
apache2 mariadb-server php php-cli php-fpm php-json php-common \
php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear \
php-bcmath libapache2-mod-php
 
== Langkah 3: Konfigurasi Postfix ==
 
=== 1. Buka konfigurasi postfix ===
 
sudo nano /etc/postfix/main.cf
 
=== 2. Tambahkan/edit konfigurasi berikut: ===
 
myhostname = mail.example.com
 
mydestination = $myhostname, localhost.$mydomain, localhost
 
inet_interfaces = all
 
inet_protocols = all
 
home_mailbox = Maildir/
 
=== 3. Restart layanan postfix ===
 
sudo systemctl restart postfix
 
== Langkah 4: Konfigurasi Dovecot ==
 
=== 1. Edit konfigurasi dovecot ===
 
sudo nano /etc/dovecot/dovecot.conf
 
=== 2. Tambahkan/edit konfigurasi: ===
 
protocols = imap pop3
 
mail_location = maildir:~/Maildir
 
=== 3. Restart layanan dovecot ===
 
sudo systemctl restart dovecot
 
== Langkah 5: Instalasi Roundcube ==
 
=== 1. Download Roundcube ===
 
cd /tmp
 
wget <nowiki>https://github.com/roundcube/roundcubemail/releases/download/1.6.2/roundcubemail-1.6.2-complete.tar.gz</nowiki>
 
tar -xvzf roundcubemail-1.6.2-complete.tar.gz
 
=== 2. Pindahkan ke direktori web ===
 
sudo mv roundcubemail-1.6.2 /var/www/roundcube
 
== Langkah 6: Konfigurasi Database ==
 
=== 1. Buat database untuk Roundcube ===
 
sudo mysql -e "CREATE DATABASE roundcube;"
 
sudo mysql -e "CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'password';"
 
sudo mysql -e "GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube'@'localhost';"
 
sudo mysql -e "FLUSH PRIVILEGES;"
 
== Langkah 7: Konfigurasi Web Server ==
 
=== 1. Buat konfigurasi Apache ===
 
sudo nano /etc/apache2/sites-available/roundcube.conf
 
=== 2. Tambahkan konfigurasi: ===
apache
 
<VirtualHost *:80>
 
    ServerName mail.example.com
 
    DocumentRoot /var/www/roundcube
 
    <Directory /var/www/roundcube>
 
        Options FollowSymLinks
 
        AllowOverride All
 
        Require all granted
 
    </Directory>
 
</VirtualHost>
 
=== 3. Aktifkan situs dan modul ===
 
sudo a2ensite roundcube
 
sudo a2enmod rewrite
 
sudo systemctl restart apache2
 
== Langkah 8: Finishing Setup ==
 
# Akses Roundcube melalui browser
# Ikuti wizard instalasi
# Gunakan kredensial database yang telah dibuat
 
= Keamanan Tambahan =
 
# Aktifkan SSL/TLS
# Konfigurasi firewall
# Gunakan autentikasi dua faktor
 
= Troubleshooting Umum =
 
* Periksa log sistem: `/var/log/mail.log`
* Pastikan port 25, 143, 993 terbuka
* Cek izin direktori dan file
 
= Evaluasi Praktikum =
 
# Berhasil menginstal mail server
# Dapat login ke Roundcube
# Mampu mengirim dan menerima email
 
= Referensi Lanjutan =
 
* Dokumentasi Postfix
* Dokumentasi Dovecot
* Dokumentasi Roundcube

Revisi terkini sejak 11 Desember 2024 04.31

apt update && apt -y upgrade


Mail Server: Install postfix

apt -y install postfix sasl2-bin

root@mail-server:~# apt -y install postfix sasl2-bin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
postfix is already the newest version (3.7.11-0+deb12u1).
The following additional packages will be installed:
  db-util db5.3-util
The following NEW packages will be installed:
  db-util db5.3-util sasl2-bin
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 179 kB of archives.
After this operation, 736 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 db5.3-util amd64 5.3.28+dfsg2-1 [64.0 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 db-util all 5.3.2 [2176 B]
Get:3 http://deb.debian.org/debian bookworm/main amd64 sasl2-bin amd64 2.1.28+dfsg-10 [112 kB]
Fetched 179 kB in 0s (800 kB/s)
Preconfiguring packages ...
Selecting previously unselected package db5.3-util.
(Reading database ... 19138 files and directories currently installed.)
Preparing to unpack .../db5.3-util_5.3.28+dfsg2-1_amd64.deb ...
Unpacking db5.3-util (5.3.28+dfsg2-1) ...
Selecting previously unselected package db-util.
Preparing to unpack .../archives/db-util_5.3.2_all.deb ...
Unpacking db-util (5.3.2) ...
Selecting previously unselected package sasl2-bin.
Preparing to unpack .../sasl2-bin_2.1.28+dfsg-10_amd64.deb ...
Unpacking sasl2-bin (2.1.28+dfsg-10) ...
Setting up db5.3-util (5.3.28+dfsg2-1) ...
Setting up db-util (5.3.2) ...
Setting up sasl2-bin (2.1.28+dfsg-10) ...
Processing triggers for man-db (2.11.2-2) ...
root@mail-server:~#

cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf

nano /etc/postfix/main.cf