Membuat report log exim cpanel send to email

#Setting di cron crontab -e 45 2 * * * /usr/sbin/eximstats -nr /var/log/exim_mainlog | mail -s “sav-17 Mail Report `date`” noc@kucing.com alert-mail@kucing.com ket : sav-17 Mail report = subject email date = tanggal noc@ & alert-mail@ = email tujuan  

Membuat logrotate untuk exim_mainlog per hari

nano /etc/logrotate.d/exim /var/log/exim_mainlog { #create 0640 mailnull mail #compress #postrotate #/usr/bin/killall -HUP exim # endscript missingok notifempty size 100M daily rotate 90 dateext copytruncate }

Tips keamanan webserver

1. untuk mencegah mallware bisa pakai : – daily scan dengan LMD + clamAV 2. untuk cegah inject dan exploit bisa pake .htaccess (apache) atau nginx.conf Nginx: https://www.howtoforge.com/nginx-ho…jections-file-injections-spam-user-agents-etc Apache: https://internetlifeforum.com/php-mysql-forum/2630-how-prevent-xss-injection-attacks-htaccess/ 3. Cegah wordpress bruteforce: CSF + regex rule : https://forum.configserver.com/viewtopic.php?t=8886 4. Full Backup, bisa pakai rclone untuk bakup external ke vps atau online cloud storage … Read more

Bash Command Tutorial – System admin guide

1.) ps -eo user,pcpu,pmem | tail -n +2 | awk ‘{num[$1]++; cpu[$1] += $2; mem[$1] += $3} END{printf(“NPROC\tUSER\tCPU\tMEM\n”); for (user in cpu) printf(“%d\t%s\t%.2f\t%.2f\n”,num[user], user, cpu[user], mem[user]) }’ Fungsi : Melihat top / high 10 process yg sangat besar dalam penggunaan cpu dan memory server . ========================================================= 2.) for USER in `ls /var/spool/cron`; do echo “=== … Read more