mailtoallonsystem

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Re: Mass mail all users at once..
From: aoc2 <aoc2@geocities.com>
Date: Fri, 22 Oct 1999 21:17:08 +0800 (GMT-8)


deja vu? i just replied to a similar q on another list several days ago.
here's how to do it basically. 

in /etc/aliases, add this line:

users: include: /root/users.aliases

where users.aliases is the name of the file that contains all the users
whom you wish to send mail to and users is the part to the left of the at
sign (i.e. users@domain.com).

when you're done, run the command newaliases. that's all there is to it. 


On Fri, 22 Oct 1999, Steven Hildreth wrote:

 SH> Thanks again for all the previous help, here I am again (hey you find a good
 SH> source you maximize it :)
 SH> 
 SH> I an needing to send a email to all users on a system. Using Redhat 6.0 and
 SH> Sendmail 8.9.3 how can this be done (preferably without using a list
 SH> manager) maybe be able to send a text file as the body something like this:
 SH> 
 SH> cat mail_message.txt | mail - s "Quarterly Update" *
 SH> 
 SH> Perhaps? Maybe? Not Really?
 SH> 
 SH> Ok thanks for anything....

====

On Fri, 22 Oct 1999, Steven Hildreth wrote:

> Thanks again for all the previous help, here I am again (hey you find a good
> source you maximize it :)
> 
> I an needing to send a email to all users on a system. Using Redhat 6.0 and
> Sendmail 8.9.3 how can this be done (preferably without using a list
> manager) maybe be able to send a text file as the body something like this:
> 
> cat mail_message.txt | mail - s "Quarterly Update" *
> 
> Perhaps? Maybe? Not Really?
> 
> Ok thanks for anything....


Subject: Re: Mass mail all users at once..
From: Charles Galpin <cgalpin@lighthouse-software.com>
Date: Fri, 22 Oct 1999 09:20:20 -0400 (EDT)

check the moongroup archives for the mailhelp list (or perhaps even this
one) where there was a tread on this recently. A simple cut command will
get you all users out of /etc/passwd, and it would work nicely save
gettign a few extra emails to the postmaster for users like bin, daemon
etc. Something like this iirc

cut -d: -f1 /etc/passwd | xargs  cat mail_message.txt | mail - s
"Quarterly Update" 

should do the trick. above snippet **UNTESTED**

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu