diff options
author | Jonas Smedegaard <dr@jones.dk> | 2002-03-11 14:15:48 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2002-03-11 14:15:48 +0000 |
commit | 38bb077b9cca1fca6874177cd2dcf33ecb9ddf1f (patch) | |
tree | e86597f845e54a75efb7f56bcc52d648e270e313 /localusermailaddr | |
parent | d6a23e40c18794bab2648a828cf230d0fce97ab7 (diff) |
Rename user/mailadr to localusermailaddr and add comment.
Diffstat (limited to 'localusermailaddr')
-rwxr-xr-x | localusermailaddr | 14 |
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 |