Great Circle Associates List-Managers
(December 2002)
 

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

Subject: Re: files included into restrict_post files
From: "Steve Werby" <steve-lists @ befriend . com>
Organization: Befriend Internet Services LLC
Date: Tue, 17 Dec 2002 09:10:31 -0500
To: <list-managers @ greatcircle . com>
References: <Pine.BSF.4.44.0212171212410.60365-100000@kerberos.isdnet.net>

"Serge Hartmann" <serge@isdnet.net> wrote:
> I manage today 9 mailing-lists with majordomo 1.94.5
>
> 7 of these mailing-lists have common restriction post policies : every
> email address subscribed in these 7 lists + another "friend" list is
> authorized to post here.

Serge, have you considered adding a pipe for the majordomo alias to Sendmail
(or whartever MTA you're running) to add and delete users from a master text
file?  Then it will occur in realtime and you'd just have to pipe to a small
script.

> one solution would be to call a script each 5 minutes from the crontab,
> sounds like : cat (my files) | sort -u > my-lists.restrict
> but this is very ugly...

You might want to pipe through uniq as well if you go that route and there
can be duplicates across the files.  Also, if you are going to run a script
every X minutes there's no benefit in regenerating the master file if the
other files haven't changed.  So you might want to check their timestamps by
doing something like:

for FILE in `find . -mmin -5 -type f`
do
    lockfile out.lock
    cat | sort | uniq > out
    rm -f out.lock
done

Note that the above is pseudo-code and "find" will definitely need more
parameters to only check your subscriber lists.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/




References:
Indexed By Date Previous: Re: files included into restrict_post files
From: Serge Hartmann <serge@isdnet.net>
Next: Re: files included into restrict_post files
From: Tom Neff <tneff@grassyhill.net>
Indexed By Thread Previous: Re: files included into restrict_post files
From: Tom Neff <tneff@grassyhill.net>
Next: Re: files included into restrict_post files
From: Nick Simicich <njs@scifi.squawk.com>

Google
 
Search Internet Search www.greatcircle.com