Untuk melakukan setting SpamExperts di Server WHM/cPanel, silahkan ikuti instruksi berikut:
- Login SSH ke server sebagai root
- Lakukan instalasi addon SpamExperts menggunakan command berikut:
wget -N https://download.seinternal.com/integration/installers/cpanel/installer.sh && bash installer.sh - Setelah selesai instalasi, dilanjutkan proses konfigurasi melalui menu yang 'Professional Spam Filter' di WHM
AntiSpam API URL
https://spamlogin.com
API hostname
spamlogin.com
API username/password
(sesuai yang diinformasikan oleh pihak BUANA dotnet)
Primary MX
mx.spamexperts.com
Secondary MX
fallbackmx.spamexperts.eu
Tertiary MX
lastmx.spamexperts.net
Enable/tick untuk opsi berikut:
+ Enable SSL
+ Redirect back to cPanel
+ Force changing route & MX records, even if the domain exists
+ Set SPF records for domains
Disable/untick opsi berikut:
- Automatically add domains to the SpamFilter - Lanjut di prompt SSH
buat file /opt/setest dengan isi berikut
#!/bin/bash
host -t MX $1 | sort -n -k1 | cut -d ' ' -f 7 | sed -e 's/\.$//' | xargs | sed -e 's/ /:/g' | tr -d '\n' - buat file /opt/setestptr dengan isi berikut
#!/bin/bash
host -t PTR $1 | cut -d ' ' -f5 | sed 's/\.$//g' | tr -d '\n' - Jalankan command berikut
chmod +x /opt/setest && chmod +x /opt/setestptr - Kembali ke WHM, buka menu 'Exim Configuration Editor', klik 'Advanced Mode'
- Cari bagian 'custom_begin_recp_verify'
Masukkan isi berikut:
######################################################################################
## Start SpamExperts verification
defer
!condition = ${if match_domain{${run {/opt/setestptr $sender_host_address}}}{*.antispamcloud.com}}
set acl_m_mx_records = ${run {/opt/setest $domain}}
condition = ${if eq{$acl_m_mx_records}{mx.spamexperts.com:fallbackmx.spamexperts.eu:lastmx.spamexperts.net}}
message = Please deliver mail to the address specified in the MX records for this domain.
## End SpamExperts verification
###################################################################################### - Cari bagian 'POSTMAILCOUNT'
Masukkan isi berikut:
smarthost_dkim:
driver = manualroute
domains = !+local_domains
condition = ${if match_domain{$sender_address_domain}{lsearch;/etc/spamexperts_domains}}
require_files = "+/var/cpanel/domain_keys/private/${sender_address_domain}"
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_dkim
route_list = $domain smtp.antispamcloud.com::587smarthost_regular:
driver = manualroute
domains = !+local_domains
condition = ${if match_domain{$sender_address_domain}{lsearch;/etc/spamexperts_domains}}
# Exclude null sender messages from relaying via the smarthost
condition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}
transport = remote_smtp_smart_regular
route_list = $domain smtp.antispamcloud.com::587 - Cari bagian "TRANSPORTSTART"
Masukkan isi berikut:
remote_smtp_smart_dkim:
driver = smtp
hosts_require_tls = *
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
dkim_domain = $sender_address_domain
dkim_selector = default
dkim_private_key = "/var/cpanel/domain_keys/private/${dkim_domain}"
dkim_canon = relaxed
headers_add = "${perl{check_mail_permissions_headers}}"remote_smtp_smart_regular:
driver = smtp
hosts_require_tls = *
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
headers_add = "${perl{check_mail_permissions_headers}}" - Di menu WHM/cPanel
Pastikan domain untuk menerima email melalui SpamExperts disetting sebagai berikut:
a. Email Routing = Local Mail Exchanger
b. Catch-all di non-aktifkan - Edit file /etc/trustedmailhosts
Tambahkan baris berikut:
delivery.antispamcloud.com - Bila menggunakan firewall/CSF
a. edit file /etc/csf/csf.dyndns
Tambahkan baris berikut:
delivery.antispamcloud.com
b. edit file /etc/csf/csf.conf
set DYNDNS = "300"
(fungsinya untuk cek list IP spamexperts tiap 300 detik) - Buat file /etc/spamexperts_domains
Isi file nya dengan daftar domain yang ingin pengiriman emailnya (outgoing) dilewatkan server SpamExperts - Setting SPF untuk outgoing email
Tambahkan:
+include:spf.antispamcloud.com
Contoh SPF record lengkap:
v=spf1 +a +mx +ip4:1.2.3.4 +include:spf.antispamcloud.com -all
1.2.3.4 adalah contoh email server asli - Matikan spamfilter lain (seperti spamassasin) di server cPanel untuk domain terkait
- Masukkan list IP dalam delivery.antispamlogin.com ke Trusted SMTP host (menu EXIM Configuration Manager)