[comp.mail.misc] **LONG POST** UUPC 1.07g ... summary of changes

ahd@clutx.clarkson.edu (Drew Derbyshire) (12/21/89)

Several people have asked me to mail them a listing of the changes I
have made to UUPC in my hacking.  Following is the list of as last
weekend, which is the last time I updated the program.  (I asked someone
to mail me his list of what he had to done it ... he never worte it down.
*sigh*.)  It should any all questions those interested have, and bore
anyone else to tears.

To those who want the program, I will be realoading the program to clutx
with corrected documents, sample files, and a few bug fixes after
Christmas; once my second telephone gets installed (this could be a
while), you will also be able to call me on your dime and download the
.ZIP files.  If you are in rush, I can talk to Clarkson (Hi Russ!) and
see if they can load it on their BBS from clutx.

Some people have said they could not unZIP  the current UUPC archives on
clutx, and others just plain wanted .ARC files.  I will, to check the
upload, be uploading both .ZIP and .ARC files on the next pass (after
Christmas).

Please note:

	1) Russ Nelson has been sent no less than four piece of mail
	about UUPC; it's not his program, not his files, it's not even
	his host!  So don't send Russ mail about UUPC, okay?  Read my
	address.

	2) I refuse to mail out UUPC because a) I keep updating it and
	b) I am not working on it for profit, or even to break even.  I
	just want a mailer I trust on my PC.  Please don't ask.


Drew Derbyshire

Internet:  ahd@clutx.clarkson.edu        Snail mail:  108 Decatur St, Apt 9
Voice:     617-641-3739                               Arlington, MA 02174



December 17, 1989                    UUPC/extended 1.07g changes summary

Note that many of the listed bugs were introduced by UUPC/extended, and
may not have existed or been of any importance in the interim UUPC
1.05.  Changes without a release number denoting when they made were
previous to release 1.07e.

Note not all changes are logged in this file, and that comments denoting
changes in the source are inconsistent at best.
 
Unfixed bugs:

       1. The Z-100 version of UUPC/extended (which as a different
          communications package) doesn't work.

       2. Files are not locked when being read and updated by
          interactive mail; if a file is updated by sending or saving
          mail, the mail can be lost.

       3. Binary files are corrupted during transfer if one side
          believes flow control is active and the other side does not.

       4. UUPOLL polling times are one hour off when daylight savings
          time is not in effect.

       5. UUPOLL polls at odd times if the interval specified by the
          interval flag (-i) does not divide evenly into 24 hours.

       6. UUPOLL polls at odd times if the first time to poll is after
          9:06:08 A.M.  (32K seconds).

       7. Mail from the mail server should never be sent back to it.

     
Needed enhancements:

       1. Suppressed RFC-822 headers cannot be altered by the user; they
          are displayed in an all or nothing fashion.

       2. "From" lines are interspersed with RFC-822 lines.  They should
          be first.

       3. Remote users can transfer files to anywhere on the local
          system and overlay local files.

       4. The program should severely limit the number of the assert()
          statements because the resulting message is not informative. 
          Especially important is proper error checking for disk I/O.
          Also, assert() statements should not include critical code,
          since the NDEBUG option suppresses the execution of the clause
          within the assert().

       5. UUIO should support a generic modem expect/response string for
          dialing.

       6. Mail should not be delivered to non-existent local user ids

                                 - 1 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

          without permission.

       7. Mail should understand the concept of 'local' domain, and that
          mail for any system in the local domain should not be
          forwarded to a mail server outside the domain.

     
