LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Paul Russell <[log in to unmask]>
Tue, 20 Nov 2001 12:55:23 -0500
text/plain (55 lines)
On Mon, 19 Nov 2001, Jacob Haller <[log in to unmask]> wrote:
>>Is there a command that returns all of the lists that a particular e-mail
>>address has "Owner" privileges to?
...
>I believe that the next version of LISTSERV is expected to have a
>"LISTS OWNED BY email@address" command which would allow a site admin
>to get the list of lists owned by a given address.  However, that's
>not implemented in 1.8d.

In the interim, the following perl script might meet your needs.

--
Paul Russell
Senior System Administrator
University of Notre Dame


----- 8< cut here >8 -----
#!/usr/local/bin/perl5 -w

$count = @ARGV;

if ( $count != 1 ) {
        print STDOUT "$0 cancelled - missing or invalid argument: @ARGV\n";
        print STDOUT "Correct syntax: $0 listowner-email-address";
        exit;
}

($#ARGV < 0 ) and die "Usage: $0 <email-address-of-owner-to-find-in-lists>\n";

$home_dir="/usr/products/listserv/home";

chdir $home_dir;

opendir(DIR,".") or die "Unable to open listserv directory: $!";

@files=grep (/.*\.list$/,readdir(DIR));

closedir(DIR);

print "Searching for lists owned by $ARGV[0]\n";

foreach $filename ( @files ) {
        open (CUR,$filename) or
                die "Unable to open $home_dir/$filename\n";
        while ( <CUR> ) {
                (/Owner=[^*]*$ARGV[0]/io)
                and print "$filename\n";
        }
        close CUR;
}

exit;
----- 8< cut here >8 -----

ATOM RSS1 RSS2