summaryrefslogtreecommitdiff
path: root/localusermailaddr
diff options
context:
space:
mode:
Diffstat (limited to 'localusermailaddr')
-rwxr-xr-xlocalusermailaddr14
1 files changed, 14 insertions, 0 deletions
diff --git a/localusermailaddr b/localusermailaddr
new file mode 100755
index 0000000..6595a38
--- /dev/null
+++ b/localusermailaddr
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# /usr/local/sbin/localusermailaddr
+# Copyright 2002 Jonas Smedegaard <dr@jones.dk>
+#
+# $Id: localusermailaddr,v 1.1 2002-03-11 14:15:48 jonas Exp $
+#
+# List mail addresses attached to an account
+#
+
+for uid in $@; do
+ grep "[[:space:]]$uid\$" `ls /etc/postfix/virtual* | egrep -v '\.(bak|db|dpkg-new|dpkg-old|old)$'` | sed -e 's/.*://' -e 's/[[:space:]].*//' | sort
+ echo "$uid@`cat /etc/mailname`"
+done