summaryrefslogtreecommitdiff
path: root/localshowmaildelivered
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-08-02 03:28:07 +0000
committerJonas Smedegaard <dr@jones.dk>2007-08-02 03:28:07 +0000
commit13aa25dd1963b140307f5950d12513e6daf5e4f7 (patch)
tree2924342a4e8f7367e18bc1a32e30e24ee2be1d23 /localshowmaildelivered
parent6871179e8a25662e6875edbe0bd8d5b1c4e36f20 (diff)
Add new script localshowmaildelivered.
Diffstat (limited to 'localshowmaildelivered')
-rwxr-xr-xlocalshowmaildelivered13
1 files changed, 13 insertions, 0 deletions
diff --git a/localshowmaildelivered b/localshowmaildelivered
new file mode 100755
index 0000000..29d72a4
--- /dev/null
+++ b/localshowmaildelivered
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# /usr/local/sbin/localshowmaildelivered
+# Copyright 2007 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localshowmaildelivered,v 1.1 2007-08-02 03:28:07 jonas Exp $
+#
+# List recently delivered emails
+#
+# TODO: Handle other delivery methods than dovecot
+#
+
+(zcat /var/log/syslog.{7,6,5,4,3,2,1}.gz; cat /var/log/syslog) | egrep -- 'deliver\(('"$1"')\).*saved mail to INBOX$' | sed 's/jawa deliver(awi): msgid=//;s/: saved mail to INBOX//'