root | --> | listmaster |
listmaster | --> | listowner |
listowner | --> | list members |
If you're the listmaster, you'll also want a set of tools that allow to deal with routine tasks (list creation/deletion/etc.) and problems with a minimum of effort.
Lets set a few x-windows for a working environment:
xterm -sb -sl 2400 -title Root_Account xterm -sb -sl 2400 -title Majordom_Account xterm -sb -sl 2400 -title Majordom_Mailsu down to the majordom account in the two Majordom windows:
su majordomYou can kill any any un-needed windows by holding down the control key and clicking the left mouse button - then scroll down to quit. If you want to save your exiting windows, minimize them to free up screen space.
cp md-apps.tar.gz /home/majordom/. cd /home/majordom gunzip md-apps.tar.gz tar -xvf md-apps.tar cd applicationsThis will create a sub-directory called applications which includes a number of perl scripts and some web interface related files (*.html & *.cgi). You will find a short menu of these files in applications/README.MD-APPS. This set of scripts & web files does the following: - Allows users who want to create a new list or digest to request such a list by filing out a web based form. (new-app.html & newapply.cgi)
At this point the listmaster edits the aliases.majordomo file by hand & runs newaliases
- Completes the process of activating the list and enters the list information in a local web page (listlist).
There are additional web resourses and scripts to create a digest for an existing list and to allow an owner to request the deletion of a list as well as a number of small tools that aid in dealing with common problems.
This set of scripts were developed at the Univesity of Oregon by a former listmaster (Rich Haller) to allow users to submit a list request via the web and have the process of list creation semi-automated.
The process takes several steps - and some of the conditions here are particular to the way lists are managed at UO - but this will give you an idea of how easy it is to customize your majordomo management tasks using perl.
Before we can request a list and process the input, we need to modify some values in the applications files and we'll need to move the web files to a public_html directory. I've provided a dummy host name (machine.host.tld) which occurs in many of the files
grep machine.host *You'll want to change all of these - and we'll use a quick perl one-liner to do this in the root window: (replace the _ with your machine number)
perl -i.bak -p -e 's#machine\.host\.tld#t1-user_\.t1\.ws\.afnog\.org#g' *This one-liner runs at the command line and it will create a back up copy of all the files - we'll want to move these to a sub-directory so do the following:
mkdir backup mv *.bak backup/.If you run grep again, you shouldn't find any files that contain machine.host.tld but you should see a long list that contain t1-user. Now - make majordom the owner and allow majordom to execute the files
chown majordom:majordom * chmod u+x *create a public_html and a public_html/cgi-bin directoy for the majordom account if needed, and set the permissions for these directories:
mkdir /home/majordom/public_html mkdir /home/majordom/public_html/cgi-bin chmod a+rx /home/majordom/public_html chmod a+rx /home/majordom/public_html/cgi-binand then move the html and cgi files as needed:
mv *.html ../public_html/. mv *.cgi ../public_html/cgi-bin/. chmod a+x /home/majordom/public_html/cgi-bin/*Now we'll start the apache web server and try out the scripts:
/usr/local/sbin/apachectl start lynx http://t1-user_.t1.ws.afnog.org/~majordom/newap.html
The form
the cgi script
The listmaster email
Fill out the form - and submit
You'll need to open pine as majordom and pipe the email message to the mklist perl scripts using Pine
(| /home/majordom/applications/mklist)
If pine is not configured to allow pipes, go the main menu, select set-up -> configure -> scroll down to [ ]enable pipe commands and put an x inside the brackets - exit and save your settings.
This process should result in a second email to listmaster and the creation of 4 files in the lists directory:
-rw-rw---- 1 majordom majordom 1366 Sep 16 13:32 test-list.config -rw-rw-r-- 1 majordom majordom 467 Sep 16 13:32 test-list.info -rw-rw---- 1 majordom majordom 6 Sep 16 13:32 test-list.passwd -rw-rw-r-- 1 majordom majordom 62 Sep 16 13:32 test-list.pending
Why you might want manual intervention Day-to-day utilities (standard tasks) Trouble shooting & standard problems Manage your List Owners - not their lists List owner list (listowners script) Small Tools (Unique a list, etc...)
Majordomo Workers List Archives (searchable)
http://www.hpc.uh.edu/majordomo-workers/
Subscribe to the list by sending email to:
majordomo-workers-request@greatcircle.com
using the command: subscribe majordomo-workers