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: Tom Neff <tneff @ grassyhill . net>
Date: Tue, 17 Dec 2002 09:25:21 -0500
To: List Managers Mailing list <list-managers @ greatcircle . com>
In-reply-to: <Pine.BSF.4.44.0212171415120.60365-100000@kerberos.isdnet.net>
References: <Pine.BSF.4.44.0212171415120.60365-100000@kerberos.isdnet.net>

--On Tuesday, December 17, 2002 2:29 PM +0100 Serge Hartmann 
<serge@isdnet.net> wrote:
> asking cron to concatenate multiple files to write to the disk every five
> minutes - opposed to an integrated capability of majordomo, just reading
> files - seems really horrible to me.  :)

The answer depends on what you mean when you say you want to do this in 
Majordomo.

If you want to do it without modifying Majordomo at all, just using some 
clever configuration skills, then the only way I can see (besides your 
cron'd concatenation) would be to use a named pipe.  This "file" would 
always contain the full list of restrictees because you would have written 
a daemon process that feeds it.  But this is not very efficient, and if you 
have that much access to the machine, you can probably get at Majordomo as 
well. :)

If you or your admins want to change Majordomo to add the functionality 
you're asking for, try this patch.  It allows you to say in the config file

	restrict_post = @masterfile

and then the contents of "masterfile" (in the lists directory unless you 
override with an explicit /path) are read in and used as a list of mailing 
lists:

	mailing-list-1:mailing-list-2:mailing-list-3...

*** config_parse.pl.orig    Mon Oct 14 01:31:08 2002
--- config_parse.pl Tue Dec 17 09:16:38 2002
***************
*** 1167,1172 ****
--- 1167,1180 ----
  sub grab_restrict_post {
    local($list) = @_;
    local(@files) = ();
+
+   if ($list =~ m{^@(.*)}) {
+       local($f) = ( $1 =~ m@^/@ ? $1 : "$main'listdir/$1");
+       push(@errors, "Can't find restrict_post indirect file $f at line 
$.\n" )
+           unless -e $f;
+       $list = '';
+       open FILES,"<$f"; read FILES,$list,32767; close FILES;
+   }

          @files = split (/[:\s]+/, $list);
    foreach (@files) {




References:
Indexed By Date Previous: Re: files included into restrict_post files
From: "Steve Werby" <steve-lists@befriend.com>
Next: Re: files included into restrict_post files
From: Nick Simicich <njs@scifi.squawk.com>
Indexed By Thread Previous: Re: files included into restrict_post files
From: Serge Hartmann <serge@isdnet.net>
Next: Re: files included into restrict_post files
From: "Steve Werby" <steve-lists@befriend.com>

Google
 
Search Internet Search www.greatcircle.com