Date: Tue, 26 Oct 1999 00:30:49 +1000 From: "Greg W" <greg@ausit.com> To: freebsd-isp@FreeBSD.ORG Subject: Re: Mass Email Message-ID: <199910260030490218.06A28D3C@mail.ausit.com> In-Reply-To: <00d501bf1f0a$05667d00$e9c276d1@empireone.net> References: <00d501bf1f0a$05667d00$e9c276d1@empireone.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Here is something a Rick L Mantooth whipped up you should be able to mod to your liking Here is a quickie. #!/bin/sh # Build list of users from /etc/passwd starting with # Line 19 so we don't send mail to non-users. # # Adjust below if statement to match your system. # ( cat /etc/passwd | awk ' BEGIN{ FS=":" cnt=1 } { if(cnt < 19){ cnt++ ; next } printf "%s@domain.com\n",$1 cnt++ }' ) > /tmp/mail_list # # You may need to use grep -v statement in for # loop below if you have added automated users # ie: postgres, etc.. to filter out. # # Now to email out to the users. for user in `cat /tmp/mail_list` do mail "${user}" < /Path/To/File/File_To_Send_Here done rm -f /tmp/mail_list # End script *********** REPLY SEPARATOR *********** On 25/10/99 at 9:57 James wrote: >I have to make a change on our system. >How do I go about emailing all of the users on the system >with out giving each of my users my user list? > > > > > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-isp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910260030490218.06A28D3C>