summaryrefslogtreecommitdiff
path: root/localshowmailreceived
blob: b1a65111bac17a749db538a1970cbd8a08d54a32 (plain)
  1. #!/bin/sh
  2. #
  3. # /usr/local/sbin/localshowmailreceived
  4. # Copyright 2007 Jonas Smedegaard <dr@jones.dk>
  5. #
  6. # $Id: localshowmailreceived,v 1.2 2007-09-27 21:32:22 jonas Exp $
  7. #
  8. # List recently received emails
  9. #
  10. # TODO: Handle other indicatiors than AMaViS
  11. #
  12. logfiles=1
  13. maildomain=$(if [ -r /etc/mailname ]; then head -n 1 /etc/mailname; fi;)
  14. find /var/log -name 'mail.log*' | sort -nr -t. -k3 | tail -n "$logfiles" | xargs zcat -f \
  15. | egrep -- ' -> <'"$1"'@'"$maildomain" \
  16. | sed 's/^\(.\{15\}\) [^)]*) \([^,]*\), [^]]*] \([^ ]*\) -> .*Message-ID: \([^>,]*>\?\).*/\1 \3 (\4) \2/'
/td>2023-06-27 09:35:08 +0200 committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200 commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch) treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/f5/c9/E1kQGZw-000Fik-G6@fasolo.debian.org/unread parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
master
Diffstat (limited to 'tags/f5/c9/E1kQGZw-000Fik-G6@fasolo.debian.org/unread')
-rw-r--r--tags/f5/c9/E1kQGZw-000Fik-G6@fasolo.debian.org/unread0
1 files changed, 0 insertions, 0 deletions