cara install mail server di rhel
1. PAKET INSTALASI
dnf install postfix dovecot httpd php php-mysqlnd php-intl php-mbstring php-json php-xml mariadb-server wget -y
2. AKTIFKAN LAYANAN
systemctl enable --now postfix
systemctl enable --now dovecot
systemctl enable --now httpd
systemctl enable --now mariadb
3. DATABASE ROUNDCUBE
mysql -u root -p
CREATE DATABASE roundcube;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'jaringan';
GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube'@'localhost';
FLUSH PRIVILEGES;
EXIT;
4. UNDUH ROUNDCUBE
cd /var/www
wget https://github.com/roundcube/roundcubemail/releases/download/1.6.6/roundcubemail-1.6.6-complete.tar.gz
tar -xvzf roundcubemail-1.6.6-complete.tar.gz
mv roundcubemail-1.6.6 roundcube
chown -R apache:apache /var/www/roundcube
5. IMPOR BASIS DATA
mysql -u roundcube -p roundcube < /var/www/roundcube/SQL/mysql.initial.sql
6. ATUR NAMA HOST
hostnamectl set-hostname mail.17-tkja.lab
7. EDIT HOST
nano /etc/hosts
Isi:
127.0.0.1 localhost
192.168.1.13 mail.17-tkja.lab
8. KONFIGURASI POSTFIX
nano /etc/postfix/main.cf
Isi:
myhostname = mail.17-tkja.lab
mydomain = 17-tkja.lab
myorigin = 17-tkja.lab
inet_interfaces = all
mynetworks = 127.0.0.0/8
mydestination = mail.17-tkja.lab, localhost.17-tkja.lab, localhost, 17-tkja.lab
home_mailbox = Maildir/
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
smtpd_sender_restrictions = permit_mynetworks
9. KONFIGURASI DOVECOT
Maildir
nano /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
Otorisasi
nano /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = no
auth_mechanisms = plain login
10. BUAT PENGGUNA
useradd rafi
passwd rafi
useradd siswa1
passwd siswa1
useradd siswa2
passwd siswa2
11. KONFIGURASI ROUNDCUBE
nano /var/www/roundcube/config/config.inc.php
Isi:
$config['db_dsnw'] = 'mysql://roundcube:jaringan@localhost/roundcube';
$config['default_host'] = '127.0.0.1';
$config['smtp_host'] = '127.0.0.1:25';
$config['smtp_user'] = '';
$config['smtp_pass'] = '';
$config['username_domain'] = '';
$config['mail_domain'] = '17-tkja.lab';
$config['identity_default_host'] = '17-tkja.lab';
$config['identities_level'] = 0;
12. MULAI ULANG
systemctl restart postfix
systemctl restart dovecot
systemctl restart httpd
13. AKSES
http://mail.17-tkja.lab
14. PERBAIKI IDENTITAS (WAJIB)
Di Roundcube:
Settings → Identities
Ubah:
user@127.0.0.1 ❌
jadi:
user@17-tkja.lab ✔
.png)
.png)
Komentar
Posting Komentar