On 05-Jun-2003/22:49 -0700, Santosh <[EMAIL PROTECTED]> wrote:
>I had already installed the mail server in Linux 7.3 and it's working
>frequently.
>
>I wanna to send mail to all which I had created the mail a/c in my server. 
>
>So, How can I do that how can I made aliases to send the mail to all users.

Put the message in a file (msgfile.txt). Then run this script:


for localuser in `cat /etc/passwd | gawk -F : '{ if ($3 > 499) print $1 }'`
do
  cat /path/to/msgfile.txt | mail -s "Sysadmin Announcement" $localuser
done


Tony
-- 
Anthony E. Greene <mailto:[EMAIL PROTECTED]>
OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
AOL/Yahoo Chat: TonyG05      HomePage: <http://www.pobox.com/~agreene/>
Linux: the choice of a GNU Generation. <http://www.linux.org/>


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to