[comp.mail.mh] Aliases for rcvdist

lawrence@epps.kodak.com (Scott Lawrence) (02/07/91)

I posted a question a few days ago asking if rcvdist could be made to support
mh aliases as destinations.  No such luck.  The easiest solution I got was to
have the system administrator set me up a system wide alias that pointed to a
file I could edit.  Fair, but a bit clumsy - I want to be able to do this on
short notice and throw them away when I'm done with them.  As one who has had
to administer mail for fairly large systems, I don't want to do that.

So I wrote the following very simple wrapper script (in perl) to provide the
capability I wanted.  I use it from my .maildelivery file as:

To bulletin@osf.org | R "$HOME/tools/distribute-mail osf-dist"

where distribute-mail is the perl script below, and osf-dist is a private mh
alias in my .mail-aliases file (which does _not_ include me).  Works like a
charm.  Enjoy.

------------ cut here --------------
#!/usr/local/bin/perl

foreach $Dest ( @ARGV ) # expand each argument using ali...
{
    @Destinations = (@Destinations, `/usr/local/bin/ali -list $Dest`);
}

chop @Destinations; # take the newlines off...

system( "/usr/local/lib/mh/rcvdist", @Destinations ); 

------------- end -------------------

--
Scott Lawrence             <lawrence@epps.kodak.com>  Voice: 508-670-4023
Atex Advanced Publishing Systems                        Fax: 508-670-4033
Atex, Inc; 165 Lexington St. MS 400/165L; Billerica MA 01821
--
--
Scott Lawrence             <lawrence@epps.kodak.com>  Voice: 508-670-4023
Atex Advanced Publishing Systems                        Fax: 508-670-4033
Atex, Inc; 165 Lexington St. MS 400/165L; Billerica MA 01821