logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
logotype
  • Home
  • News
  • Product dan Services
    • Zimbra Mail Server
      • Excellent Managed Services Email
      • Lisensi Zimbra NE
      • Support dan Maintenance
      • MX Backup & ASAV
      • SMTP Relay
    • Proxmox
      • Proxmox Virtual Environment
      • Proxmox Mail Gateway
      • Proxmox Backup Server
    • XCP-ng
    • Red Hat Enterprise Linux
    • Ubuntu Pro
    • Nakivo Backup & Recovery
    • Vinchin Backup & Recovery
    • Lisensi
      • Proxmox Mail Gateway
      • Lisensi Zimbra Network Edition
      • Lisensi Nakivo Backup & Recovery
      • Subscription Zoom
    • Buku Training Mandiri
      • Buku Training Mandiri
      • Ebook Training Mandiri
    • Cloud & Hosting
      • Excellent Managed Services Email Server
      • MX Backup/Anti Spam & Anti Virus
      • SMTP Relay & Mail Gateway
      • Excellent Mail Hosing
    • SSL Sertifikat
  • Training
  • Insight
  • About Us
  • Contacts
Blog Post
phising.png
BlogZimbra

Script untuk Menghapus Antrian Spam pada Zimbra dengan Konfirmasi

October 16, 2018by Masim Vavai Sugianto

Pada script yang saya publikasikan sebelumnya, kita bisa menjalankan script berikut parameter alamat email spammer yang hendak dihapus dengan perintah :

pfdel email-spammer

Masalahnya, kadang ada banyak email spammer dengan alamat sender berbeda-beda (sender re-write) yang perlu kita hapus dan juga ada email normal di antrian sehingga kita perlu menghapus antrian spam namun melewati email normal yang harusnya tetap aman diteruskan pengirimannya.

Script berikut dikombinasi dengan script sebelumnya akan menggunakan mekanisme konfirmasi sebelum penghapusan spam, sekaligus menampilkan nama sender dan tujuan si spam tersebut. Dengan cara ini, kita bisa menghapus spam setelah mengecek apakah benar memang tujuannya spam.

Berikut ini adalah scriptnya :

#!/bin/sh

#Hapus Layar
clear

/opt/zimbra/postfix/sbin/postqueue -p | grep -A 1 "$1" | grep @ | sort | uniq | cut -d ":" -f3 | cut -d " " -f3 > /tmp/over-quota.txt
#perl -lap -e 's/\s+|^\n//sg' > /tmp/over-quota.txt

USERS=`cat /tmp/over-quota.txt`

echo "Looping for all users"
for ACCOUNT in $USERS; do
ACC1=`echo $ACCOUNT | awk -F@ '{print $1}'`;
ACC2=`echo $ACCOUNT | cut -d '.' -f1`
#echo $ACC1
#echo $ACC2
#Hapus antrian
/opt/zimbra/postfix/sbin/postqueue -p | grep $ACCOUNT -A 3
echo -n "Antrian account : $ACCOUNT apakah hendak dihapus [Y/T]? "
read TANYA
if [ $TANYA == Y ] || [ $TANYA == y ]; then
pfdel $ACCOUNT
fi
echo ""
echo "Hapus antrian $1 untuk account $ACCOUNT telah selesai, Tekan ENTER untuk proses data berikutnya..."
echo ""
# read presskey
done
echo "Proses penghapusan antrian spam $1 selesai dilakukan"

Untuk menjalankannya, lakukan prosedur berikut :

  1. Salin script diatas menjadi sebuah script baru dan set sebagai script executable. Kalau malas mengetik, bisa download dari blog saya dengan perintah CLI sebagai berikut :
    [code lang=”bash”] wget https://vavai.com/tanya-new-pfdel
    chmod +x tanya-new-pfdel
    [code]
  2. Jangan lupa tempatkan script pfdel (script pada link tulisan sebelumnya) pada folder yang sama
  3. Jalankan script tersebut dengan perintah ./tanya-new-pfdel atau bisa juga /srv/vavai/tanya-new-pfdel jika posisi kita bukan pada posisi folder script tersebut
BASH Script Spam
Prev

DigitalOcean Spaces, S3QL dan Mount Folder pada Linux Server

Next

Spam “Account vwxyz@namadomain.com is Hacked”

Related Posts

vavai-perpus1.jpg
BlogBlog & Resources
February 6, 2019

Bekerja Di Luar Kantor

Read more
ResourceZimbra
March 21, 2013

Tips Zimbra : Integrasi Mailman Mailing List pada Zimbra Multi Server

Read more
inspiring.jpg
BlogBlog & ResourcesHeadline
November 19, 2016

Pelajaran Bisnis dari Penjual Mie Ayam Bakso

Read more
Search
Recent Post
  • Rilis Proxmox Virtual Environment 9.2: Optimalisasi Cluster dengan Dynamic Load Balancer
  • Infrastruktur Virtualisasi Sudah Berjalan, Tapi Kenapa Server Masih Sering Lambat dan Sulit Dikembangkan?
  • Training Proxmox: High Availability & Efficient Infrastructure Solution
  • Implementasi High Availability Storage: Instalasi Ceph di Proxmox VE
  • Website Error “Not Secure” dan Email Gagal Login? Bisa Jadi SSL Perusahaan Anda Expired
Categories
Archives
Featured image: Script untuk Menghapus Antrian Spam pada Zimbra dengan Konfirmasi
Get in Touch

KATEGORI

  • Home
  • Artikel
  • Training
  • Event
  • Berita

LAYANAN

  • Zimbra Mail Server
  • Ubuntu
  • XCP-ng
  • Vinchin
  • ASAV
  • Proxmox
  • RHEL
  • Nakivo
  • SMTP Relay
  • SSL Certificate

KONTAK KAMI

PT. Excellent Infotama Kreasindo, Premier Serenity Blok J12, Jl. KH. Agus Salim No. 40E, Bekasi Jaya, Bekasi Timur, Bekasi 17112, Jawa Barat, Indonesia

TENTANG KAMI

PT. Excellent Infotama Kreasindo merupakan entitas bisnis yang fokus pada layanan komputerisasi seperti implementasi sistem, konsultasi, training/workshop, dan maintenance sistem, terutama migrasi dari sistem Windows ke Linux. more…