Fixed Bugs:

       1. The installation documents are non-existent.
          
          Wrote basic documents for version 1.07c; corrected numerous
          spelling and other errors in version 1.07g.

       2. If a reply (r) command is issued against mail without an
          address to reply to, the command is not rejected.
          
          Initialized variable 'from' in createbox().  Corrected in
          1.07g.

       3. Check in printmsg() for de-referencing a NULL pointer was
          backwards, it turned off debugging output (and an assert()
          statement to kill the program) instead of turning it on. 
          Corrected in 1.07g.

       4. When dialing a HAYES modem, the expected "OK" string
          overprints the literal "expected".
          
          Altered "\r" to "\\r" in hayes().  Corrected in 1.07g.

       5. The number of messages in the mail box is printed even if only
          printing the subject of one header.
          
          Corrected PrintSubject() to print count of messages only when
          displaying all message subjects.  Corrected in 1.07g.

       6. UUPOLL prints outgoing polling commands twice.
          
          Deleted extra printf() call from active().  Fixed in version
          1.07g.

       7. Trying to read the mail for a user whose mail is forwarded
          causes a null pointer to be de-referenced.
          
          Corrected CreateBox to gracefully exit if the mailbox being
          read begins with a "Forward to " line.  Also modified
          Interactive_Mail to exit gracefully if no mail was read by
          CreateBox.  Fixed in version 1.07g.

       8. If the name in a return contains nested parentheses,
          ExtractAddress aborts.
          
          Corrected parse to correctly determine level of nesting.
          Fixed in version 1.07f.

                                 - 2 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

       9. It is sometimes necessary to read mail without the internal
          binary separators used by UUPC.
          
          Added configuration file keyword FromSep; if specified as
          "yes", this keyword allows the standard UNIX 'From' line to
          separate mail.  This not needed if the mail entered the local
          system via UUCP 1.07a or above.  Fixed in version 1.07e.

      10. If a suppressed mail header is the last line of the header,
          the empty line following the header is not displayed.
          
          Corrected check for non-printable characters to exclude the
          newline character.  Fixed in version 1.07e.

      11. Items without headers cause the following item to be appended
          to it.
          
          Revised RMAIL version of pcmail.c to append a trailing empty
          line if the header is not properly terminated.

      12. Mail from UUPC to remote systems shows as coming from
          /dev/null.
          
          Restored 'From ...' line in sendone(), adding the actual node
          id of the delivering user.

      13. Mail with long lines scrolls off the screen with the built-in
          pager.
          
          Added check for length of line in PageLine().

      14. When sending mail, addressees with no alias that are added via
          the 'Cc:' prompt are not correctly displayed in mail headers.
          
          Moved premature free() call for ccbuffer in Send_Mail().

      15. Upon termination, MAIL reports a Null Pointer Assignment in
          the small memory model.
          
          Corrected declare of local variable debugp in getrcnames().

      16. Compiling using the compact model causes the stack to be blown
          in MAIL.
          
          Altered all large arrays (including strings) to be allocated
          and released from the heap using malloc() and free().  Strings
          used only by modules for UUIO are left alone for performance
          reasons.1

      17. If mail includes a -c or -b option, the previous header
                       -------------------------                        
