summaryrefslogtreecommitdiff
path: root/localshowmailreceivedfromdomain
blob: dfe986f9c2c4f0630e05993f2a4cef578ba15e8a (plain)
  1. #!/bin/sh
  2. #
  3. # /usr/local/sbin/localshowmailreceivedfromdomain
  4. # Copyright 2007-2008 Jonas Smedegaard <dr@jones.dk>
  5. #
  6. # $Id: localshowmailreceivedfromdomain,v 1.4 2008-02-03 22:09:07 jonas Exp $
  7. #
  8. # List emails recently received from a certain domain
  9. #
  10. # TODO: Handle other patterns than AMaViS
  11. #
  12. set -e
  13. localshowlogentries "$1" \
  14. '@' \
  15. '> -> ' \
  16. 's/^\(.\{15\}\) [^)]*) \([^,]*\), [^]]*] \([^ ]*\) -> .*Message-ID: \([^>,]*>\?\).*/\1 \3 (\4) \2/' \
  17. 's/^.*Message-ID: //;s/: .*$//'
  18. exit 0