Great Circle Associates Majordomo-Users
(February 1997)
 

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

Subject: making web interactive with majordomo
From: Patrick Fitzgerald <fitz @ iquest . com>
Date: Fri, 14 Feb 1997 16:45:05 -0500
To: Majordomo Users Mailing List <majordomo-users @ GreatCircle . com>

I'm working on some enhancements to MailServ
(http://iquest.com/~fitz/www/mailserv/) to make it interface with majordomo
instead of just sending e-mail commands.  Obviously, this is possible only
when majordomo is running on the same system as the web server.  I would
like some feedback about my implementation.

First, it requires a minor addition to the majordomo script.  Find the line
like this:
	&sendmail(REPLY, $reply_to, "Majordomo results$sub_addin");

and put a couple lines around it:
	&set_mailer($reply_mailer) if $reply_mailer;
	&sendmail(REPLY, $reply_to, "Majordomo results$sub_addin");
	&set_mailer($bounce_mailer) if $reply_mailer;

This changes the mailer program that majordomo uses to send results to the 
user. $reply_mailer is not defined anywhere, so the change has no 
effect on normal majordomo operation.

Next, make a copy of majordomo.cf, and name it majordomo-stdout.cf.  Edit
the new file and add the following line:
	$reply_mailer = "/path/strip_header -bogus -args";

strip_header is a simple perl script that strips off the initial mail
headers, then prints the message body to STDOUT.  The bogus args are
ignored - they exist only because majordomo complains if you don't give
arguments to the mailer program.

Within the mailserv script, instead of sending an email message to the
majordomo address, I pipe the message (headers and all) into a command like:

	/path/wrapper majordomo -C majordomo-stdout.cf

Then I retrieve the output and display it to the user.

This technique seems to work quite well, but I would appreciate any
comments and suggestions before I start using it.

-- 
   ________
  / _____  )   Patrick Fitzgerald     Atlanta, GA
 / ___) / /__  fitz@iquest.com        http://iquest.com/~fitz/
(_/  it(_____) webmaster@csicop.org   http://www.csicop.org/


Indexed By Date Previous: Re: CGI script for Majordomo
From: Dave Regan <regan@ao.com>
Next: Supressing Posting by Subscribers
From: Monica Khurana <c680349@everest.cclabs.missouri.edu>
Indexed By Thread Previous: Re: Suppressing Posting by subscribers
From: Virtual Joe <jduche@creighton.edu>
Next: Supressing Posting by Subscribers
From: Monica Khurana <c680349@everest.cclabs.missouri.edu>

Google
 
Search Internet Search www.greatcircle.com