On Wed, 9 Aug 2000, Scott Skrogstad wrote:
> Is there a how to on how to mail all my users on my box at one time. I
> have about 2000 users.
Quick and dirty:
echo -n "all:" >>/etc/aliases
for i in `cat /etc/passwd |cut -d ':' -f 1`; do
echo -n "$i," >>/etc/aliases
done
echo "aaa" >>/etc/aliases
newaliases
mail all -s "subject" < your.message
Down sides:
Anyone can mail to all@yourhost to distribute tons of spam, so disable
this alias right after using it!
This mails to EVERY account, including system accounts.
Alternative (causes more system load, but doesn't leave the all address
open):
for i in `cat /etc/passwd | cut -d ':' -f 1`; do
mail -s "subject" $i < your.message
done
LLaP
bero
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list