Membuat Email alert untuk spamming di postfix

buat file misal check.sh nano check.sh #!/bin/bash cat /var/log/maillog |grep @aol.* > /dev/null #Email Notification if [ “$?” = “0” ]; then echo “Email send to aol” | mailx -s “Send mail spam aol#hotel-smtp” hendro@yuby.com else echo “Email send to aol” > /dev/null exit 1 fi chmod a+x check.sh crontab -e * * * * … Read more

Backup dari Debian/Ubuntu/Centos/Open BSD ke Synology

–Backup dari Debian/Ubuntu ke Synology apt-get install ftp-upload mkdir /usr/src/backup/ nano /usr/src/backup.sh chmod a+x /usr/src/backup.sh isi file : #!/bin/bash export LC_ALL=”en_US.utf8″ cd /etc/dnsdist/ tar -czf /usr/src/backup/dnsdist-$(date +%d%m%Y).tar.gz * sleep 1m ftp-upload -h lapo.games.com:221 -u server –password kucing123 -d /Provisioning/Server/DNS/ /usr/src/backup/*$(date +%d%m%Y).tar.gz find /usr/src/backup/dnsdist-* -mtime +7 -exec rm {} \; KET : -lapo.games.com:221 -> server nya … Read more

Membuat auto move Junk email to Inbox

-Buat file misal mv.sh nano mv.sh #!/bin/bash mv /home/tviexp/mail/yuby123.ml/test/.Junk/cur/* /home/tviexp/mail/yuby123.ml/test/cur/ -permission chmod a+x  mv.sh -setting cron * * * * * /home/mv.sh   Related Posts:Cara mengecek spec PC dari linuxMEMBUAT KABEL STRAIGHT & CROSSInstall LEMP Stack di CentOS 7Cara migrasi account email di outlook 2007Solusi Jika Email dari inbox auto masuk ke spam/junk…Solusi Kirim email … Read more

script auto free RAM jika penuh

#!/bin/bash if [ `free -m | grep Mem | awk ‘{print $3}’` -ge 14000 ] then sync; echo 3 > /proc/sys/vm/drop_caches /etc/init.d/pdns stop fi   ket : jika RAM lebih besar dari 14 GB maka sync; echo 3 > /proc/sys/vm/drop_caches ( di bersihkan ) restart service DNS   Related Posts:Cara mengecek spec PC dari linuxInstall … Read more

membuat script auto restart DNS

#!/bin/bash nslookup google.com localhost > /dev/null if [ $? -eq 1 ] then /etc/init.d/pdns stop echo $(date) >> /tmp/monitor.log fi ket : lookup google ke localhost $? artinya jika benar hasilnya 0 , jika gagal hasilnya 1 -eq 1 artinya jika hasilnya 1 ( gagal ) maka service DNS akan di restart echo $(date) artinya … Read more