Install dan Proteksi CBPolicyD di MTA Server Zimbra
Install dan Proteksi CBPolicyD di MTA Server Zimbra tidak jauh berbeda pada single server. Hanya pada MTA server memerlukan instalasi web server dan php untuk bisa menampilkan webui CBPolicyD. Bila MTA Server ada 2, keduanya MTA Server zimbra itu di install CBPolicyD. CBPolicyD merupakan salah satu fitur untuk pencegahan spam pada zimbra. Namun secara default, CBPolicyD tidak otomatis di install ketika instalasi zimbra. Untuk itu harus manual untuk mengaktifkannya. CBPolicyD ini salah satu fitur untuk menjaga reputasi Ip Mail server selalu baik. CBPolicyd ini berbasis web based untuk konfigurasinya, secara default tidak ada tampilan login dan password. Sehingga harus dibuatkan secara manual.
Install dan Proteksi CBPolicyD di MTA
Install CBPolicyD di MTA
1. Install paket yang dibutuhkan
1 2 | yum install -y epel-release yum-utils httpd yum install -y http: //rpms.remirepo.net/enterprise/remi-release-7.rpm |
2. Enable PHP 5.6 Repo
1 | yum-config-manager --enable remi-php56 |
3. Install PHP 5.6
1 | yum install -y php php-sqlite |
4. Buat symlink webui
1 | cd / var /www/html/ && ln -s /opt/zimbra/common/share/webui/ |
5. Edit config.php berikan tanda # pada $DB_DSN
1 | nano /opt/zimbra/common/share/webui/includes/config.php |
Tambahkan text berikut diatas $DB_USER
1 | $DB_DSN = "sqlite:/opt/zimbra/data/cbpolicyd/db/cbpolicyd.sqlitedb" ; |
6. Aktifkan PolicyD pada User Zimbra
1 2 | su - zimbra zmprov ms `zmhostname` +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd |
7. Beri Akses Port 7780 di SELinux (bila SELinux enforcing, Bila disable abaikan baris ini)
1 2 | semanage port -a -t http_port_t -p tcp 7780 semanage port -m -t http_port_t -p tcp 7780 |
8. Open Port 7780 di firewalld
1 2 | firewall-cmd --permanent --zone= public --add-port=7780/tcp firewall-cmd --reload |
9. Ubah Port httpd 80 menjadi 7780
1 | nano /etc/httpd/conf/httpd.conf |
Contoh sebagai berikut
01 02 03 04 05 06 07 08 09 10 11 | # # Listen: Allows you to bind Apache to specific IP addresses and / or # ports, instead of the default . See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 #Listen 80 Listen 7780 |
10. Restart httpd
1 | systemctl restart httpd |
11 Beri permission database file CBPolicyd
1 | chmod 777 -R /opt/zimbra/data/cbpolicyd/db |
Proteksi CBPolicyD di MTA
1. Masuk ke folder webui
1 | cd / var /www/html/webui/ |
2. Edit .htaccess
1 | vi .htaccess |
Masukan baris dibawah
1 2 3 4 5 6 7 8 | AuthUserFile / var /www/html/webui/.htpasswd AuthGroupFile /dev/null AuthName "User and Password" AuthType Basic <LIMIT GET> require valid-user </LIMIT> |
3. Buat file .htpasswd
1 | touch .htpasswd |
Beri user dan password CBPolicyD
1 | htpasswd -cb .htpasswd admin IniPassword |
4. Ubah httpd
1 | nano /etc/httpd/conf/httpd.conf |
Tambahkan baris berikut di posisi baris terakhir untuk mengaktifkan pemakaian user dan password pada CBPolicyD
1 2 3 4 5 6 7 | Alias /webui / var /www/html/webui/ <Directory / var /www/html/webui/> # Comment out the following 3 lines to make web ui accessible from anywhere AllowOverride AuthConfig Order Deny,Allow Allow from all </Directory> |
5. Restart httpd
1 | systemctl restart httpd |
Akses CBPolicyd pada url http://ip_server:7780/webui
Selamat Mencoba…