X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=brc;h=85583fe0901ebf47334755be6ef47b9476589efb;hp=d17c1a132e70ee4b7bc0f3f01bc39210ccf7f6bb;hb=5cb8fc0c2a8a3f9ffa3cb4d376075c1217eb6d8c;hpb=d1699bf542263f68d15c48751826bb740916b3d9 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} +} +