Great Circle Associates Majordomo-Users
(October 2003)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Nested lists
From: Casey Hatch <casey @ gvt . gvturf . com>
Date: Fri, 3 Oct 2003 11:09:57 -0600
To: majordomo-users @ greatcircle . com
Cc: jheffernan @ collaborative . org
In-reply-to: <BBA30EB6.B74A%jheffernan@collaborative.org>
References: <BBA30EB6.B74A%jheffernan@collaborative.org>
User-agent: Mutt/1.4i

Hey Jeff,

I have to occasionally let everyone on my lists know of hardware 
updates, machine retirements, etc and this is the way a friend 
of mine did it.  It works well.

It assumes you have root permissions.

First I created the file: /path/to/majordomo/makebiglist
and This is the code (note it uses bash shell):

#!/sbin/bash

#LISTS=`egrep "^*-list:" /etc/mail/majordomo`
#FINAL=`echo "$LISTS" | sed -e"s/-list*$//g"` 
#echo $FINAL

rm -f /etc/mail/biglist

lists=`ls /path/to/majordomo/lists`

for list in $lists
do
	name=`echo $list | sed -e"/.info/d" -e"/.intro/d" -e"/.config/d"`

	if [ -n "$name" ]
	then
		cat /path/to/majordomo/lists/$name >> /etc/mail/biglist.tmp
	fi
done

sort -u /etc/mail/biglist.tmp > /etc/mail/biglist.sorted
uniq /etc/mail/biglist.sorted > /etc/mail/biglist.uniq
sed -e"/^#/d" /etc/mail/biglist.uniq > /etc/mail/biglist
rm -f /etc/mail/biglist.tmp /etc/mail/biglist.sorted /etc/mail/biglist.uniq

Now this should be fairly self explanitory but here is the summary:
1) Look in the lists directory and cat all the names in lists to one
file
2) remove old biglist
3) get rid of the info and intro stuff or whatever you want etc...
4) sort the list (alphabatize)
5) uniq the list (get rid of duplicate addreses)
6) make the uniq'ed list biglist

Now a Cron job is set up and here's an example:

# The root crontab should be used to perform accounting data collection.
#
#    minute (0-59),
#    hour (0-23),
#    day of the month (1-31),
#    month of the year (1-12),
#    day of the week (0-6 with 0=Sunday).
#
# this runs daily at 04:00 

0 4 * * * /path/to/majordomo/makebiglist

This keeps the list fairly updated so most people will get the biglist
mailing

Last suggestion:

I mail to nobody and bcc to biglist so that no one will see that there
is a biglist. 

I hope that helps.


--Casey Hatch
"...downward, downward, shores of Pluto."  -N. Ogre


On Fri, Oct 03, 2003 at 11:32:06AM -0400, John Heffernan wrote:
> I could not find this in the FAQ or the Mailing Lists book from O'Reilly.
> 
> I have set up a number of non-intersecting lists for a large project and
> want to send mail occasionally to everyone.  I suppose I could do this in my
> address book by sending to the right project lists but can I create a nested
> list (my all list)?  What is the syntax for including other lists in the
> master list in the masterlist file (if this is even possible)...
> 
> Thanks for any help...
> 
> -- John Heffernan
> -- Educational Technology Consultant
> -- Hampshire Educational Collaborative
> -- 97 Hawley Street
> -- Northampton, MA 01060-2327
> -- 413.586.4900 x144 (tel)
> -- 413.586-0180 (fax)
> -- http://learn.collaborative.org/

--Casey Hatch
President: Z-Olite Inc.
phone: 435.563.1460
web: www.gvturf.com/z-olite


References:
  • Nested lists
    From: John Heffernan <jheffernan@collaborative.org>
Indexed By Date Previous: Majordomo and Qmail
From: "Vee Persaud" <Vee.Persaud@pwgsc.gc.ca>
Next: Re: Trouble with Hiding Majordomo Aliases in Sendmail
From: "Lance Prais" <lprais@ts.checkpoint.com>
Indexed By Thread Previous: Re: Nested lists
From: "Adam H. Kerman" <ahk@chinet.com>
Next: Majordomo and Qmail
From: "Vee Persaud" <Vee.Persaud@pwgsc.gc.ca>

Google
 
Search Internet Search www.greatcircle.com