summaryrefslogtreecommitdiff
path: root/localusermailaddr
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2002-03-11 14:15:48 +0000
committerJonas Smedegaard <dr@jones.dk>2002-03-11 14:15:48 +0000
commit38bb077b9cca1fca6874177cd2dcf33ecb9ddf1f (patch)
treee86597f845e54a75efb7f56bcc52d648e270e313 /localusermailaddr
parentd6a23e40c18794bab2648a828cf230d0fce97ab7 (diff)
Rename user/mailadr to localusermailaddr and add comment.
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