Steward -- A Mailing List Server in Rexx by Paul Hethmon

Here's some basic info on how Steward works.

Steward is modeled after the Unix Majordomo mailing list
software. It's not dependent on sendmail to do the bulk
of its processing though. If you've used Majordomo before,
then you'll find Steward very similar in configuration.
The big difference is that the alias file changes are not
necessary. The only thing you'll need to define are the mailing
accounts you want Steward to receive mail at. These can be
actual accounts or aliases as long as a couple of things
hold true.

The first is that Steward expects two command line arguments
passed to it. The first is the username the mail was delivered
to. This could be a list name or the administration name (usually
Steward). The second argument expected is a filename where the
mail message can be found. This should be a temporary file. Steward
will delete it when it's done.

Steward requires you to define one environment variable: STEWARD_CF.
Steward looks for this environment variable to find out where its
configuration file lives. The configuration file must be called
"steward.cf". The example configuration file is fairly self
explanatory. Each list also requires a configuration file called
"listname.cf" where "listname" is the name of the list.

Please also note that Steward * REQUIRES * HPFS at present. It could
be made to work with short filenames, but that is left to the individual
user. I highly recommend HPFS. As part of this requirement, the directory
indicated by your TMP environment variable *must* be on an HPFS drive
also. Steward will not work with the TMP directory on a FAT partition.

You may specify a temporary directory just for Steward that is on an
HPFS volume by setting the environment variable STEWARD_TMP. Steward
will use this variable if it is defined. If not, it will use the
TMP value.

The basic file tree necessary to run Steward was created when you
unzipped the archive. The lists live in a subdirectory of the
Steward home directory called "Lists". Inside this directory you must
create a directory the same name as the list you're creating. Inside
that directory, create the listname.cf configuration file. The location
of the "Lists" directory may be specified in the steward.cf file.

You must also put four rexx scripts "lockopen.cmd", "lockclose.cmd",
"lock.cmd", and "unlock.cmd" somewhere on your path. Steward needs 
access to these scripts before it finds its home directory. You may 
either put them in a directory already in your path statement or add
the Steward directory to your path statement in the config.sys
file (You must reboot if you do this for it to take effect). These
scripts are placed in the "inetmail\bin" directory by the Inet.Mail
install program. If you selected to have the install program update
the config.sys file, then the "inetmail\bin" directory was added
to the PATH statement and Steward will be able to find the scripts
it needs.

In order to send mail, Steward needs a mailing program to send on
its behalf. As configured, Steward will send mail by starting the
program listed in the "mailer" variable. It will pass to it 3 arguments.
The first is the name to be used as the FROM name during the SMTP
connection. The second is a file containing a list of email addresses
to send mail to, one per line. The third is the message file to send.

// ------------------------------------------------------------------

The Basic Configuration Steps

1. Unzip the steward archive to a directory of your choice.
2. Add the statement:

     SET STEWARD_CF=c:\steward

   to your config.sys file. The directory "c:\steward" should
   be replaced with the directory from step 1.
3. Modify the steward.cf file as necessary. It is self-explanatory.
4. Create two email accounts:

     Steward
     Steward-owner

   Both should be set up to call the Steward.cmd file when
   mail is received. Steward expects two arguments, the username 
   the message is for and a temporary filename containing the 
   message. Steward will always delete the temporary file after 
   processing it.
5. Place the following programs and rexx scripts somewhere on your
   path:

     HMailer.exe
     lockopen.cmd
     lockclose.cmd
     lock.cmd
     unlock.cmd

   Alternately, the steward directory may be placed on the path
   statement in the config.sys file.
6. Reboot your machine to have the config.sys file changes take effect.
7. Create lists as needed.


// ------------------------------------------------------------------

How to Set Up a List

To create a list, you need to do a few things. First, create 3 email
accounts. They will be (substituting your listname for "list")

  list           For messages
  list-request   Admin requests for this list
  list-owner     For requests sent to the list owner (and error messages)

The list-request address is not required. If it is not present, then users
will need to send all admin requests to the steward address.

Each of these accounts should have Steward listed as the local process
delivery agent. Steward will figure out who the mail message is to. You
should already have a "steward" email account configured to start Steward
as the local process delivery.

