Author:     Johan Vromans 
Cmpny:      SQS 
Company:    Squirrel Software 
Dept.:      Public Domain 
Project:    Squirrel Mail Server 
Title:      Squirrel Mail Server
            User Guide 
Version:    V3.01 
----------------------------------------

1.    INTRODUCTION: THE MAIL SERVER 

      The mail server is a mail response program. This means that you 
      can send it an email message, and the program will read this 
      message, extracts commands from it, and execute these commands if 
      no errors were encountered. 

      The main purpose of the mail server is to handle requests for 
      files in archives. By sending a request for a file, the mail 
      server will look it up and send the requested file to the 
      originator of the request, either via email or via UUCP. 

      When files are transferred via email, binary files (e.g. 
      compressed archives) are encoded using one of several popular 
      encoding schemes. Big files are split into pieces to avoid mailer 
      limits. 

      The algoritms of the mail server are designed to satisfy user 
      requests as much as possible, without taking the risk that 
      unwanted information is sent. 

      IMPORTANT:   This document describes the mail server software in
                   its generic form. Every site that implements the
                   mail server software can add or disable
                   functionalities, change defaults etc.. Consult the
                   information provided by the mail server HELP command
                   for an actual list of commands and options.

2.    BASIC USE 

      To request a file from the server send an email message with the 
      following contents: 

            SEND filename

      This will have the requested file sent via email to the originator 
      of the mail message. Encoding, if needed, will be performed to 
      protect binary contents of the file from ASCII-based email 
      systems. BEGIN and END can be used to protect the request from 
      anything else in the mail message, e.g. a signature: 

            BEGIN
            SEND filename
            END
            .signature follows.....

      If your system has a direct UUCP connection to the server system, 
      you can transfer requests via UUCP. Using UUCP to transfer 
      requests has a number of advantages: it eliminates the overhead 
      (and limits) of email systems, and the information need not be 
      encoded. In general, this will cut down the transfer time 
      (connection) with 30-50%. If your UUCP supports grades, UUCP 
      transfers can be postponed to cheap hours. 

      To receive a file via UUCP, use the following commands: 

            UUCP host!path user
            SEND filename

      This will have all requested files transferred via UUCP to the 
      designated host!path. It is equivalent to the Unix command: 

            uucp -d -r -nuser host!path/filename

      NOTE:  It is your own responsibility that the supplied path is
             accessible for UUCP transfers to your system!

      If you issue the UUCP command without arguments, the program will 
      try to intuit some defaults from the message headers. 

      If the mail server has been configured with support for FTP, you 
      can issue commands like: 

            SEND host:filename

      The mail server will attempt to retrieve the file using anonymous 
      FTP, and send it to you. 

3.    THE SERVER'S ARCHIVES 

      Files are stored in the archives in one of the following formats: 

      Plain          Normal ASCII text.

      Shell Archive  ASCII files which can be unloaded using the
                     Unix sh(1) program.
                     Shell Archives have names ending in ".shar".

      Compressed     16-bit compression using the compress(1) utility.
                     Compressed files have names ending in ".Z".

      Tar            Standard Unix tar(1) format.
                     Tar archives have names ending in ".tar".

      Compressed Tar Compressed tar archive.
                     Compressed tar archives have names ending in
                     ".tar.Z" or ".TZ".

      Zoo            Standard 'zoo' format.
                     These files have names ending in ".zoo".

      Zip            Standard 'zip' format.
                     These files have names ending in ".zip".

      When requesting a file you do not have to specify the 
      format-specific extension. A request for a file 'foo' will 
      automatically be changed to 'foo', 'foo.tar', 'foo.shar', etc, 
      whichever is available. 

      Additional formats may be added. 

4.    MAIL SERVER COMMANDS 

4.1   Command syntax 

      A command consists of a keyword (verb), followed by zero or more 
      arguments, depending on the command. Command verbs may be 
      specified in all uppercase letters, lowercase or whatever mixed 
      case. In other words: case is not significant in command verbs. 
      Case *IS* significant in command arguments, e.g. file names. Empty 
      lines are ignored. 

      Multiple commands can be specified on a line by separating them 
      with semi-colons. Commands can be continued over multiple lines by 
      adding a backslash in the last position of the line. This causes 
      the next line of input to be glued to the end of the current line. 
      The backslash and all leading space of the next line are removed. 

      Some commands have aliases, others allow for noise words (e.g. 
      "MAIL TO <user>"). 

