Article View: comp.mail.misc
Article #5240Re: aliasing everyone within an organization
From: Chip Salzenberg
Date: Tue, 21 Mar 1989 22:32
Date: Tue, 21 Mar 1989 22:32
59 lines
2310 bytes
2310 bytes
According to bob@kahala.hig.hawaii.edu (Bob Cunningham):
>I'm implementing, for an organization of several hundred people, a
>scheme where everyone can potentially receive e-mail via standardized
>aliases [...] even if they don't have a current e-mail address)
>using individual's first initial and last name.
I think my "deliver" program (currently at patchlevel eight) might provide
part of the solution to this problem. It works with BSD or USG Unix, and it
provides the ability to execute arbitrary commands to control delivery of
incoming mail. Be sure you have Smail, though.
For example, for those users who don't have accounts, you can have deliver
print the message instead of doing normal delivery. Assuming the existance
of a text file "del.aliases" that looks like this:
bcunningham rc@foo
dicknixon [print]
rcunningham rc@foo
richardnixon [print]
(Be sure it's sorted.)
Then you can use a system delivery script like this:
for u
do
# Look up the given name
n=`look "$u " del.aliases | awk '{ print $2 }'`
# Take action based on result of lookup
case "$n" in
*@*@*) echo $n ;;
*@*) n1=`expr $n : '\(.*\)@.*'`
n2=`expr $n : '.*@\(.*\)'`
if [ $n2 = `uuname -l` ]
then
# Local user
echo $n1
else
# Remote user
cat $HEADER $BODY | rmail $n ;;
fi
;;
[print]) cat $HEADER $BODY | lpr
;;
*) echo $u
;;
esac
done
This does the obvious thing, i.e. print those with entries that say
"[print]".
This script would be *much* clearer in Perl, but since not all systems have
Perl, I can't just assume it's available.
--
Chip Salzenberg <chip@ateng.com> or <uunet!ateng!chip>
A T Engineering Me? Speak for my company? Surely you jest!
"It's no good. They're tapping the lines."
Technical Details
Message-ID:
<1989Mar21.173204.865@ateng.ateng.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!lll-winken!uunet!ateng!chipReferences:
<3498@uhccux.uhcc.hawaii.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!lll-winken!uunet!ateng!chip From: chip@ateng.ateng.com (Chip Salzenberg) Newsgroups: comp.mail.misc Subject: Re: aliasing everyone within an organization Message-ID: <1989Mar21.173204.865@ateng.ateng.com> Date: 21 Mar 89 22:32:03 GMT References: <3498@uhccux.uhcc.hawaii.edu> Organization: A T Engineering, Tampa, FL Lines: 59