X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=brc;h=85583fe0901ebf47334755be6ef47b9476589efb;hb=4da3435e0d1918d90f59043deff2dffbdbe172c2;hp=d17c1a132e70ee4b7bc0f3f01bc39210ccf7f6bb;hpb=3fb3cc1b27a2ab661a4b46a36dd2114ce96020a4;p=distro-setup diff --git a/brc b/brc index d17c1a1..85583fe 100644 --- 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} +} +