4.2   Command classes 

      Commands are divided into the following classes: 

      *  Commands that select the destination, e.g. where replies should 
         be sent to, and how the requested files should be delivered. 

      *  Commands that specify transfer parameters, e.g. the maximum 
         amount of data to transfer, and what encoding to use. 

      *  Commands that request for files, directory information, and 
         index lookups. 

      *  Commands that deal with FTP. 

4.3   Command processing 

      When processing an input message, the mail server performs the 
      following actions: 

      1. Parse the headers of the incoming message, and extract 
         information about the sender. 

      2. Parse the commands in the message. If errors are found, supply 
         a short help message and quit. 

      3. Execute the commands. Files are looked up in the archives, or 
         retrieved via FTP. 

      4. Enqueue the requested files for delivery, and send a feedback 
         message to notify the user. This feedback message will show the 
         results of FTP commands, directory information, index lookups, 
         and a list of files to be delivered. 

      5. Perform the actual delivery. Execution of this phase can be at 
         a later time, e.g. when the system load is acceptable. 

4.4   Destination selection 

      One or more of the following commands must be issued before any 
      request command. 

4.4.1 REPLY <address> 

      The return address used by the server is set to the indicated 
      <address>. This must be a valid address by which you can be 
      reached. It should contain a domain-based address. Use this 
      command if you are not sure that the return addresses generated by 
      your mail system are reliable. The address specified with this 
      command will be used by the server to confirm receipt. 

      The REPLY command is ignored in interactive mode. 

      Alias for REPLY is PATH. It is allowed (but not encouraged) to 
      insert the word "to" after REPLY or PATH. 

4.4.2 UUCP [ [<host>!]<path> ] [ <user> ] 

      The mail server will transfer requests to the indicated host using 
      UUCP. The host must be known to the server system. Requests will 
      be transferred to the indicated <path>. UUCP notification messages 
      will be send to <user>. If missing, the <host> and <user> 
      information is extracted from the UUCP 'From' header. <path> 
      defaults to ~uucp/receive/<user> . 

      It is allowed (but not encouraged) to insert the word "to" after 
      UUCP. 

      The UUCP command is only available if the mail server software has 
      been installed with UUCP support. 

      NOTE:  If not in interactive mode, only one UUCP or MAIL
             command may be issued.

4.4.3 MAIL <address> 

      The mail server will transfer requests to the indicated address 
      using e-mail. This is the default transfer method for the server. 
      You must specify a valid (preferable domain-based) address by 
      which you can be reached. 

      If no UUCP or MAIL command has been issued, requests will be sent 
      to the recipient as specified by a REPLY command, or dereived from 
      the mail headers. 

      It is allowed (but not encouraged) to insert the word "to" after 
      MAIL. 

      The MAIL command is only available if the mail server software has 
      been installed to support it. 

      NOTE:  If not in interactive mode, only one UUCP or MAIL
             command may be issued.

4.5   Transfer parameters 

      These parameters may be set as often as needed. Setting transfers 
      parameters affects only requests that follow these commands. 

4.5.1 LIMIT [<number>] 

      Specify the maximum number of Kbytes which may be sent in a single 
      transfer. Requests that exceed this amount will be split before 
      sending. The amount may be specified with a trailing K, e.g. 
      "30K", but this is not needed. "30" is equivalent to "30K". 

      If <number> is omitted, the limit is set to its default value. The 
      default value is 64K for email and 256K for UUCP, however, these 
      values may be changed upon installation. 

      NOTE:  Due to overhead, it is possible that the size of the
             mail which reaches you will (slightly) exceed this limit.

4.5.2 ENCODING, UUENCODE, XXENCODE, UUE, BTOA 

      The requested files will be encoded using the indicated encoding 
      method. You can preceede the encoding verb with ENCODING if you 
      like. 

      The following encoding verbs are understood. 

      UUENCODE     Basic Unix uuencode. Decode with 'uudecode'.

      XXENCODE     Enhanced version of uuencode. Decode with 'xxdecode'.

      UUE          Dumas' enhanced uuencoding.
                   Multiple parts can be automatically joined when
                   decoding with 'uud'.

      BTOA         Binary to Ascii encoding. Uses checksums to verify
                   integrity of the data. Decode with 'atob'.

      Each of these commands is only available if the mail server 
      software has been configured to support it. 

      The BTOA encoding is most efficient and reliable. 

      Usually, for all supported encoding methods the associated tools 
      can be retrieved from the mail server. 

      UUDECODE can be used as an alias for UUENCODE, UUD for UUE etc. 
      The following commands all set the encoding to binary to ascii: 

            BTOA
            ATOB
            ENCODING BTOA
            ENCODE ATOB

