Wednesday, May 25, 2022
Bash Script

Membuat Email alert spam di cpanel

buat file misal check.sh

nano check.sh

#!/bin/bash

cat /var/log/exim_mainlog |grep @aol.* > /dev/null

#Email Notification
if [ “$?” = “0” ]; then
echo “Email send to aol” | mailx -s “Send mail spam aol#Reborn” hendro@yuby.com
else
echo “Email send to aol” > /dev/null
exit 1
fi

chmod a+x check.sh

crontab -e

* * * * * /bin/sh /media/check.sh >/dev/null 2>&1

(Visited 10 times, 1 visits today)
Klik untuk berbagi dengan orang lain
Baca Juga :  Membuat Cron per detik menggunakan Bash Script

Similar Posts