Engine23
blogBannerImage
By Engine23

Command Line - maillog, search mail log, search by day mail log

This is just a list of commands I know I wont remember, so I am putting them here for reference

grep "status=sent" /var/log/maillog | grep "Aug 5" | awk '{print }' | awk -F "=" '{print }' | awk -F "<" '{print }' | awk -F ">" '{print }' | sort | uniq -c | sort -n 
grep "status=sent" /var/log/maillog | grep "Aug 5" | grep "to=<*>" grep "status=sent" /var/log/maillog | grep "Aug 5" | wc -l 
grep "ralbin@abcompany.com" /var/log/maillog | wc -l less /var/log/maillog grep "abc@hotmail.com" /var/log/maillog