home *** CD-ROM | disk | FTP | other *** search
- WMServer 0.2 Beta - Mail server software for UUPC/Extended for OS/2
- -------------------------------------------------------------------
-
- Copyright Lars Olofsson 1994
-
- Index
- -----
-
- 1.0 Legal Stuff
- 1.1 Copyrights and Trademarks
- 1.2 Disclaimer
- 1.3 Distribution
- 1.4 Registration
- 1.5 Support and Feedback
-
- 2.0 Introduction
- 2.1 What is WMServer
- 2.2 Contents
- 2.3 History
- 2.4 To Do List
- 2.5 Known Bugs
- 2.6 Availability
- 2.7 Contacting the Author
-
- 3.0 Installation
- 3.1 Step-by-step
- 3.2 Running a server
-
- 4.0 Programs
- 4.1 WMServer
- 4.11 Fileserver Extension
- 4.12 Mailinglist Extension
- 4.13 Writing your own scripts
- 4.14 Security
- 4.2 WMSend
-
-
- 1.0 Legal Stuff
- ---------------
-
- Boring legal stuff which probably isn't necessary, but everyone
- has it, or so it seems.
-
-
- 1.1 Copyrights and Trademarks
- -----------------------------
-
- The WMServer programs and this documents is Copyright Lars Olofsson 1994
-
- All other names and products in this document is the copyright and/or
- trademarks of their respective creators.
-
-
- 1.2 Disclaimer
- --------------
-
- I, Lars Olofsson, takes no responsibility for any damages the use, or
- lack of use, of the WMail programs may result in. Use at your own risk.
- By using this software you accept this disclaimer.
-
- This software is not a complete stand alone product. It requires
- UUPC/Extended for OS/2 by other authors and an uuencode program.
-
- This software release is a BETA version, and is in no ways complete
- or bugfree. If you use this software, you are required to report any
- bugs you encounter.
-
-
- 1.3 Distribution
- ----------------
-
- This software is Shareware. You may freely distribute it, as long as
- the original archive is kept intact, and no modifications are made to
- the distributed archive. You may not charge anything for the distribution
- of this software, unless it is a fee not specifically for the WMail Package.
- Thus a BBS owner may charge his or her users a membership fee for the BBS,
- and Shareware distributors may sell a CD with this software included under
- the conditions mentioned above.
-
-
- 1.4 Registration
- ----------------
-
- This software is Shareware. You may use it for 30 days, after which you
- have to register if you wish to continue using it. The registration fee
- is USD 15 or SEK 100 (in Sweden) for a domain license. This license is
- valid for a single e-mail domain, as specified in the UUPCSYSRC file,
- and will be valid for all future versions of the WMServer package, up
- until version 2.0.
-
- This software is in no way crippled if you do not register. Unless you
- register, the 'X-Mailer' header in any email generated by this software
- will include 'Unregistered Version'. This is the only effect of not
- registering.
-
- To register send your registration fee to the adress below. You may send
- cash or a check drawn in a Swedish bank, payable to Lars Olofsson.
- I do not accept credit cards.
-
- Lars Olofsson
- Molndalsv. 39
- 412 63 Goteborg
- SWEDEN
-
- Phone: Nat 031-7739557
- Int +46-31-7739557
-
- To receive your registration code, you will have to send me an email
- at <larso@wmute.trillium.se> stating that you wish to register, and
- the domain you wish to register. Please don't send any money before
- you receive a reply from me.
-
- The registration code for your domain will be sent by email
- when I receive the payment. This code should be placed at the
- first line of a file called 'wmail.reg', which should be located
- in the directory specified by 'Confdir=' in the UUPCSYSRC file.
-
-
- 1.5 Support and Feedback
- ------------------------
-
- While WMServer is in beta, I'll give free support by e-mail
- to anyone using this software.
-
- When the first non-beta version is released I will provide free
- support by e-mail to any registered users of this software. This also
- includes anyone using the software for the 30 day trial period.
-
- Send any questions or comments to
-
- <larso@wmute.trillium.se>
-
- Please specify WMail as the subject of the letter, for quicker responses.
- If there seems to be some error in the programs, please send your UUPCUSRRC,
- UUPCSYSRC and WMFILTER.INI files,and the header of any letter that generated
- an error while being processed.
-
- Feedback of any kind is welcome from anyone.
-
-
-
- 2.0 Introduction
- ----------------
-
- Necessary readmes.
-
-
- 2.1 What is WMServer
- --------------------
-
- WMServer is a mailserver program, that executes REXX scripts.
- Included in this distribution is scripts for a simple fileserver, and for
- a mailinglist server. The user may create his own scripts to extend the
- available servers or create entirely new ones. The limit is the capacity
- of REXX. As a simple RMAIL interface for use in WMServer scripts a small
- program, WMSend, is also included.
-
- What does the WM stand for ? - WMail: a DLL for handling UUPC e-mail.
- What does the W in WMail stand for ? - Wish I knew.
-
- 2.2 Contents
- ------------
-
- The distribution archive, WMS02b4.ZIP, _should_ contain
- the following files:
-
- File Size Description
- ---- ---- -----------
-
- fileserv.zip 8683 The Fileserver REXX scripts
- listserv.zip 6586 The Listserver REXX scripts
- WMail.DLL 99360 The WMail DLL
- WMSend.exe 48528
- WMServer.exe 70032
- WMServer.doc 24927 This document.
- WMServer.txt 2223 Short description of WMServer
-
-
- 2.3 History
- -----------
-
- Ver 0.1beta WMServer Internal BETA.
- WMSend Internal BETA
-
-
- Ver 0.2beta WMServer Several small bugfixes.
- Fixed some bugs in the REXX scripts.
- Processing of commands now stop at
- 'END' or '--' instead of only '--'.
- Replies are slightly different, looking
- more like most mailservers do.
- Fixed daemon mode.
- WMSend Same as 0.1b
-
-
- 2.4 To Do List
- --------------
-
- Create an .INF document for this manual.
- Install/Config program
- Allow UNIX slashes in paths as an alternative to backslash
- Include a heading pointing to the mail text in user.rc
-
-
- 2.5 Known Bugs
- --------------
-
- None (yet). I have tested the software extensivly, and processed over
- 300 requests for files from different users worldwide. The listserver
- extension is still quite untested.
-
-
- 2.6 Availability
- ----------------
-
- I will continually make bufixes to this program while in Beta.
- These will be available from <fileserver@wmute.trillium.se> and
- will also be uploaded to the following FTP-sites, except during
- July 1994, when I have no FTP access:
-
- ftp-os2.cdrom.com
- ftp.luth.se
- ftp.informatik.tu-muenchen.de
-
- Please note that the DLL might be incompatible between different
- versions of the program, so always use the one distributed with
- the programs.
-
- The distributed code is 486 optimized, but if there is demand for it
- I might release a Pentium optimized program.
-
-
- 2.7 Contacting the Author
- -------------------------
-
- Any feedback is welcome. You may contact me in any of the following ways:
-
- E-mail: <larso@wmute.trillium.se>
- Snail-mail: Lars Olofsson
- Molndalsv. 39
- 412 63 Goteborg
- SWEDEN
- Phone: Nat 031-7739557
- Int +46-31-7739557
- Get PGP-key: <pgp-larso@wmute.trillium.se>
- URL: http://www.mdstud.chalmers.se:/~md2larso/
-
-
- E-mail is always the simplest and the cheapest way to contact me, and I
- read my mail at least once every day, so responses should be quite fast.
- (and seriously, anyone using this software should have e-mail :-) )
-
-
- 3.0 Installation
- ----------------
-
- These pages are intended as a step-by-step guide to installing this
- software. This is of course just one way to do it, and not necessarily
- the quickest or the best, but it works for me.
-
- You will not be able to get this software running without reading this
- fantastic manual.
-
- I will hopefully write an installation program, to simplify the setup,
- if there is demand for it.
-
-
- This is some relatively simple steps you have to take before configuring
- this software.
-
- Step One: Make sure that your installation of UUPC/Extended is correct.
- The WMServer only runs on systems that has UUPC/Extended for
- OS/2 installed.
-
- Step Two: Backup your system.
-
- Step Three: Copy both .exe (wmserver.exe and wmsend.exe) files supplied
- in this package to a directory specified by your PATH
- environment variable.
- A suitable place is where the UUPC/Extended executables
- are placed.
-
- For the each user that will run WMServer create a directory
- called 'wmail', located in the directory specified as
- Home in the users UUPCUSRRC file. This is where logging of
- any activity will be placed.
-
- Step Four: Copy WMAIL.DLL to a directory specified by your LIBPATH.
-
- Step Five: Edit your UUPCSYSRC and UUPCUSRRC files, so that any
- paths specified in those files contains '\' (backslash)
- instead of the UNIX compatible '/' (slash). No path should
- end with '\' or '/'.
-
- Make sure that the following entries exist in UUPCSYSRC:
- Domain, Maildir, MailExt, ConfDir, TempDir, Rmail, Organization.
-
- Make sure that the following entries exist in any UUPCUSRRC
- files for the user that will use the WMServer software:
- Mailbox,Name,Home,Signature.
-
- Step Six: If you intend to use the fileserver extension, create a directory,
- from now on reffered to as FILESERVDIR, and unzip the 'fileserv.zip'
- file into that directory.
-
- If you intend to use the listserver extension, create a directory,
- from now on reffered to as LISTSERVDIR, and unzip the 'listserv.zip'
- file into that directory.
-
- Step Seven: Fileserver: In the FILESERVDIR create a file called
- 'fileserver.ini', which should contain:
-
- FileDir=path
-
- where 'path' is the complete path to the root
- directory where any files available from the
- fileserver should be located.
-
- Listserver: In LISTSERVDIR create a file for each mailing
- list you wish to access through WMServer. Each file
- should be the name of the mailinglist used by
- WMServer commands, with the extension of '.lst'
- Such a file should look like:
-
- File=mailinglistfile
- Archive=archivefile
-
- where 'mailinglistfile' is the name of the file
- where adresses in the mailing list should be stored,
- and archivefile should be a file where old mail
- in the list should be stored.
-
- Step Eight: FileServer: Copy any files you wish to make available
- from the fileserver to the directory specified
- by the 'fileserver.ini' file, and create
- subdirectories if you wish to do so.
-
- Listserver: Edit the UUPC ALIASES file so that it will
- support your mailinglists as aliases. Please
- refer to the UUPC manual for this procedure.
-
- Step Nine: This step is described further in 'Running a server' below.
-
- For each server you wish to have running add WMServer to
- your startup folder if you wish to have it running in
- daemon mode, with the following arguments:
-
- wmserver -t time mailbox directory
-
- where 'time' is the interval in minutes between check for new mail
- to process, 'mailbox' is the complete path to the mailbox to
- process, and 'directory' is the complete path to the FILESERVDIR
- or the LISTSERVDIR.
-
- If you only wish to run wmserver when you have polled your
- UUCP host for mail add the following for each server you
- wish to support to the script you execute when polling.
-
- wmserver -o mailbox directory
-
- where 'mailbox' and 'directory' is the same as above.
-
- WMServer will execute for the user set by the environment
- variable UUPCUSRRC, so make sure that it is set to the
- correct user.
-
- Step Ten: Test your system.
-
-
- 3.2 Running a server
- --------------------
-
- To run WMServer, the program should be added to the .CMD
- file you execute when sending/receiving mail from your UUCP-host, or
- they should be run in the background in daemon mode.
-
- The latter method is more useful if you have a lot of local email,
- which requires processing all the time, while the former is recommended
- if all email is received from another domain.
-
- You should change the UUPCUSRRC environment variable to the correct user
- before executing WMServer. This is done using the command
-
- SET UUPCUSRRC=[path]\[rc file]
-
- To add executing of mailservers using WMServer to the script file, write
- something like:
-
- SET UUPCUSRRC=e:\uupc\daemon.rc
- wmserver -o e:\uupc\spool\mail\daemon.mbx e:\uupc\fileserv
-
- These commands should be placed _after_ the UUXQT program has been executed.
-
- The filename after the '-o' option is the mailbox which should be processed,
- and the path following that is the directory where the scripts that may
- be executed is located, together with any configuration files for that type
- of server.
-
- To execute WMServer in daemon mode, you should create a .CMD file
- inlcuding something like the follwoing and execute it:
-
- SET UUPCUSRRC=e:\uupc\daemon.rc
- wmserver -t 5 e:\uupc\spool\mail\daemon.mbx e:\uupc\fileserv
-
- where '5' is the time interval in minutes beween checks for new mail
- to process. If you wish to run several WMServer for different mailboxes
- from the same .CMD file, it could look something like:
-
- SET UUPCUSRRC=e:\uupc\daemon1.rc
- wmserver -t 5 e:\uupc\spool\mail\daemon1.mbx e:\uupc\fileserv
- SET UUPCUSRRC=e:\uupc\daemon2.rc
- wmserver -t 5 e:\uupc\spool\mail\daemon2.mbx e:\uupc\listserv
- .
- .
- .
-
- It is strongly recommended that you backup any mailboxes before any
- of the WMServer programs is executed, expecially while still configuring
- the system. If something goes wrong, you might lose e-mail otherwise.
- This could be done by adding the something like the following to your
- send/receive .CMD file before executing any WMail programs:
-
- copy e:\uupc\spool\mail\user.mbx e:\uupc\spool\mail\user.bak
-
-
- 4.0 Programs
- ------------
-
- This section describes the two programs supplied in the WMServer package.
-
- 4.1 WMServer
- ------------
-
- Usage: wmserver [-t time | -o] mailbox directory
-
- WMServer is a mailserver program, that will execute REXX scripts,
- placed in a particular path. Distributed in the WMail package
- is scripts for a fileserver and an email mailing list server.
- The administrator of the mailserver may extend or change these
- scripts, or write completly new ones, the only limit being the
- REXX language.
-
- Usage:
- -o Process the mailbox once and
- exit the program.
-
- -t time With this option specified
- instead of '-o' the mailbox
- is processed once every 'time'
- minutes, until aborted. This
- is reffered to as 'daemon mode'.
-
- mailbox This is the complete filename
- of the mailbox to be processed.
-
- directory This is the complete path
- to the directory where the REXX
- scripts to be executed are located.
- The script files should be copied
- to this directory.
-
-
-
- WMServer will treat each line in the body of a letter as a single
- command, and execute it from the command line. If a file with the
- name specified at the beginning of the line isn't found in the
- directory specified nothing will happen. Otherwise the command
- is executed. Anything written to standard output by the command
- file is included in the reply to the sender.
-
- If a line contains '..' '&&' '<' '>' or '|' it will be treated
- as an invalid command for security reasons.
-
- Processing of lines in the body of a letter will continue until
- the command 'END' or '--' is encountered,where the processing
- will stop.
-
- While a command is executed there will be a file 'user.ini' in
- the directory specified on the comamnd line, with these contents:
-
- From="Lars Olofsson" <larso@wmute.trillium.se>
- ReturnAdress=larso@wmute.trillium.se
- Date=Mon, 06 Jun 1994 12:28:59 CED
- Subject=GET scijokes.txt
- MsgId=<2df2fa6c.diziet@wmute.trillium.se>
-
- The 'From=' entry contains the complete 'From:' header in
- the letter being processed. 'ReturnAdress=' is where
- the reply should be sent. 'Date=' is the 'Date:' header
- in the letter. 'Subject=' is the subject of the letter.
- 'MsgId' is the id of the letter.
-
- This file might be used by the executed REXX script to get
- information on the user whose letter is being processed.
-
- It is important to note that you have to change hardrive to
- the drive where the scripts are located, or they might not
- work correctly.
-
-
- 4.1 Fileserver Extension
- ------------------------
-
- Please note that the fileserver extension supplied in this
- package requires an external uuencode program. The scripts
- are written for 'UUCODE' ver 1.01 by Timo Eronen <tke@utu.fi>,
- but you could rewrite the scripts to support another UUENCODE.
-
- The follwoing files are included in the fileserver extension
- to WMServer (fileserv.zip):
-
- help.cmd
- index.cmd
- dir.cmd
- get.cmd
- getf.cmd
- zview.cmd
- fileserver.ini
-
- The 'fileserver.ini' file contains a single entry:
-
- FileDir=directory
-
- where directory is the complete path to the directory
- where files available for request should be located.
-
- The 'help.cmd' file simply writes the fileserver help to
- standard output, which is piped back into the reply.
-
- The 'index.cmd' file types a file called index.txt to
- standard output, which is piped back into the reply.
- The 'index.txt' file should include a description of
- the files available for request from the fileserver, and
- any other information you might think of.
-
- 'dir.cmd' will produce a directory listing which is
- piped into the reply. this command will also take an
- argument, which might be the path to a directory located under
- the FileDir specified by the fileserver.ini file.
-
- 'get.cmd' will take one argument, which is a file located
- in the FileDir, and send it back to the adress specified in
- the 'user.ini' returnadress entry, using WMSend. If the file
- has an extension '.TXT' it won't be uuencoded, otherwise the
- file will be returned in uuencoded form.
-
- 'getf.cmd' is the same as get, but it will always uuencode
- the file being returned.
-
- 'zview.cmd' will take one argument, and will display the contents
- of a .ZIP file. This requires the use of a unzip program.
-
- Please view the contents of these REXX scripts for a deeper
- understanding of their function.
-
- The body of a sample letter might look like:
-
- HELP
- DIR
- DIR wmail
- GET wmail\wm48602.zip
- index
- ZvIeW wmAil\wm48602.zip
- END
-
- These are all valid commands (at the filserver reachable as
- <filserver@wmute.trillium.se>, where you might request the
- WMail package). There is no case sensitivity and please note
- that paths should use the DOS or OS/2 backslash instead of
- the UNIX slash.
-
-
- 4.12 Mailinglist Extension
- --------------------------
-
- The following files are included in the mailinglist extension
- of WMServer (listserv.zip):
-
- help.cmd
- subscribe.cmd
- unsubscribe.cmd
- mailbox.cmd
- wmail.lst
-
- The 'wmserver.lst' is a sample of a mailing list definition file (.lst),
- an should contains the following:
-
- File=e:\uupc\wmslist
- Archive=e:\uupc\wmsllst.mbx
-
- The 'File=' entry is the complete filename of the mailing list
- file, where all the adresses on the mailing list are stored.
- The 'Archive=' entry is where old email for the mailinglist should
- be stored.
-
- One mailing list definition file should be created for each
- mailing list available on your mailing list server. The name
- of the mailing list, that should be specified in commands is the
- name of mailing list definition file, without the extension.
-
- The 'help.cmd' file simply writes the listserver help to standard
- output, which is piped back into the reply letter.
-
- The 'subscribe.cmd' file takes one argument which is the name of
- a mailing list, and adds the return adress to that list.
-
- The 'unsubscribe.cmd' command file takes one argument which is
- the name of a mailing list, and removes the return adress from
- that list.
-
- The 'mailbox.cmd' sends all old letters, that are stored in a file
- as specified by the 'Archive=' entry in the mailing list definition
- file. Please note that adding letters to that file is out of the
- scope of the WMail package, but is easily accomplished by adding
- the file name to the mailing list alias, as specified in the
- UUPC ALIASES file.
-
-
- 4.13 Writing your own scripts
- -----------------------------
-
- You may alter the scripts supplied in this package as long as
- you keep the copyright notice, and add your name and the
- date of the modification.
-
- You may also freely create new REXX scripts. I intend to keep
- those available at <fileserver@wmute.trillium.se>, so if you
- do create your own, please email them to me at <larso@wmute.trillium.se>
- and I'll make them available at the fileserver. Your own scripts will
- not be distributed with the WMServer package, although you may distribute
- them yourselves, such as by the fileserver mentioned above.
-
- When writing your own scripts, please bear in mind the security
- aspect. Commands should only accept the correct number of arguments,
- and should not be able to access anything unwanted on your harddrive,
- or any unwanted commands. Although it is quite possible to make a script
- RUN that simply takes all arguments and executes them as a OS/2
- command line, it is not recommended.
-
- Since REXX may be used for almost anything, such as database access,
- there are almost no limits to what kind of script you could create.
-
- To get user information for your scripts, the file 'user.ini' is
- created in the directory specified when WMServer was invoked. That
- is the same directory as the one where the scripts should be
- located.
-
- If you wish to send a file separately from the reply letter,
- use the WMSend program.
-
- Make sure that all your scripts terminates. There is no way for
- WMServer to check this, so you have to make sure that they do
- yourself.
-
- If you intend to write your own scripts, please take a look
- at those distributed in the WMail package. Consider them examples
- of what is possible.
-
-
- 4.14 Security
- -------------
-
- Since there is no file security in OS/2, you have to be careful
- when creating new scripts. The scripts supplied in the WMail
- package is secure so far, but I make no guarantees, and I take
- no responsibility for whatever effect the use of WMServer might
- result in.
-
- Never place any other executable files or script files in the
- directory where the scripts are located. If you do, those
- files might be executed when processing a letter, if the
- name of the executable appears at the beginning of a line
- in the letter.
-
- If a line to be executed contains '..' '&&' '<' '>' or '|'
- WMServer will send an error message instead of executing
- the command.
-
-
- 4.2 WMSend
- ----------
-
- Usage: wmsend file [-s subject] destination
-
- WMSend is a simple UUPC RMAIL interface. It is recommended that
- it is used together with any WMServer scripts.
-
- Usage: file This is the name of the file to send.
-
- -s subject If this option is specified, subject
- will be the subject fo the letter.
-
- destination This is the adress(es) to send the
- letter to. Any number of adresses
- may be specified, up to the length
- of the OS/2 command line.
-
- WMSend simply invokes the UUPC RMAIL program.