cPanel – Worst tips and tricks in the universe

Published on Author gryzliLeave a comment

These are some little commands, which are very handy in a day to day cPanel struggles…

 

1. Sorted list of all IP’s generating SMTP Connections to EXIM  for the day

# Frist, lets speed up our grep
unset LANG

# Now do the job
# 2014-11-21 is the date for which you need records
grep "2014-11-21" /var/log/exim_mainlog | grep "SMTP connection from"  | sed -re "s/.*\[(.*[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*/\1/g" | sort -n  | uniq -c | sort -n

 

Leave a Reply

Your email address will not be published. Required fields are marked *