goto /etc/mail
vi virtualtable
[email protected] allusers
Now go to
/etc/mail
vi allusers.txt
user1
user2
user3
[ here you will have to just write the username (system username)
Now save the file
vi /etc/newaliases
insert this line
allusers: :include:/etc/mail/alluser
s.txt
then make new aliases
thats it
when you will sent email to
example
cat /etc/hosts | mail -s "emailtoalluser" allusers
it will sent that email to every user