Re: Moderating List via Web Interface - MHonArc RC file

1998-05-05 20:13:04

Try this out. It is a bit crude but could prove useful.


    This script was used with Selena Sols Form Processor public domain
script which is available from Using the
"feedback form" I collected applications to become a member of a mailing
list. I tweaked the response subroutine to write out all of the applicant
data to a file in a PENDING directory. The datafile was written as a perl
program so that I could run it from the command line or "require" it from
another script. 

 You could use this as the framework for building a posting approval web

  For instance, if you are the moderator it it likely that postings are
going to be sent to you. With procmail processing, you could copy each
posting to its own file in a PENDING area and use the script to display
each file for you.  Have the script resend approved posts to the proper

  Hopefully this should get you started. YMMV, script provided as is,

On Wed, 29 Apr 1998, Steven Clift wrote:

Greetings Majordomo-Users, ListMom, and MHonarc,

My ISP is building a majordomo based "online event" system for me with
Majordomo, Majorcool, and MHonArc.  So far so good, except that I need
one last piece a web-based mechanism to approve moderated posts.

I'd like to be able to review the posts waiting in the message que and
choose to approve, delete, or edit (maybe not a priority now) them all
via the web.  This way I can distribute the moderation among some
helpers and easily check in when I am frequently on the road.

Does anyone have a solution or some code available?

Also, can someone recap how to approve moderated bounces via 
e-mail in such a way that the original author appears to have sent the
message.  I know how to "force" approve a message with the additional
Subject: header under the approve command, but that won't do for my
online events (see: ).  I recall
being set up once to be able with Pine approve post to a 
moderated list with a "pipe" command - what do I need to ask for in 
order to get that set up as well?


Steven Clift

P.S. My web designer is also working with the MHonArc rc file to 
bring our sites look and feel into the archive.  Does anyone have 
some sample rc files they could send us?  We are particularly 
interest in versions that don't use tables and have taken 
accessibility issues into full consideration (they look good in Lynx 
etc.).  Our online event is on Universal Access to the Internet so we 
need to be accessible to all those online.

   Steven Clift - Public Strategies for the Online World
        3454 Fremont Ave S   T: +1.612.822.8667
        Mpls, MN 55408 USA   E: clift(_at_)publicus(_dot_)net
  Consulting and Home Page -            
  Democracies Online - 
  E-Mail for All -

% Anthony                                             
anthonyw(_at_)albany(_dot_)net  %
% "Tetris, an art of maximizing how well things fit together. I am a       %
% student of that art. I want  to explore and create things that coalesce" %
$| =1;     
use CGI;

$query = new CGI;

print $query->header;

$remote_host = $query->remote_addr();
if ( substr ($remote_host,0,12) ne "111.222.333.") { 
print "I do not trust you if you run from $remote_host";
exit ; }

print $query->start_html(-title=>'List Approval Script',
print "<H1> Applications Pending Approval </H1>";

# If called without any arguments generate list, otherwise process form.  
if ($query->param eq "" ) {
} else {

print $query->end_html;

sub GetPendingFiles {
   my($query) = @_;

   local ($filename,$name) ;
   local ($dir) = "./Path/to/Pending/files/";

$script_name = $query->script_name();

print qq~

<FORM METHOD="post" ACTION="$script_name">

 <td align=center>Approve ?</td>
 <td align=center>Applicant</td>

    opendir(DIR, $dir);
    @dirlist = readdir(DIR);

   open(TEMPLIST, ">./Temp/filelist.tmp");
   foreach $name (@dirlist) 
        if ($name =~ /\.myextension/)
                print TEMPLIST "./Data/Pending/$name\n"; 
                $Url = "<a href =\"";
                $Url .= "$name" ;
                $Url .= "\">";
                $Url .= "$name" ;
                $Url .= "</a>";
                print "<tr><td align = center>"; 
                print qq~
                <tr><td align = center>
                <input type= checkbox name= "approve" value="$name"></td>
                <td> $Url</td></tr>

   print "</table>\n<p>\n";
   print $query->submit("Process");
   print $query->endform;
sub ProcessApprovals {
   my($query) = @_;

   @values = $query->param('collect');

   foreach $key (@values){
   $scriptfile = "./Path/to/Pending/files";
   $scriptfile .= "$key";
   require "$scriptfile";
   open(TEMPLIST, "./Temp/filelist.tmp");
   @filelist = <TEMPLIST>; 
   foreach $file (@filelist){
     unlink ("$file");
   unlink ("./Temp/filelist.tmp");



sub email_admin {

   $to_email ="myaddress\(_at_)mydomain(_dot_)com";

   open (GETtheTIME, "-|") || exec "/usr/bin/date", $this_date;
   close GETtheTIME;

   $my_from_address ="administrator\(_at_)mydomain(_dot_)com";
   $the_subject ="The Officoal Mailing List as of $this_date";
   open(LISTDB, "./Data/Approved/mailinglist.dis");

    while (<LISTDB>) {
    $msg_body .= $_;

   require "./Library/";
              $the_subject, $msg_body);

              $the_subject, $msg_body);
<Prev in Thread] Current Thread [Next in Thread>
  • Re: Moderating List via Web Interface - MHonArc RC file, anthonyw <=