Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 220
#!/bin/bash SPAMTEST=$(grep -hse "^$(date +"%b %d %H" -d "1 hour ago").*ALLOWED" -e "^$(date +"%b %d %H").*ALLOWED" /var/log/maillog /usr/local/psa/var/log/maillog | grep -v 'auth: (unknown)' | sed 's/^.*from: \(\S*\).*auth: \(\S*\).*$/mails sent from \1 (authed as \2)/g'|sort|uniq -ic|awk '{ if ($1>50) print $0}'|xargs) if [[ -n "$SPAMTEST" ]]; then echo "WARNING: Possible compromised mail accounts sending high volumes recently: $SPAMTEST" exit 1 else echo "OK: No compromised accounts found in the mail log" exit 0 fi