1The correct fix is increase the stack size via the global variable
 _stklen, but, this was overlooked until after all the variables were
 changed to allocation via malloc().

                                 - 3 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

          includes a bad comma at the end of its text.
          
          Fixed in sendone() to not generate a comma at end of headers.

      18. Cntrl-Break is ignored by UUIO if BREAK is off.
          
          Wrote UUPOLL driver program to enable and restore original
          BREAK status.

      19. Mail forwarded with the forward f) command has the mail
          headers run together.
          
          Altered pcmail.c to use flag resend (shared between sendone()
          and Interactive_Mail() in mail.c), which, when true, causes
          sendone() to add the "Resent-" prefix to the generated headers
          "Date:", "From:", "To:", "Cc:", and "Subject:" headers.

      20. Headers are not always terminated by an empty line if the
          first line of the body of the message includes a colon (:).
          
          Modified pcmail() to not attempt to determine the end of the
          header, instead forcing it to handle header processing based
          on the mode (lmail or rmail) and whether or not the resend
          flag is true.  This fix effectively cripples the ability of
          pcmail to operate as a standalone program, although various
          uses of the external routing routines in router.c had greatly
          already restricted the standalone capabilities of pcmail.

      21. The sequence number for messages queued for remote systems
          cycles after 500 messages.
          
          Altered local temporary files to be generated via tmpnam, thus
          eliminating a double increment of the sequence number per mail
          message, and changed output format of sequence number from
          decimal to hexadecimal to increase number of unique sequence
          fields to 4096 from 1000.  These changes together provide an
          eight-fold increase in available sequence numbers.

      22. Normal debugging via printmsg() cannot be used during early
          initialization stages of processing, and never if mail is
          invoked to send mail from the command line.
          
          Added check for environment variable UUPCDEBUG in configure();
          if the variable exists, its value is used to initialize
          debuglevel.

      23. If pager is not defined, MAIL sometimes refuses to display a
          message because it incorrectly believes a pager was supplied.
          
          Altered pager to check for null pointer instead of empty
          string to determine if an external pager is available.

      24. Slower PC's tend to timeout when transferring files.
          

                                 - 4 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

          Upped TimeOut to 15 from 4, per indirect advice from Sam
          Lamb.

      25. HAYES modem type does not work.
          
          Added D (dial) command to last command before phone number in
          dial.

      26. HAYES modem performing dialout cannot autobaud.
          
          Changed search for connect speed in dial to look for four or
          more characters instead of exactly four.

      27. When running in passive mode, once the user presses <cr> to
          get system's attention then login() processing goes into a
          output loop of Login/Password messages until it times out. 
          Initialized ch in rmsg().  Previously, it was not initialized
          if sync option was not requested.

      28. Autobauding a modem causes the connection to be dropped.
          
          Dropped calls to dtr_off() and dtr_on() from SIOSpeed().

      29. In passive mode, the system cannot locate any valid system
          names in L.SYS.
          
          Modified checkname to parse lines of L.SYS correctly,
          including skipping comment lines.

      30. Changing speeds immediately upon receiving the "CONNECT"
          message can cause a HAYES modem to drop the connection.
          
          Added sleep(1) before setting speed of modem in dial

      31. Mail forwarded to remote systems via a "Forward to" line in a
          mail box fails when the buffer containing the address to
          forward to is overlaid.
          
          Altered sendone() to use a local variable for forwarding
          address.

      32. UUIO does not always deliver local files, it spools them for
          forwarding because it sees a node delimiter symbol ("@" or
          "!") in the header.
          
          Dropped existing remote_address() macro in favorite of full
          routine to extract node name and user id of addressee; if the
          node is the local nodename or domain, then the address is
          altered to be a local address.

      33. UUIO should support the standard fields in L.SYS for when to
          call other systems.  At the very least, it should understand
          the keyword never.
          

                                 - 5 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

          Wrote new checktime() to support all standard fields; does not
          allow multiple day fields (TuFr0000-2400) in one token, but
          does include the BNU and BSD 4.3 support of multiple tokens
          separated by commas (Tu0000-2000,Fr0000-2400) which provides
          the same function.

      34. Mail user interface does not properly parse user names with
          both quotes and parentheses in them.
          
          Added ReturnAddress() to correct handle most cases of RFC-822
          address syntax.  Also added support to CreateBox() to examine
          a prioritized list of fields to select such data as the From,
          Subject:, and Date: fields.

      35. Mail processing does not skip deleted messages when paging
          down or up the list of items.
          
          Added position() to automatically skip deleted entries when
          scrolling one step forward or back.

      36. Breaking out of passive mode via Cntrl-Break causes the UUIO
          AUX port driver to remain active, which after a period of time
          would crash the system.
          
          Added Cntrl-Break processor c_break() to gracefully:

            *  Hangup the telephone and reset the modem (if a Hayes)

            *  Restore the default AUX port interrupt handler

            *  Return to the original directory UUIO was started from

      37. Mail delivery processing incorrectly alters 'From' lines from
          other systems to '>From'.
          
          Altered local mail processing that a 'From uucp' line is no
          longer added, instead simply using the RFC-822 'Received:'
          line at the top of files to handle separation of mail.

      38. Mail to a host with a direct connection to the local system in
          the local domain would be incorrectly routed via the mail
          server if the host was addressed via its full domain name.
          
          Modified user_at_node() to return the correct (short) name of
          the host as the name to route by.

      39. Disk full condition is ignored, causing creation of zero
          length files.
          
          Added checks in procedures writebuf(), printmsg() and
          sendone() to detect disk full errors.  While these are not all
          the places errors could error, they cause the program to stop
          in its tracks rather than write files into the bit bucket.


                                 - 6 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

      40. Not all PC editors can handle forward slashes in files.
          
          Corrected Invoke_Editor to use backslashes in file names. 
          Fixed in version 1.06a.

     
