                         ___    ___     _    _  ______ ___
                        /   \  /   \   / \  / \   /   /   \
                       / ___/  \__    /   \/  /  /   / ___/
                      /    \      \  /       /  /   /
                      \____/ \____/ /       /  /   /

                      Batch Simple Mail Transfer Protocol


    BSMTP Release 0.14
    BSMTP(c)Copyright 1991 Cyvaned Systems, All Rights Reserved.
    BSMTP(c)Copyright 1991 Ralf S. Engelschall, All Rights Reserved.



                                  DISTRIBUTION

      This  material  is  neither  freeware nor shareware nor public domain.
    It's  copyrighted because it was developed for own usage only but may be
    freely destributed to help the Amiga community as long as no changes are
    made  in  the  whole material and no charge is made for the distribution
    except for magnetic media, mailing materials and postage.


                                   DISCLAIMER

      THE  AUTHOR  MAKES  NO  WARRANTIES,  EITHER EXPRESSED OR IMPLIED, WITH
    RESPECT  TO  THE  MATERIAL  DESCRIBED  HEREIN, ITS QUALITY, PERFORMANCE,
    MERCHANTABILITY,  OR  FITNESS FOR ANY PARTICULAR PURPOSE.  THIS MATERIAL
    IS  PROVIDED  "AS  IS"  AND  THE  ENTIRE  RISK  AS  TO  ITS  QUALITY AND
    PERFORMANCE IS WITH THE USER.  IN NO EVENT WILL THE AUTHOR BE LIABLE FOR
    ANY  GENERAL  OR SPECIAL DAMAGES, INCLUDING DIRECT, INDIRECT, INCIDENTAL
    OR  CONSEQUENTIAL  DAMAGES  RESULTING  FROM  THE  USE  OF  THIS  PROGRAM
    (INCLUDING  BUT  NOT  LIMITED  TO  LOSS  OF  DATA OR DATA BEING RENDERED
    INACCURATE  OR  LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
    THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS).


                                RIGHTS RESERVED

      THE  AUTHOR  RESERVES  THE RIGHT TO MAKE CHANGES IN THE WHOLE MATERIAL
    IDENTIFIED  IN  THIS  PUPLICATION WITHOUT NOTICE AND TO DISTRIBUTE OTHER
    REVISIONS UNDER DIFFERENT LICENCE STATEMENTS AND/OR CONDITIONS.


                                      NOTE

      Please  excuse  my  uneven  english, because it's my foreign language.
    But  writing  this  documentation in german would decrease the number of
    people  who  can  understand  the  function  of BSMTP  and I hate german
    descriptions   of   international   spreaded  material  because  of  the
    non-technical character of my native language.  Thanks in advance!


                                     ABOUT

      To give you short introduction to the BSMTP philosophy listen to E.
    Alan Crosswell:

    |  [...]
    |
    |   SMTP  [1]  is  an  interactive protocol that defines a transaction
    | between two mail transport servers.  One is defined to be the sender
    | and the other the recipient.
    |
    |             1      2
    |   Using RSCS , UUCP , or any other store-and-forward transfer system
    | where  a  _file_  is the smallest unit of transmission it is clearly
    | impossible  to  maintain  such  a full-duplex transaction.  In RSCS,
    | only  files  may be used to communicate between service machines and
    | no  guarantee  can  be made of the order of arrival of one file with
    | respect  to another.  Also, communication with other than VM systems
    | is  required.   Systems  connected  via  HASP SML, NJE/NJI and other
    | links exist (MVS, Unix, Tops-20, etc.).
    |
    |   Why then should SMTP be used?  Maybe it shouldn't.  However, since
    | ARPA  supports  it,  it  will  be well defined and understood by the
    | largest  internet.   Also,  it  seems  relatively straightforward to
    | create programs that will take a Batch SMTP (BSMTP) file and pass it
    | to a SMTP system, simulating a real SMTP hookup.
    |
    | [...]
    | _______________
    |  1
    |   IBM VM/370 Remote Spooling Communications Subsystem
    |  2
    |   Unix to Unix Communication Program

            [quoted from:  Batch Simple Mail Transfer Protocol, E.  Alan
            Crosswell, Columbia University Center for Computing Activities,
            13 September 1982]

      As  you  see,  BSMTP is a mutation of a common mail transfer protocol.
    The  UNIX  SMail  3.1.xx  users are mostly familiar with this feature of
    interchanging mails because their SMail program supports BSMTP.  But the
    sendmail  command  of  AmigaUUCP V1.15D by Matthew Dillon (which we use)
    doesn't!   I  read  that  the  sendmail replacement by Kai Siering would
    support  BSMTP, but we needn't this sendmail version because Dillons one
    is  good  enough for the most of the jobs occuring on our Amiga Leafsite
    systems.

      Because  I like the BSMTP feature, I started writing a own BSMTP layer
    for  our  AmigaUUCP  package after I had read the public SMTP definition
    (RFC821), E.  Alan Crosswells paper and some interdependend papers.  You
    should  be  informed that the spool-and-forward protocol BSMTP is only a
    tiny  subset  of  the  interactive  SMTP protocol.  so, notice that this
    BSMTP package doesn't provide you with a full SMTP layer!

    But this BSMTP package was written with the eyes on RFC821:

    |       4.5.1.  MINIMUM IMPLEMENTATION
    |
    |          In order to make SMTP workable, the following minimum
    |          implementation is required for all receivers:
    |
    |             COMMANDS -- HELO
    |                         MAIL
    |                         RCPT
    |                         DATA
    |                         RSET
    |                         NOOP
    |                         QUIT

        [quoted from:  Request for Comments (RFC) 821:  Postel, J.B.  Simple
        Mail Transfer Protocol.  1982 August]

      But this BSMTP package provided you with the ability to send mails via
    'Batch  Simple  Mail  Transfer  Protocol'  (BSTMP) instead of the normal
    spool  method of one local command file, one remote envelop file and one
    data  file  per  mail.   This  results  in  a great advantage because it
    decreases  the  UUCP  protocol  overhead  and  lets you send the data in
    compressed form.


                                  REQUIREMENTS

      BSMTP is written for the transport layer of AmigaUUCP and requires the
    UUX  command  to  perform its job.  Make sure it can find this.  It also
    needs  a  COMPRESS  command which compresses a file XX to XX.Z if called
    via  "compress XX" (used by BSMTP command) and which decompresses a file
    XX.Z  to  XX  if  called  via  "compress  -d  <XX.Z  >XX" (used by RSMTP
    command).   Make sure that it can find such a command too.  If you don't
    have  already  such  a  command  on  your  system you should install the
    compress command which will be distributed with this material.


                                  INSTALLATION

      First  copy  the  commands  SSMTP, BSMTP, RSMTP, RCSMTP to your UUBIN:
    directory or any other place in your DOS search path.  Also replace your
    UUXQT   command   with   our  patched  one.   Then  make  the  directory
    uumail:smtp.queue/  and  one subdir per system in that dir.  For example
    if  you  want  to  use  the  BSMTP  package  for  your connected systems
    'schrimsi'  and  'gichtel' make the dirs uumail:smtp.queue/schrimsi/ and
    uumail:smtp.queue/schrimsi/.

      Second  inform  the  sysops  of  these  systems  that they _can_ (they
    needn't, because your old transport mechanism will work too!) send mails
    to your system via normal or compressed BSMTP.


                                     USAGE

      The  only thing you had to do is to respool all mails in your UUSPOOL:
    directory from time to time via `SSMTP <system>' and to batch the queued
    SMTP  mails  via  `BSMTP  [-c]  [-s  batchsize]  <system>' just before a
    polling  session  or  whenever  you  want.  The receiver part works full
    automatically because of the patched UUXQT command.


                                    EXAMPLES

    A good example is my crontab:

        --s:crontab----------------------------------------------------------
        00     *    *    *    *        ssmtp brumuc
        30     *    *    *    *        ssmtp brumuc
        50    02    *    *    *        batch cyvaned
        53    02    *    *    *        ssmtp cyvaned
        56    02    *    *    *        bsmtp cyvaned
        00    03    *    *    *        uuget on
        30    03    *    *    *        uuget off
        32    03    *    *    *        uuxqt
        45    03    *    *    *        unbatch
        50    03    *    *    *        trimfile s:cronlog -3000
        51    03    *    *    *        trimfile uuspool:logfile -3000
        52    03    *    *    *        trimfile newsctl:log -3000
        53    03    *    *    *        trimfile newsctl:errlog -3000
        54    03    *    *    *        trimfile getty:logfile -3000
        55    03    *    *    *        trimfile ncomm:capfile -3000
        56    03    *    *    *        trimfile :usr/postmaster/.elm.recv -3000
        57    03    *    *    *        trimfile :usr/postmaster/.elm.sent -3000
        58    03    *    *    *        trimfile :usr/rse/.elm.recv -3000
        59    03    *    *    *        trimfile :usr/rse/.elm.sent -3000
        00    04    *    *    *        expire <newsctl:expirelist
        03    04    *    *    *        batch brumuc
        06    04    *    *    *        ssmtp brumuc
        09    04    *    *    *        bsmtp brumuc
        20    04    *    *    *        uupoll -m -r100 -Sbrumuc -a
        00    05    *    *    *        uuxqt
        10    05    *    *    *        unbatch
        20    05    *    *    *        upact
        21    05    *    *    *        arnmaster -C
        ---------------------------------------------------------------------


                                MAILING ADDRESS

      If  you  have  any questions, incitements, comments, criticisms or bug
    reports, please send it to:

                            ___  _______
    Ralf S. Engelschall,    /__)(_  /_              rse@angle.muc.sub.org
     Weblinger Weg 28,     / \____)(___           rse@cyvaned.muc.sub.org
      8060 Dachau,        /
       West Germany          ...!smurf.sub.org!brumuc!{angle,cyvaned}!rse
