----- Original Message -----
From: "Ian C. Sison" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 26, 2000 06:19 PM
Subject: Re: [plug] mail to all users


> > In /etc/aliases put this:
> >
> > all_users:    "|/usr/local/bin/send-to-all.sh"
> >
> > (dont forget to run newaliases)
> >
> > In /usr/local/bin/send-to-all.sh:
> >
> > #! /bin/sh
> > USERS=`/bin/cat /etc/passwd | /bin/cut -d':' -f 1`
> > cat | /usr/sbin/sendmail $USERS
> >

    ian's suggestion is one good example but the problem is, it will include
default system users like root, bin, daemon, sync, shutdown, etc :->
    one quick and simple solution is to use the ":inlcude:" features of
sendmail.
    for example in your /etc/aliases:

        all_users: :include: /path/file

    this will causes sendmail to read its list of recipients from an
external file (/path/file). just make a simple script to parse from your
/etc/passwd file to /path/file.

fooler.
DISCLAIMER: my views are my own and not necessarily my employer's



-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to