[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sendmail questions
erez@savan.com wrote:
> with sendmail:
> 1. can i make an alias to all users without explicitly writing usernames
> ?
> 2. can sendmail take usernames not from /etc/passwd (maytbe
> /etc/mailusers ??? )
> 3. can i make a mail alias which takes a list and removes some
> ( e.g. all: avi,dani,yossi,efraim
> >> all-: all execpt avi <<
> )
>
If you want to be simple about it, you can just have a file with the
names, let's say /etc/allusers and have the following in /etc/aliases:
all: :include:/etc/allusers
Run newaliases to update the alias list. Mail sent to all will go to each user
in the file. The names can be any valid name, e.g. fred, fred@flintsone.net,
uucp!flinstone!fred, etc. Put one name per line.
Any easy way to create the file would be
cat /etc/passwd | awk -F: '($2 > 100) {print $1}' >/etc/allusers
This will ignore root, bin, etc.
Geoff.
--
Geoffrey S. Mendelson
Tel: (03) 6944-211 Fax: (03) 6944-225 Email: gsm@bfr.co.il
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il