From: Dobrica Pavlinusic Date: Mon, 19 Sep 2016 09:11:20 +0000 (+0200) Subject: grep through maillog for top from address from mailq X-Git-Url: http://git.rot13.org/?p=mx01;a=commitdiff_plain;h=ae6f7914e2412032b650d0ae3cb5db54cbdd2cd3 grep through maillog for top from address from mailq --- diff --git a/grep-maillog.sh b/grep-maillog.sh new file mode 100755 index 0000000..8ee8c89 --- /dev/null +++ b/grep-maillog.sh @@ -0,0 +1,3 @@ +#!/bin/sh -xe +top_from=`./mailq-count-from.sh | sort -n -r | head -1 | awk '{ print $2 }'` +sudo grep $* $top_from /var/log/mail.log