Now, in the ListDir directory as specified in the steward.cf file, create
a directory with the name "list" (substituting your listname). In it, create
with a text editor a "list.cf" configuration file. Use the sample one included
for a model. Most fields should be self-explanatory.

In order to archive a list, create a sub-directory off of the list directory
called "Archives" and set the DoArchive flag to 1 in the "list.cf" file.
Archives are stored on a monthly basis. Each month will have it's own file
in the archives directory of the form "YY.MM" where YY is the 2 digit year
and MM is the two digit month. New messages are appended to the end of the
file with a separator line between.

You may also create a file in the list directory named "list.info" (again
substituting your listname) which will be sent in response to a list command
if the list is advertised.

Now you're ready. Steward will create the file with the list email addresses
in it as necessary.

// ------------------------------------------------------------------

What About a Moderated List?

Steward supports a moderated list also. Just set the Moderated flag
to 1 in the "list.cf" file for your list. Then set the ApprovePassword
to whatever password you like.

When Steward receives a message for that list, it will forward it to
the ListOwner address in the "list.cf" file. This address should be a
standard Internet email address of the form "username@host.domain". There
should be no quotes, parenthesis, or anything else on the line. Steward
will pull the senders name, subject, and reply-to addresses out of
the original message and put them at the top of the message to the ListOwner
for reference. It will also add the "Approved:" heading as the first line
for you to add your password to.

*** IMPORTANT ***
The "Approved:" heading must be on the first non-blank line of
the message body or the message will be forwarded again to the ListOwner.

When an approved message does come in, Steward will strip the approved
password and header from the outgoing message.

// ------------------------------------------------------------------

What about Digests?

Digests are supported and simple to set up. In your list directory, just
create a sub-directory called "Digests" and modify the "list.cf" file
to have "DoDigest = 1". That's all there is to it.

Steward maintains a separate subscription list for the digest. It is 
possible to subscribe to both the regular list and the digest. Any message
sent to the list will be saved in the digest for the day.

In order to help support the digest function, it's recommended you create
an additional email account called "list-digest". Messages to this account
will be echoed to both the regular list and the digest list. The account
is not necessary, but some folks expect digests to have an address of this
sort. Remember to have Steward listed as the local process agent.

Digests are maintained on a daily basis. Each 24 hour period is saved to
its own file. On a daily basis, the "digest.cmd" rexx script needs to be
run to send out the digest. Whenever it is run, it will send the digest
for the *previous* day. The usual way to do this is to have the digest sent
out at 1:00 am or 2:00 am local time for the previous days messages. You can
set the digest.cmd to be run as a result of a "cron" job or any other program
that can schedule jobs to be run at arbritrary times. 

A simple rexx script called "SendDigest.cmd" is included to send out the 
digest at 1:00 am each day. This script must be started in the Steward
home directory and will continue to run until you kill it. Most of the time,
it is in a sleeping state, so no cpu cycles are wasted. You may also want
to put a program object pointing to this script in your startup folder in case
your machine reboots.

When the "digest.cmd" script is run, it expects one command line
argument, the name of the digest to send. The name should be of the
form "list-digest". It must be run once for each digest you wish to
send out.

Several configuration options pertaining to lists are supported and
are documented in the per-list configuration file. They should be
self-explanatory.

// ------------------------------------------------------------------

Working with Hethmon Brothers Inet.Mail for OS/2

Steward comes configured to work with Inet.Mail for OS/2. Just
create the appropriate accounts (Steward, etc) as users and then
put the steward.cmd pathname as the local process delivery option.
Maild will then start Steward with the correct arguments.

For Steward to deliver mail, Inet.Mail supplies a simple mail
forwarding program called HMailer.exe. This program should be located
in a directory on your PATH (as defined in the config.sys). Alternately,
you can put the full pathname in the steward.cf file. Hmailer will forward
the mail to the SMTP daemon on the machine it is running on. This means
Inet.Mail must be running (which shouldn't be a problem, it has to be
running to start Steward anyway).

// ------------------------------------------------------------------

Other Caveats

Steward is written in Rexx. Anything you want to change can be
accomplished easily.

Steward requires HPFS.

Remote configuration is not yet supported.