4.5.3 CWD [<path>] 

      Sets (or cancels) the current working directory for subsequent 
      commands. The current working directory is prepended to the 
      arguments of SEND, RESEND and DIR commands, e.g. the following two 
      commands are equivalent: 

            CWD foo; SEND bar
            SEND foo/bar

      For compatibility with another brand of info server software, 
      REQUEST is accepted as an alias for CWD. For example, the 
      following three commands are all equivalent: 

            REQUEST foo; TOPIC bar
            CWD foo; SEND bar
            SEND foo/bar

      NOTE:  CWD commands do not nest, e.g. after "CWD foo; CWD bar"
             the current directory will be "bar", not "foo/bar".

4.6   Request commands 

      The following commands request for information. This can be a file 
      to be retrieved, or the contents of a specific directory. Other 
      commands return more general information about the files in the 
      server's archives. 

4.6.1 INDEX [<item>] 

      The specified <item> is looked up in the server archives. If 
      found, a list of all items that match the request is returned. For 
      example, "INDEX gcc" will return a list of every item in the 
      server archives that has "gcc" in its name or path. The INDEX 
      command is like a Unix grep(1) on a list of files, but it does not 
      support regular expressions patterns. 

      INDEX without arguments will request for a file INDEX in the 
      archives, if present. 

      Since index requests can return a huge amount of information, the 
      number of lines returned is limited to (usually) a few houndred 
      lines. 

      Index lookup is only available if the mail server software has 
      been configured to support it. 

4.6.2 SEARCH <item> 

      The specified <item> is looked up in the server archives. If 
      found, a list of all items that match the request is returned. 
      SEARCH is more limited than INDEX. It returns only archive entries 
      that are eligible to be found by a SEND command. This can be used 
      to find out which versions of a specific package can be found on 
      the server, and where. 

      For example, "SEARCH gcc" will return a list of every item in the 
      server archives that has a name that starts with "gcc", followed 
      by something that looks like a version number, and ends with 
      ".tar.Z" or some other predefined extension. 

4.6.3 DIR [<path>] 

      Returns the list of files in <path>. The current directory will 
      the prepended to <path>. 

      If the amount of information does not exceed a specific limit, the 
      information is included in the feedback message. Otherwise it is 
      send as a separate file. 

      Aliases for DIR are LIST and LS. 

4.6.4 SEND <item> [<item>...] 

      The specified <item>s are looked up in the server archives. If 
      found, they will be sent to you. Multiple items may be specified 
      with one SEND command. 

      If looking up the named item returns multiple possibilities, the 
      SEND request will be treated as a SEARCH, i.e. a list of 
      possibilities is returned instead. 

      For compatibility with another brand of info server software, 
      TOPIC is accepted as an alias for SEND. For example, the following 
      two commands are equivalent: 

            REQUEST foo; TOPIC bar
            SEND foo/bar

      NOTE:  The names of the <item>s are case sentive!

      If the mail server has been configured to support it, it is 
      possible to request for a compressed file (file.Z), even if the 
      file exists in the archives in uncompressed form. The mail server 
      will compress the file automatically before transfer. 

      Another configuration option is automatic packing of directories. 
      If you want the contents of a directory (and all its 
      subdirectories), request the directory name suffixed by '.zip', 
      '.zoo' or '.tar.Z'. See also the PACK command described below. The 
      restrictions for the PACK command also apply to the automatic 
      packing feature. 

4.6.5 RESEND <item> <part> [<part>...] 

      Re-send the indicated <part>s of this item. This is useful if not 
      all parts of a multi-part transmission did arrive correctly. When 
      re-transmitting, the encoding and limit used must be identical to 
      those of the original transmission. 

