From: Don Armstrong Date: Tue, 6 Mar 2018 19:18:21 +0000 (-0800) Subject: add script to find bts mail from the log X-Git-Url: https://git.donarmstrong.com/?p=bin.git;a=commitdiff_plain;h=c415a1ba1aeca58b537ccd13176ce6968f834091 add script to find bts mail from the log --- diff --git a/find_bts_mail b/find_bts_mail new file mode 100644 index 0000000..a4cb1a5 --- /dev/null +++ b/find_bts_mail @@ -0,0 +1,11 @@ +#!/bin/sh + +DAYS="${2:-4}" + +## this script searches a bunch of paths to find logfiles, and then +## greps through the logfiles for matches +(find /srv/bugs.debian.org/mail/ -iname '.logfile*' -ctime -$DAYS -print0; + find /var/log/exim4/ -iname 'mainlog*' -ctime -$DAYS -print0; + find /srv/bugs.debian.org/logs -iname 'spamscan*' -ctime -$DAYS -print0; + find /srv/bugs.debian.org/logs -iname 'process*' -ctime -$DAYS -print0; + )|xargs -0 grep -C 5 "$1"