fix ssh issue, various minor improvements
[distro-setup] / brc
diff --git a/brc b/brc
index d17c1a132e70ee4b7bc0f3f01bc39210ccf7f6bb..85583fe0901ebf47334755be6ef47b9476589efb 100644 (file)
--- a/brc
+++ b/brc
@@ -1109,6 +1109,17 @@ econfdev() {
   update-exim4.conf -d /tmp/edev/etc/exim4 -o /tmp/edev/e.conf
 }
 
+# exim grep in
+# show important information about incoming mail in the exim log
+egrin() {
+  sed -rn '/testignore|jtuttle|eximbackup/!s/^[^ ]+ ([^ ]+) [^ ]+ [^ ]+ <= ([^ ]+).*T="(.*)" from (<[^ ]+> .*$)/\1 \4\n \3/p' <${1:-/var/log/exim4/mainlog}
+}
+
+# 2nd line is message-id:
+egrinid() {
+  sed -rn '/testignore|jtuttle|eximbackup/!s/^[^ ]+ ([^ ]+) [^ ]+ [^ ]+ <= ([^ ]+).* id=([^ ]+) T="(.*)" from (<[^ ]+> .*$)/\1 \5\n \3\n \4/p' <${1:-/var/log/exim4/mainlog}
+}
+