4.6.6 PACK <method> 

      Subsequent SEND requests must select directories. 

      This directory will be packed into a file using the indicated 
      method, and transferred. <method> may be "tar", "zoo" or "zip". If 
      <method> is "off", subsequent request are treated normally. 
      <method> "tar" means "compressed tar". 

      The PACK command is only available if the mail server software has 
      been configured to support it. The same restriction applies to the 
      packing methods. 

      NOTE:  A limit (usually 2Mb) is imposed on the total size of the
             files in the directories.

4.7   Implicit FTP commands 

      If the mail server has been configured to support FTP, the 
      following extensions to the standard commands are available. 

      Note that intelligent lookup of archive entries, using directory 
      search and index files, are *NOT* available when accessing 
      archives via FTP. 

      As an configuration option, the mail server can restrict FTP 
      commands to requests that are going to be delivered via UUCP only. 

4.7.1 SEND <host>:<file> [<file>...] 

      A connection to the indicated <host> is established, the named 
      <file>s are retrieved and queued for transfer. 

4.7.2 RESEND <host>:<file> <parts> 

      A connection to the indicated <host> is established, the named 
      <file> is retrieved, and the selected parts are queued for 
      transfer. 

4.7.3 DIR <host>:<dir> 

      A list of files in the named <dir> is retrieved from <host>. 
      Depending on the amount of information, the list is shown or 
      queued for transfer. 

4.8   Explicit FTP commands 

      If the mail server has been configured to support FTP, the 
      following additional commands are available. 

      As an configuration option, the mail server can restrict FTP 
      commands to requests that are going to be delivered via UUCP only. 

4.8.1 FTP OPEN <host> 

      Subsequent requests will be executed on the named <host>. If 
      already connected to a system, this connection will be closed, 
      unless it is the same system, in which case nothing will be done. 

      If no login information has been supplied, the mail server will 
      attempt anonymous FTP. 

      If an FTP connection is active, all subsequent SEND, RESEND, CWD 
      and DIR commands apply to this system. 

      NOTE:  Some FTP servers enforce additional restrictions if the
             password supplied is not a recognized email address. In
             case of doubt, specify your correct address in a REPLY
             command first.

4.8.2 FTP CLOSE 

      Close the current connection. 

4.8.3 FTP USER <user> <password> 

      Supply FTP login information. This command must be executed before 
      opening the connection to the desired system. 

      If it is needed to change login information for the current host, 
      issue an explicit "FTP CLOSE" before re-opening the connection. 

4.9   Mixing FTP and non-FTP commands 

      It is allowed to mix implicit FTP, explicit FTP and non-FTP 
      commands, e.g.: 

            [1]  FTP USER anonymous me@somewhere.com
            [2]  SEND foo
            [3]  SEND bar:blech
            [4]  FTP export.lcs.mit.edu
            [5]  SEND zup

      This will [1] set FTP login information, [2] transfer file 'foo' 
      from the local archives, [3] open an FTP connection to system 
      'bar' using the login information from [1] and transfer file 
      'blech', [4] open a connection to system 'export.lcs.mit.edu' 
      using the login information from [1], and finally [5] retrieve 
      file 'zup' from 'export.lcs.mit.edu'. 

4.10  ARCHIE commands 

      If the mail server has been configured to support access to the 
      popular 'archie' service, the following command is available. 

4.10.1 ARCHIE PROG <request> 

      This will connect to the archie server, and lookup <request>. 
      <request> must be a valid (Unix) regular expression pattern. 

4.11  Miscellaneous commands 

4.11.1 HELP 

      This command gives a brief list of server commands. The 
      information will reflect the actual functionality of the mail 
      server. E.g. FTP commands will only be included if the server 
      supports it, defaults shown will be the actual defaults used, etc. 

      A HELP command will be implied if errors are detected while 
      parsing the commands. 

      Note that this is NOT the same as the "SEND HELP" command. The 
      latter command will send this document. 

4.11.2 COMPRESS 

      This command is only included for compatibility with some other 
      mail servers. It is ignored. 

      If you request 'file.Z' the mail server will automatically 
      compress an uncompressed version of this file. 

4.11.3 TEST 

      This command is for testing. No files will be sent if you use 
      this, but a confirmation message will be sent to the return path 
      as determined from the mail headers or the REPLY command. You may 
      use this to find out if your address is valid, and to check the 
      status of your request. 

