Subject: DISTRIBUTION of email

From: Adrian Planinc <[email-masked]>
Date: Thu, 24 Apr 1997 20:16:57 +0800

I was just wondering.....

Is it possible to send an email message to ALL the people at a certain 
domain? Like my address is [email-masked]. Could I send 
a message that goes to everyone at alpha2.curtin.edu.au??? 

Is there any sort of standard way of doing this, or not?

If you know, please reply in email.....

---
Adrian Planinc
Division of Engineering and Science
Curtin University of Technology

      [email-masked]
      [email-masked]
      [email-masked]

Note: The contents of this message or posting
      reflect on me and not my service providers.

---

From: [email-masked] (Scott Norwood)
Date: 24 Apr 1997 16:23:06 GMT

[followups set to comp.mail.misc]

In article <[email-masked]>,
>a message that goes to everyone at alpha2.curtin.edu.au??? 

Maybe...do you have the list of usernames for alpha2.curtin.edu.au?  If
the system running this mail server is UNIX-based, and you have an
account on this system, you should be able to get the /etc/passwd
file (which contains the list of usernames, among other things).
Once you have the list of users, you're all set; write a script that
strips out everything but the usernames from the passwd file, then
goes through the list and sends a file (the message you want to send)
to each of them.  For example:

--begin script--
#!/bin/bash

#sends mail to all users on a particular system; run this
#from a home directory that you have write permissions to
#
#edit message.txt and other lines as needed

#extract usernames from passwd file
sed "s/:.*//g" < /etc/passwd > raw_addr_list

#do some editing on username list...get rid of useless users
cat raw_addr_list | grep -v root | grep -v bin | grep -v daemon | \
grep -v adm | grep -v lp | grep -v sync | grep -v shutdown | grep -v halt | \
grep -v mail | grep -v news | grep -v uucp | grep -v operator | \
grep -v games | grep -v man | grep -v postmaster | grep -v nobody | \
grep -v ftp | grep -v guest > addr_list

#send the mail!
for addr in `cat ./addr_list`
do
mail -s "Hello world!" [email-masked] < message.txt
sleep 1
done

#let the fun begin
--end script--

>Is there any sort of standard way of doing this, or not?

Depends on how you define standard.  Note that if you do this without
the knowledge of your sysadmin, you're likely to get him pretty ticked
off.  This type of thing shoots the load average on a system through
the roof, and chews up space in the mail spool.  (translation:  DON'T
TRY THIS AT HOME)

Also, note that some sites have mail aliases that automatically send
mail to every account within the domain...much easier than writing a
script like the above.

>If you know, please reply in email.....

No, read it here.

-- 
SPAM THIS!:  root@localhost            bin@localhost
             postmaster@localhost      daemon@localhost
             abuse@localhost           admin@localhost
             news@localhost            security@localhost