Completed enhancements:

       1. Added (actually restored commented out literals for) 9600 and
          4800 bps support for Hayes modems.
          
          Performed in version 1.07g.

       2. Received and From lines tend to clutter a top of a message.
          
          Added smart handling of headers in CopyMsg(), which suppresses
          selected headers when copying a message for display or
          forwarding.  Added the type (t) and Type (T) commands to
          optionally print a message with the normally suppressed
          headers.

       3. Messages are sometimes improperly divided into multiple parts
          if they contain "Received:" or "From " lines.
          
          Added MMDF-style line of binary ones (\01) between messages
          when copying them via CopyMsg() and sendone().  This allows
          for future deletion of examining for "Received:" lines. 
          ("From " lines are already ignored.)

       4. Added reply (r) command to mail to allow replying to primary
          sender of a note.

       5. Added prompts for Subject and Carbon copies (Cc:) fields when
          sending mail.

       6. Added shell (!) command invoking inferior command processors
          from mail.

       7. Support should be added for automatically switching between
          passive and active polling; perhaps a driver program is
          needed.
          
          Wrote UUPOLL program for driving UUIO at regular intervals.

       8. Login processing does not really emulate a UNIX system, and is
          not secure.
          
          Fixed following areas in login:

            *  Added hello message with system name, MS-DOS level, and
               port name.

            *  Login prompt is repeated if no user id is entered.


                                 - 7 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

            *  System reports "login failed" if invalid password is
               given.

            *  Added passwd file to support multiple user ids on login.

       9. System cannot be shared between UUPC and other services.
          
          Passwd file includes parameters for optional shells, such as
          Kermit.

      10. Exact version of program is not known during testing.
          
          Added __TIME__ and __DATE__ stamps to timestmp.c for display
          by main().  Also added VERS definition to makefile to define
          standard all modules.

      11. Builtin pager cannot scroll a single line (ala UNIX).
          
          Added code to pageline() to scroll one line if user presses
          <cr>.  Also added clrscr() call to pager().

      12. The user of MAIL has no idea what message he is on aside from
          the ever cryptic message number.
          
          Added display of subject line to selected MAIL options.

      13. ULIB does not use standard symbols for TIMEOUT processing.
          
          Added TIMEOUT symbol to dcp.h, and altered local TIMEOUT
          symbol in dcpgpkt.c to TimeOut to avoid conflicts.

      14. Added optional user parameters 'Organization' and 'Replyto' to
          allow these fields to be automatically inserted in ooutgoing
          mail headers.

      15. Added called() and didcall() procedures to determine if host
          was already connected to by UUIO when performing outgoing
          calls.  This allows multiple entries for the same host in the
          L.SYS file.

      16. Added inithost() and loadalias() to read alias file (defined
          by alias variable in configuration file) in MMDF format:
          
               nick    "full name" <rfc822@domain.address>
          
          and lists of the format:
          
               listname        nick1, nick2, nick3
          
          Added procedures ExplodeAlias(), AliasByNick() and
          AliasByAddr() to perform alias lookup for send and reply
          functions.  Also added alias (a) command to lookup aliases.

      17. MAIL should handle multiple mail servers, especially

                                 - 8 -                                  








December 17, 1989                    UUPC/extended 1.07g changes summary

          automatically queuing mail for the systems listed L.SYS.  The
          mail processor should also handle system aliases and routing
          to remote systems through other than the default mail server.
          
          Added semi-smart routing to handle directly known systems via
          new procedure loadhost() and modified procedure checkname(). 
          Also added support to process hostpath file to allow
          specifying routes for hosts not directly connected (but these
          routes are not inserted into the actual mail header) and
          aliases for both the local and remote systems.

      18. Added function prototypes for most functions.   (The primary
          exception is printmsg(), which with its variable number of
          parameters would require rewriting to legally handle the
          correct function prototype.)

      19. Added emunerated types for selected variables to assist the
          Turbo C symbolic debugger.

     



































                                 - 9 -