diff options
author | Jonas Smedegaard <dr@jones.dk> | 2007-09-15 01:53:15 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2007-09-15 01:53:15 +0000 |
commit | d1badbce054b5510145c56e7e014db50edc12320 (patch) | |
tree | bc9af175bda5dd47f299378b491a06b201f4582a /localshowmailreceivedfromdomain | |
parent | 39c3477585ee00f234732b291318c4a3b22ea835 (diff) |
New script showing recent emails from certain domain.
Diffstat (limited to 'localshowmailreceivedfromdomain')
-rwxr-xr-x | localshowmailreceivedfromdomain | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/localshowmailreceivedfromdomain b/localshowmailreceivedfromdomain new file mode 100755 index 0000000..a671408 --- /dev/null +++ b/localshowmailreceivedfromdomain @@ -0,0 +1,13 @@ +#!/bin/sh +# +# /usr/local/sbin/localshowmailreceivedfromdomain +# Copyright 2007 Jonas Smedegaard <dr@jones.dk> +# +# $Id: localshowmailreceivedfromdomain,v 1.1 2007-09-15 01:53:15 jonas Exp $ +# +# List emails recently received from a certain domain +# +# TODO: Handle other indicatiors than AMaViS +# + +(zcat /var/log/syslog.{7,6,5,4,3,2,1}.gz; cat /var/log/syslog) | egrep -- '@'"$1"'> -> ' | sed 's/^\(.\{15\}\) [^)]*) \([^,]*\), [^]]*] \([^ ]*\) -> .*Message-ID: \([^>,]*>\?\).*/\1 \3 (\4) \2/' |