[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: mass email



>>>>> "jb" == Jim Bija <jim 3dws com> writes:

jb> I am using sendmail 8.9.3 and need to send the same message to every single
jb> person in the passwd file. Well not the system account etc, but ya know all
jb> my "users". Can i get some insight on an easy way to do this?

jb> I have a text file that contains my BODY of the email i want to send to
jb> all.. i can care less about subject, so if i cant give it a subject thats
jb> ok, but i would like one.


One method, very simple is just to create a list of your users listed
in the password file with a exclude list [/usr/local/bin/exclude] for
names such as root,operator,news, etc, etc.

Then run this script each day using crontab to create a new list of
all users.

Here is a simple script: 

#!/bin/sh

awk -F: '{ print $1 }' /etc/passwd | grep -v P | grep -vxFf /usr/local/bin/exclude | sort > /etc/allusers




-- 
Ray Curtis         Unix/Linux Programmer/Consultant   Curtis Consulting
mailto:ray ray clark net                        http://www.clark.net/pub/ray
============================================================================



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]