1. create a script:
#!/bin/bash
# Filename : /etc/mail/gen-allusers
# Generate list of allusers from /etc/passwd
#
cat /etc/passwd |awk -F: '{print $1}' > /tmp/file1
egrep -f /etc/mail/exempted -v /tmp/file1| sort >
/etc/mail/allusers
rm /tmp/file1
#eof
2. create /etc/mail/exempted:
#users that will not be included in your allusers file
#like:
root
daemon
bin
sys
adm
lp
smtp
uucp
nuucp
listen
nobody
noaccess
nobody4
setup
test
kahit_ayaw_mong_padalhan_ng_email
3. edit /etc/aliases:
# allusers group
allusers: :include:/etc/mail/allusers
4. edit your crontab file to automagically generate
allusers file.
0 0 * * * /etc/mail/gen-allusers
5. execute "newaliases"
hth,
ina patricia
> [EMAIL PROTECTED] wrote:
> #_
> #_
> #_ sirs,
> #_
> #_ How do i send mail to all users ?
> #_
> #_
> -
> Philippine Linux Users Group. Web site and archives
> at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to
[EMAIL PROTECTED]
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]