Date: Thu, 12 Oct 1995 19:50:39 -0400 (EDT) From: "Jonathan M. Bresler" <jmb@kryten.Atinc.COM> To: David Brockus <dbrockus@cyberhall.com> Cc: FreeBSD questions <questions@freebsd.org> Subject: Re: Mailing Lists Message-ID: <Pine.3.89.9510121741.C3341-0100000@kryten.atinc.com> In-Reply-To: <Pine.BSF.3.91.951012114857.24614A-100000@cyber1.cyberhall.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Oct 1995, David Brockus wrote: > I am using FreeBSD 2.0.5. I was interested in setting up a way to have > someone email a single address, such as comments@cyberhall.com, then have > that original message distributed to the email addresses of people that I > haved defined. I was wondering if there is a way to send email to a group id > and have the members of that group id receive the letter. I was also > considering setting up a mailing list, but I am not certain what is involved > in configuring it. Could some please assist me? Thanks. to reach everyone on your system create a mail alias that includes everyone, dont bother with mailing list software. for an address list that has less to 20 people at other internet sites, use an alias again. otherwise consider using majordomo (madge says "you're soaking in it now"). FreeBSD.org uses majordomo for all its mailing lists. you can use this perl script to send mail to everyone on a particular host: #!/usr/bin/perl # # collect a mail message from STDIN # edit headers # send it out to everyone on this machine # # # set these to match your system # $debug = 0; $mailcmd = "/usr/bin/mail"; # # list all your non-user accounts here # %daemons = ( "root", 1, "toor", 1, "daemon", 1, "operator", 1, "bin", 1, "games", 1, "man", 1, "uucp", 1, "ingres", 1, "falcon", 1, "nobody", 1 ); # # collect the list of people # to receive the mail message # while ( $user = getpwent ) { (! $daemons{$user} ) && $targets .= " $user"; } # # collect the headers # junk lines that we dont need or want # while ( <STDIN> ) { last if ( /^$/o ); # end of headers next if ( /^Received: /o ); # remove these next if ( /^From /o ); # remove this line if ( ( $key, $value ) = ( /^(\S+):\s*(.*)/ ) ) { ; } $header{$key} = $value; } if ( $debug ) { open( OUT, "> /tmp/mailcatcher.$$") || die("$0 can't open output file"); foreach $key ( sort keys(%header) ) { print OUT "$key = $header{$key}\n" ; } } open( MAIL, "| /usr/bin/mail -s \"$header{'Subject'}\" jmb"); # # do the real work # while ( <STDIN> ) { $debug && print OUT; print MAIL; } Jonathan M. Bresler jmb@kryten.atinc.com | Analysis & Technology, Inc. FreeBSD Postmaster jmb@FreeBSD.Org | 2341 Jeff Davis Hwy play go. | Arlington, VA 22202 ride bike. hack FreeBSD.--ah the good life | 703-418-2800 x346
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.3.89.9510121741.C3341-0100000>