Setting Cloud Hosted SpamExperts di Server WHM/cPanel Print

  • 129

Untuk melakukan setting SpamExperts di Server WHM/cPanel, silahkan ikuti instruksi berikut:

  1. Login SSH ke server sebagai root
  2. Lakukan instalasi addon SpamExperts menggunakan command berikut:

    wget -N https://download.seinternal.com/integration/installers/cpanel/installer.sh && bash installer.sh

  3. 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


  4. 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'



  5. buat file /opt/setestptr dengan isi berikut

    #!/bin/bash
    host -t PTR $1 | cut -d ' ' -f5 | sed 's/\.$//g' | tr -d '\n'
  6. Jalankan command berikut

    chmod +x /opt/setest && chmod +x /opt/setestptr


  7. Kembali ke WHM, buka menu 'Exim Configuration Editor', klik 'Advanced Mode'

  8. 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
    ######################################################################################

  9. 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::587

    smarthost_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

  10. 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}}"

  11. 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

  12. Edit file /etc/trustedmailhosts

    Tambahkan baris berikut:
    delivery.antispamcloud.com

  13. 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)

  14. Buat file /etc/spamexperts_domains

    Isi file nya dengan daftar domain yang ingin pengiriman emailnya (outgoing) dilewatkan server SpamExperts


  15. 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

  16. Matikan spamfilter lain (seperti spamassasin) di server cPanel untuk domain terkait

  17. Masukkan list IP dalam delivery.antispamlogin.com ke Trusted SMTP host (menu EXIM Configuration Manager)

 


Was this answer helpful?

« Back