blob: 6e683eb62f5d9fb038b2ff8de99a182507245a72 (
plain)
- #!/bin/sh
- #
- # /usr/local/sbin/localshowmaildelivered
- # Copyright 2007 Jonas Smedegaard <dr@jones.dk>
- #
- # $Id: localshowmaildelivered,v 1.3 2007-09-15 02:06:16 jonas Exp $
- #
- # List recently delivered emails
- #
- # TODO: Handle other delivery methods than dovecot
- #
- logfiles=1
- find /var/log -name 'mail.log*' | sort -nr -t. -k3 | tail -n "$logfiles" | xargs zcat -f \
- | egrep -- 'deliver\(('"$1"')\).*saved mail to ' \
- | sed 's/^\(.\{15\}\) [^)]*): msgid=/\1 (/;s/: saved mail to/)/;s/ INBOX$//'
|