]> git.donarmstrong.com Git - bin.git/commitdiff
add script to find bts mail from the log
authorDon Armstrong <don@donarmstrong.com>
Tue, 6 Mar 2018 19:18:21 +0000 (11:18 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 6 Mar 2018 19:18:21 +0000 (11:18 -0800)
find_bts_mail [new file with mode: 0644]

diff --git a/find_bts_mail b/find_bts_mail
new file mode 100644 (file)
index 0000000..a4cb1a5
--- /dev/null
@@ -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"