#!/bin/sh # # /usr/local/sbin/localshowmailreceivedfromdomain # Copyright 2007-2008 Jonas Smedegaard # # $Id: localshowmailreceivedfromdomain,v 1.4 2008-02-03 22:09:07 jonas Exp $ # # List emails recently received from a certain domain # # TODO: Handle other patterns than AMaViS # set -e localshowlogentries "$1" \ '@' \ '> -> ' \ 's/^\(.\{15\}\) [^)]*) \([^,]*\), [^]]*] \([^ ]*\) -> .*Message-ID: \([^>,]*>\?\).*/\1 \3 (\4) \2/' \ 's/^.*Message-ID: //;s/: .*$//' exit 0