4.11.4 BEGIN 

      Ignore anything above this line, and start looking for commands. 
      This command can be used to discard incorrect responses, errors 
      etc. that may result from input that was not directed to the mail 
      server itself. 

      Alias for BEGIN is RESET. 

      The BEGIN command is ignored in interactive mode. 

4.11.5 END 

      The remainder of the message is ignored. This can be useful if a 
      .signature is appended to the message. 

      For best results: always embody your commands between BEGIN and 
      END. 

      Aliases for END are EXIT and QUIT. 

5.    SAMPLE MAIL SERVER REPORT (EMAIL TRANSFER) 

      Assume the following message is sent to the mail server: 

            mail jv@mh.nl
            btoa
            index bio
            search bio
            send bio HELP
            resend zoo 2 3 4
            send foo
            dir gnu
            end

      This will generate the following report: 

                 From: mserv (Mail Server)
            [1]  To: jv@pasta.mh.nl
                 Subject: Request by jv
                 Date: Sun, 6 Dec 92 16:05 MET
            
                 Processing UUCP header ...
            [2a] => Default return address (UUCP): "pasta!jv"
            
                 Processing mail headers ...
            [2b] => Default return address: "jv@pasta.mh.nl"
            
                 Processing message contents...
            
                 Command: mail jv@mh.nl
            [3]  => Transfer via email to "jv@mh.nl"
            
                 Command: btoa
                 => Encoding = B (btoa)
            
                 Command: index bio
                 => Index: bio
            
                 Command: search bio
                 => Search: bio
            
                 Command: send bio HELP
                 => Send: bio
                 => Send: HELP
            
                 Command: resend zoo 2 3 4
                 => Resend: zoo, part 2,3,4
            
                 Command: send foo
                 => Send: foo
            
                 Command: dir gnu
                 => Dir: gnu
            
                 Command: end
                 => Okay
            
                 Your message has been processed.
            
            [4]  Index results:
            
                    Date     Size   Index: bio
                  --------  -----   ---------------------------------
                  91/07/10     2K   bio-2.4/Makefile
                  91/07/06     3K   bio-2.4/README
                  91/07/09    14K   bio-2.4/bio.diffs
                  91/07/09    36K   bio-2.4/bio.tar.Z
                  91/07/09    36K   bio-2.4/bio-2.4.tar.Z
                  89/12/16     4K   fastio/stubio.c
            
            [5]  Search results:
            
                    Date     Size   Search: bio
                  --------  -----   ---------------------------------
                  91/07/09    36K   bio-2.4/bio.tar.Z
                  91/07/09    36K   bio-2.4/bio-2.4.tar.Z
            
            [6]  Request "bio" is ambiguous:
            
                    Date     Size   Search: bio
                  --------  -----   ---------------------------------
                  91/07/09    36K   bio-2.4/bio.tar.Z
                  91/07/09    36K   bio-2.4/bio-2.4.tar.Z
            
            [7]  Result from Dir gnu:
                  -rw-r--r--  1 jv  935533 Feb 13  1992 bash-1.12.tar.Z
                  drwxr-xr-x  2 jv    1024 Nov  8 14:40 emacs
                  -rw-r--r--  1 jv  229551 Aug 17 15:45 find-3.7.tar.Z
                  drwxr-xr-x  3 jv     512 Dec  5 16:55 gcc
                  drwxr-xr-x  2 jv     512 Oct 28 23:49 gdb
                  drwxr-xr-x  3 jv     512 May 28  1992 uucp
            
            [8]  Request results:
            
                  Request           Size  Enc  Limit Status
                  ---------------- -----  ---  ----- -------
                  bio                                Ambiguous
                  HELP                11K  B     64K Queued
                  zoo-2.1/zoo.TZ     171K  B     64K Queued (parts 2 3 4 only)
                  foo                                Unknown
            
                 Encoding B means: encoded with btoa.
            
                 The requests with status "Queued" will be sent as soon as
                 the load of the server system permits, usually within 24 hours.
            
                 Mail Server finished.

      As you can see, the return mail is sent to the address [1] 
      extracted from the UUCP [2a] and mail headers [2b]. A return 
      address found in the mail headers overrides the address dereived 
      from the UUCP header. A REPLY command could have been used to 
      supply a different address. 

      The MAIL command [3] instructs the server to send the requests via 
      email to the given address. If the MAIL command had not been 
      issued, the address from the message header [2] would have been 
      used. 

      The result from the INDEX command [4] returns info for every file 
      in the archives that have "bio" in its name or path. 

      The result from the SEARCH command [5] returns info for every file 
      in the archives that that is likely to be a selectable archive 
      item. 

      Since more than one file matches the request for "bio", it is 
      turned into a SEARCH command [6]. 

      The output of the DIR commands is shown here [7]. 

      In the list of requests [8] the size and encoding of the files are 
      shown. Note that the size is the size *before* encoding! Request 
      "foo" could not be found and is skipped. 

      Some time later the following mails will arrive: 

            From               Size      Subject
            --------------   ---------   ----------------------------------
            Mail Server      298/10175   "HELP (complete) ascii"
            Mail Server      829/65453   "zoo.TZ (part 2 of 4) btoa encoded"
            Mail Server      829/65453   "zoo.TZ (part 3 of 4) btoa encoded"
            Mail Server      325/25578   "zoo.TZ (part 4 of 4) btoa encoded"

      Files which are sent in parts have all pieces clearly marked as 
      such: 

            ------ begin of zoo.TZ -- btoa encoded -- part 2 of 4 ------
            #(_0M#C)R-&3BEIu9#I[oEFn;50r5kb6%CJq%=NMgE3in`tMpnX0rOEYPWNM...
            =69S\PiSodA"*lArTZ.-(g6DL2A6_5>DMuFV/&S7H/]XEgLe(l@e;-Rqr:iZ...
            ...
            ...
            $`eP&iGea"a#e[F!oeo1r@U/FP;::i"V)j_EW+.(U*&IrTJ+u'9=$MY7s*CC...
            uI=a5*Wj^#1LD,&>MZKY@H1_a9QE$$4[+?[ePhh"h2Ub"/a,(ES*ZH"nK"6d...
            ------ end of zoo.TZ -- btoa encoded -- part 2 of 4 ------

      You have to cut the information between the 'begin' and 'end' 
      lines, glue them together in the right order, and feed it to the 
      appropriate decoding program. 

      The program 'unpack.pl', available from the mail server, can be 
      used to unpack multi-part transfers. 

6.    SAMPLE MAIL SERVER REPORT (UUCP TRANSFER) 

      Assume the following message is sent to the mail server: 

            uucp pasta!~uucp/receive/jv jv
            limit 64K
            send bio-2.4
            resend zoo 2 3 4
            end

      This will generate the following report: 

                 From: mserv (Mail Server)
            [1]  To: jv@pasta.mh.nl
                 Subject: Request by jv
                 Date: Sun, 6 Dec 92 16:15 MET
            
                 Processing UUCP header ...
            [2a] => Default return address (UUCP): "pasta!jv"
            
                 Processing mail headers ...
            [2b] => Default return address: "jv@pasta.mh.nl"
            
                 Processing message contents...
            
                 Command: uucp pasta!~uucp/receive/jv jv
            [3]  => Transfer via UUCP to "pasta!~uucp/receive/jv"
                 => (UUCP notification to: "jv")
            
                 Command: limit 64K
                 => Limit = 64K
            
                 Command: send bio-2.4
                 => Send: bio-2.4
            
                 Command: resend zoo 2 3 4
                 => Resend: zoo, part 2,3,4
            
                 Command: end
                 => Okay
            
                 Your message has been processed.
            
            [4]  Request results:
            
                  Request                 Size Enc Limit Remarks
                  ---------------------- ----- --- ----- -------
                  bio-2.4/bio-2.4.tar.Z    36K       64K Queued
                  zoo-2.1/zoo.TZ          171K       64K Queued (parts 2 3 4 only)
            
                 The requests with status "Queued" will be sent as soon as
                 the load of the server system permits, usually within 24 hours.
            
                 Mail Server finished.

      As you can see, the return mail is sent to the address [1] 
      extracted from the mail headers [2b], overriding the address found 
      in the UUCP header [2a]. A REPLY command could have been used to 
      supply a different address. 

      The UUCP command [3] instructs the server to send the requests via 
      UUCP to the given system. 

      In the list of requests [4] the size of the files is shown. 

      Some time later the following files will be copied to the system: 

            /usr/spool/uucppublic/receive/jv/bio-2.4/bio-2.4.tar.Z
            /usr/spool/uucppublic/receive/jv/zoo-2.1/zoo.TZ/part2of4
            /usr/spool/uucppublic/receive/jv/zoo-2.1/zoo.TZ/part3of4
            /usr/spool/uucppublic/receive/jv/zoo-2.1/zoo.TZ/part4of4

      Multi-part transfers must be concatenated to yield the requested 
      files. 

      NOTE:  Information that results from other sources than files
             (e.g. DIR commands) will be sent using temporary
             filenames like "ft2351.ab". Usually, this information is
             compressed before being transferred.

7.    SAMPLE MAIL SERVER REPORT (WITH ANONYMOUS FTP) 

      Assume the following message is sent to the mail server: 

            uucp pasta!~uucp/receive/jv jv
            dir ftp.foo.org:pub
            send ftp.foo.org:pub/mail-server.tar.Z
            end

      This will generate the following report: 

                 From: mserv (Mail Server)
            [1]  To: jv@pasta.mh.nl
                 Subject: Request by jv
                 Date: Sun, 6 Dec 92 16:25 MET
            
                 Processing UUCP header ...
            [2a] => Default return address (UUCP): "pasta!jv"
            
                 Processing mail headers ...
            [2b] => Default return address: "jv@pasta.mh.nl"
            
                 Processing message contents...
            
            [3]  Command: uucp pasta!~uucp/receive/jv jv
                 => Transfer via UUCP to "pasta!~uucp/receive/jv"
                 => (UUCP notification to "jv")
            
            [4]  Command: dir ftp.foo.org:pub
                 => FTP Connect to "ftp.foo.org"
                 => Dir: pub
            
            [5]  Command: send ftp.foo.org:pub/mail-server.tar.Z
                 => FTP Connect to "ftp.foo.org"
                 => Send: pub/mail-server.tar.Z
            
                 Command:  end
                 => Okay
                 Your message has been processed.
            
            [6]  FTP Command execution:
                     OPEN ftp.foo.org
                     Connecting to ftp.foo.org
                     220 Squirrel.foo.org FTP server (Version 4.1) ready.
                     ---> USER anonymous
                     331 Guest login ok, send ident as password.
                     ---> PASS jv@pasta.mh.nl
                     230 Guest login ok, access restrictions apply.
            
            [7]  FTP Command execution:
                     DIR pub
                     ---> TYPE A
                     200 Type set to A.
                     ---> PORT 127,0,0,1,4,1
                     200 PORT command successful.
                     ---> LIST pub
                     150 Opening data connection.
                     226 Transfer complete.
                     -r--r--r--  2 mserv   18640 Dec  6 15:49 HELP
                     -r--r--r--  2 mserv   18640 Dec  6 15:49 help
                     -rw-r--r--  1 mserv   64051 May 31  1992 mail-server.tar.Z
                     -r--r--r--  1 mserv    4170 Dec  6 15:49 unpack.pl
            
            [8]  FTP Command execution:
                     GET pub/mail-server.tar.Z
                     ---> PORT 127,0,0,1,4,3
                     200 PORT command successful.
                     ---> LIST pub/mail-server.tar.Z
                     150 Opening data connection.
                     226 Transfer complete.
                     -rw-r--r--  1 mserv   64051 May 31  1992 pub/mail-server.tar.Z
            
            [8b]     ---> TYPE I
                     200 Type set to I.
                     ---> PORT 127,0,0,1,4,4
                     200 PORT command successful.
                     ---> RETR pub/mail-server.tar.Z
                     150 Opening data connection.
                     Got 64051 bytes (64051 bytes/sec)
                     226 Transfer complete.
            
            [9]  FTP Command execution:
                     CLOSE ftp.foo.org
                     ---> QUIT
                     221 Goodbye.
            
            [10] Request results:
            
                  Request                            Size Enc Limit Status
                  --------------------------------- ----- --- ----- ------
                  ftp.foo.org:pub/mail-server.tar.Z   63K      256K Queued
            
                 The requests with status "Queued" will be sent as soon as
                 the load of the server system permits, usually within 24 hours.
            
                 Mail Server finished.

      The return mail is sent to the address [1] extracted from the 
      message headers [2a and 2b]. A REPLY command could have been used 
      to supply a different address. 

      The UUCP command [3] instructs the server to send the requests via 
      UUCP to the given system. 

      The DIR command [4] is used to get a directory listing from the 
      FTP server. 

      The SEND command [5] requests a file from the FTP server. 

      [6] through [9] show the execution of the FTP commands. First, the 
      connection with the FTP server is established [6]. Then the output 
      of the DIR command follows [7]. 

      Step [8] deserves detailed explanation. Before retrieving a file 
      from the FTP server, the mail server requests directory info for 
      the desired file. Using this info, the mail server tries to find 
      the file in a special local archive, the ftp cache. If the file is 
      found locally, the local file is queued for transfer. If not 
      found, it is retrieved from the FTP server [8b], stored in the ftp 
      cache, and queued for transfer. 

      Finally the connection with the FTP server is closed [9], and the 
      list of requests is shown [10]. 

      Some time later the requested file will be copied to the system: 

            org/foo/ftp/mail-server.tar.Z

      Note that the FTP host name has been transformed into a directory 
      name by reversing the elements of the host name. The (usually 
      dummy) directory "pub" has been stripped. 

8.    SAMPLE INTERACTIVE MAIL SERVER USE 

      The Mail Server software can also be used interactively, e.g. from 
      a terminal, or via TELNET. 

      When the mail server is started interactively, it reads its 
      commands from standard input and processes them immediately. 
      Errors are not fatal. Moreover, multiple MAIL and UUCP commands 
      can be entered. 

            % telnet squirrel 2000
            Connected to squirrel.
            Escape character is '^]'.
            Multihouse Mail Server (Squirrel Mail Server Software V3.1) ready.
            Local time is Wed Dec 23 23:40:55 1992.
            Enter HELP for a list of commands.
            
            Command> mail jv
            Command: mail jv
            => Transfer via email to "jv"
            
            Command> send HELP.Z
            Command: send HELP.Z
            => Send: HELP.Z
            Request results:
            
              Request        Size  Enc  Limit  Status
              ------------  -----  ---  -----  ------
              HELP            36K   BZ    64K  Queued
            
            Encoding BZ means: compressed first, then encoded with btoa.
            
            The requests with status "Queued" will be sent as soon as the load of
            the server system permits, usually within 24 hours.
            
            Command> end
            Command: end
            => Okay
            
            Mail Server finished.
            Connection closed by foreign host.

9.    HISTORY 

      The Squirrel Mail Server has been developed by Johan Vromans. It 
      is all written in Perl, except for one small C (wrapper) program. 

      This software is Copyright 1988, 1992, 1993 by Johan Vromans, and 
      may be distributed according to the GNU Public Licence. 

      Version 1 was released in 1988 and has helped to develop Perl-2. 
      It has been in full production at a number of sites ever since. 
      Version 2 has never been released to the public. 

      This is version 3, completely reworked, and requires Perl 4.035 or 
      later. 

      Parts of the mail server software are derieved from the works of 
      others: the FTP core services and date conversions are from Lee 
      McLoughlin's 'mirror' package. The low level 'chat' package is 
      written by Randal Schwartz (just another perl hacker). Directory 
      packing (the PACK command) is based on an implementation by Piet 
      van Oostrum. 

      For questions, information and remarks: 

                    Johan Vromans
            --
            Johan Vromans                                  jv@mh.nl via internet backbones
            Multihouse Automatisering bv                   uucp:..!{uunet,sun4nl}!mh.nl!jv
            Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62944/62500
            ------------------------ "Arms are made for hugging" -------------------------

10.   HINTS ON USING THE SQUIRREL MAIL SERVER 

      Although the mail server tries its best to satisfy every request, 
      sometimes it is not possible to honour a request due to system 
      limits, archive structure etc.. 

      *  Do not send messages from system accounts (e.g. 'root', 'news', 
         'daemon' etc). These messages are usually rejected. 

      *  Always embed your requests between a BEGIN / END pair. 

      *  Keep in mind that filenames are case sensitive! "SEND index" 
         and "send INDEX" are not identical. 

      *  Do not reply to the messages the mail server sends. This is 
         usually a dummy address and mail directed to this address will 
         be discarded. 

10.1  Frequently Asked Questions ... or frequently made mistakes. 

      Q: What does this warning mean:

            Warning: Unusable UUCP header:
            From anywhere.com!me ...

        This means that "anywhere.com" is not a known UUCP host to
         the mail server system. Email sent to this address will
         generally get through, but it is not possible to deliver
         files via UUCP.
