Defining aliases

Jeff Gustafson SSUCS004 at vmd.cso.uiuc.edu
Mon Apr 10 12:36:51 AEST 1989


This is to address "Joe B...ski" and his question:

>        Does anyone know how to set up a global aliases file for
>Microport's System V mail program. (sic)  I am trying to set up
>a postmaster without giving it a special account of its own.

Well, Joe, I am afraid I don't know much about Microport, but I can tell you
that what would really help you out is "mailx," the BSD mail utility.
With mailx, you can set up global aliases in the /usr/lib/mailx/mailx.rc file.

If you do not have this particular mailer, but are using plain 'ol Sys V
mail, you will have to jury-rig things a little bit.  I might suggest invoking
mail by a shell script, which has as its contents:

  mail user1 user2 user3 ... user_n

and then, once the thing has been invoked, to perform the necessary tasks.
Admittedly, this is a rather cheap alternative to a global alias.

Another method might be to actually create a separate login for this
"postmaster," although I realize you are reluctant to do this.  But, what's
one more entry in /etc/passwd and a few more i-nodes if it works the way you
want it to.

A final suggestion (and this one is really far-fetched, but I add it because
it will at least work) is that you create a separate directory for the list
of names which you want to have as an alias, and then give each name in the
list a zero-byte file with this user as its name.  An example:

  Say you want an alias for staff members.  You set up a directory
/users1/aliases/staff.  This directory would contain the following zero-byte
files:  sysop, prog1, backup, prog2 (etcetera, etcetera...).  To mail to these
people, just invoke mail by "mail /users1/aliases/staff/*" and then perform
your usual mailing tasks.

No doubt there are other (BETTER) ways.  The important thing for you to do
is keep asking.  SOMEONE out there has an answer you will find acceptable.



-------------------------------------
Jeff Gustafson
<SSUCS004 at vmd.cso.uiuc.edu>
<SSUCS004 at UIUCVMD>
J-168, Academic Computing Services
Sangamon State University
Springfield, IL 62794-9243

"It's not a question of where he grips it; it's a simple matter of
weight ratios:  a five-ounce bird cannot carry a one-pound coconut."
   --- Monty Python (Holy Grail)
-------------------------------------



More information about the Comp.unix.questions mailing list