From c415a1ba1aeca58b537ccd13176ce6968f834091 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 6 Mar 2018 11:18:21 -0800 Subject: [PATCH] add script to find bts mail from the log --- find_bts_mail | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 find_bts_mail 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" -- 2.39.2