[prev in list] [next in list] [prev in thread] [next in thread] 

List:       majordomo-workers
Subject:    proposal: Web-based moderator Approval method
From:       Bill Houle <Bill.Houle () SanDiegoCA ! NCR ! COM>
Date:       1998-01-22 4:25:30
[Download RAW message or body]

I mentioned the other day that I had a Web-based Approval hook between
Majordomo 1.94.4 and MajorCool. Before I post the patch, I thought I'd
share some psuedocode to see if it meets requirements (assuming someone has
any). I want to make it seamless to Majordomo, completely optional, and
nothing resembling too gross a hack. And there's no reason for it to be
MajorCool specific. (So if Patrick is listening and wants to use this in
MailServ....)

It works real well right now, but if anyone has any
architectural/procedural suggestions, I'll take 'em.

All the changes are in resend, plus 2 new keywords in config_parse. The
keywords are:

bounce_action = mail|store|mail+store

bounce_text << END
END

bounce_text is null by default. It can be used to give how-to instructions
such as the URL for Web approval, or the step-by-step for mail-based
approval. Any use of bounce_text will break the UNIX approve script, so
this is mainly targetted for the PC mail users.

bounce_action specifies how the BOUNCE is to be processed. "mail" will be
the default and send to the moderator via mail as usual; "store" will save
on local server disk; the combo does both.


Here's the framework. All of the action takes place in the send_bounce
function which does the redirect of the mail.

    open BOUNCE handle (mail to moderator)
    set default action=mail if not already set
    if (/store/) {
        set bouncedir to $filedir area if exists; $TMPDIR for fallback
        create unique suffix from Message-ID
          (filedir filename will be $dir/bounce.$id)
          (TMPDIR filename will be $dir/$list.bounce.$id)
        use process id if file.$id already exists
        open the STORE file
    }

    if bounce_text defined
        print msg to BOUNCE
    elsif no mail action at all
        print default msg to BOUNCE
          (gotta say *something* via mail)

    while (<IN>) {
        print STORE if /store/
        print BOUNCE if /mail/
    }
    close all files
    delete input file

There is also corresponding code in Approval cleanup to delete the
server-side copy if the mail-based Approval method was used.


Are the keyword names OK? I know "bounce" is not the most appropriate name,
but after all, that it the terminology used throughout the code and Docs.

Is the choice of $filedir (and $TMPDIR) OK? One of the advantages of using
$filedir: set action=store and you can still retrieve the posting via GET
for subsequent mail-based Approval.

I'd like each list to have its own configurable bounce_dir, but that sort
of falls into the same category of the list config's archive_dir at the
moment. $filedir/$list$suffix is the most universal compromise for right now.


If no significant changes, I'll post a patch soon. And since this is fairly
useless without a Web tool to exercise it, I'll have a beta MajorCool
available as well.


--bill

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic