Below one liner, pipes mailq command to sed, which prints out every 3rd line starting from line 5 capturing only the email addresses and producing report of the top 10 email addresses in sendmail mail queue.
mailq | sed -n '5~3p' | sort | uniq -c | sort -nr | head
- sandip's blog
- Login or register to post comments