---------------------------------------------------------------------------
CHANGES IN THE 3.1.27 RELEASE

Release 3.1.27 is a patch release to smail3.1.26.  This release is
primarily a bug fix, portability-enhancement release.  The total size
of the patch is larger than I expected it to be, based on the number
of bugs fixed, but the changes aren't very intrusive, so users with
custom enhancements should not have too many problems integrating them
into this release.

Also, at the time of the 3.1.27 release, I have a reasonably large
backlog of changes that I intend to include in a near-term release.
However, some of the fixes in this release are of sufficiently high
priority that I don't want to delay the release further to include any
more changes.

Changes in this release:

 *  A bug in the DNS lookup routines was fixed which was causing core
    dumps in dn_expand().

 *  The SHELL variable can now be set on the make command line.  This
    allows the use of alternate, /bin/sh-compatible shells.  Some
    systems (notably Ultrix and Xenix) have /bin/sh bugs which can be
    worked around by using a different shell.  I have also tried to
    reduce the complexity of some shell scripts, in hopes that more
    native shells will work correctly without needing to introduce
    workarounds.

 *  Add an AUTH_DOMAINS list to the EDITME file (alternately,
    auth_domains in the config file) for setting a list of domains for
    which your machine is authoritative.  This prevents the smarthost
    router from matching non-existing hosts in domains for which your
    host has complete routing information.  I included this in this
    release, despite the fact that it is an enhancement, because the
    change is small and because interactions with the smarthost router
    have caused significant confusion lately.  paths files can be used
    for similar purposes, but smail has come to be used more
    extensively on pure Internet machines, which often lack paths
    files.  Explaining why paths files must be used has become more
    trouble for me than it is worth.

 *  The visible_domains and more_hostnames config file variables can
    now be set with the names "domains" and "gateway_names" for
    compatibility with the EDITME file.  Again, explaining the
    differences here were becoming more trouble than the trouble of
    just making this change.

 *  Some problems with uses of the tolower() function have (I hope)
    been fixed.  Unfortunately (I guess), I don't have any non-POSIX
    systems any more, so I can't tell if my fixes are sufficient.

 *  Some changes to the motorolla delta system configuration file were
    contributed by Francesco Potorti` <pot@fly.cnuce.cnr.it>.

 *  Updates to the A/UX samples and conf/os files were added, as
    contributed by Bob Denny.

 *  A typo in the next2.0 configuration file was fixed.  Contributors
    working on NeXT systems have been driving me a bit nuts, given
    that their editor appears to add newlines and blank lines in the
    middle of patch files.  I usually have to apply their patch files
    by hand and I haven't always managed to compensate.

 *  A typo in the sun_os4 configuration file was fixed.  This one was
    purely my fault; I can't blame it on anyone else.

 *  Nigel Metheringham contributed conf/os/mips-bsd4.3.

 *  Some problems with timezones were (hopefully) corrected for NeXT
    machines.

 *  I completely rewrote conf/os/isc2.2.1.  I ripped out all of the
    POSIX features.  Attempts to use POSIX features ran into too many
    header file problems.  Also, what worked with the version of ISC
    that I have access to didn't work with isc3.0.  The new file
    should be sufficiently generic to work with most recent releases
    of Interactive.  I have NOT tested this with gcc.  If this
    configuration file doesn't work with gcc, then don't use gcc.

 *  For systems that have the dbm.h or ndbm.h file in an awkward
    location, the MISC_DEFINES variables DBM_INCLUDE and NDBM_INCLUDE
    can be set to indicate the include paths to use.  See
    conf/os/template for details.

 *  A size_t reference in string.c, which was causing problems
    compiling on a number of systems, was changed to an "int".

 *  The Date header now indicates (by default) the time that the spool
    file was created, rather than the time of message delivery.

 *  Some typos in the smail(5) man page, with respect to UK-only bind
    attributes, were fixed.  The attribute names should now appear
    when you format the man page.

 *  I changed some of the scripts in samples/bsmtp to work better in
    the face of queue directories that exceed ARGMAX.  Some alternate
    scripts were contributed which I may use instead, in a future
    release.

 *  I changed the sender_proto (the name supplied after the "with"
    keyword in Received lines) for batched-SMTP input to "bsmtp".
    Compressed, batched input is now "cbsmtp".

 *  Several bugs were fixed in the samples/generic/* file.  In
    particular, for directors a missing ':' was added and a comment in
    the "lists" entry describing sender_okay was corrected.  For
    transports, notify_comsat was added to the default "local"
    transport.

 *  The program invocation caused by invoking smail as "newaliases" or
    with the "-bi" option, was changed to reset the effective user and
    group IDs to the real user and group IDs.  The previous release
    did (correctly) reset the uid and gid if -oA was used to specify
    an alternate aliases file, but it probably allowed any user to
    rebuild the regular alias file.  I say probably, because a bug was
    causing the uid and gid to be set to random stack garbage, which
    must have been 0 on most systems that tried the feature.

 *  The accept() call on some systems (notably some SVR4 variants,
    though not the one I use) fail if descriptors 0 and 1 aren't in
    use.  Smail now opens /dev/null on descriptors 0 and 1, when
    operating as a daemon.

 *  The spool file format was changed (in an upward compatible, though
    not backward-compatible fashion) so that blank arguments do not
    screw up the argument list stored in spool files.  In earlier
    releases, a blank argument, such as -F "", could corrupt the spool
    file, since it used a blank line to separate an argument list from
    the header list.  I am rather surprised that this bug has managed
    to stay around so long.  It is an original design flaw.

 *  The HELO, RCPT TO, and MAIL FROM requests in SMTP now require a
    non-empty argument.  However, the argument to HELO is still not
    checked for validity.

 *  An extraneous utimbuf declaration was removed from src/sysdep.c
    that was causing difficulties with compilation on some systems.

 *  The files contrib/micnet/*.dif were removed.  These patch files
    were no longer relevent, since the files that they were relative
    to have changed substantially.

 *  Split changes into a separate file from the README file.  It is
    likely that the README file will split further in future releases.
    Some users have commented the the README file has become a bit
    unwieldy.

A short list of changes not included in 3.1.27, which will likely be
included in 3.1.28:

 *  Some authentication of the sending hostname, based on IP addresses
    versus the name supplied in the HELO line to SMTP.

 *  Some enhancements to the message-retry/message-timeout logic,
    including logic to remove stale files.  For now, the following
    shell command can be used periodically to remove stale files:

	find /usr/spool/smail/retry -type -f -mtime +7 -exec rm {} \;

    Removing files older than the message-retry interval is reasonably
    safe, since message-timeout logic is based on the modify time of a
    message spool file, not on retry files.

 *  A rerouter driver, submitted by Uwe Doering.  To remain
    consistent with previous statements, I must restate that I dislike
    hosts that do auto-rerouting.  However, this appears to be
    necessary on the European continent, given the rather arbitrary
    and beaurocratic nature of goings on there.

 *  Significant changes to the logging code, to make log entries much
    more readable, if less grep-able.  The changes were submitted by
    Uwe Doering.  It will be relatively trivial to convert log files
    for use with grep.  Perl scripts should have little problem with
    the new format, although be warned that all existing perl scripts
    will have to be rewritten for use with the next release.  The
    smaillog program will be modified to account for the new format,
    since it is included in the release.


CONTRIBUTORS TO RELEASE 3.1.27

Contributors to this release include Bob Denny, Uwe Doering, Greg Hackney,
Philip Hazel, Ron Heiby, Nigel Metheringham, Jim O'Connor, Chip Salzenberg,
Brian Taylor, Bill Trost, and Stephen J. Walick.
---------------------------------------------------------------------------
The following changes should be applied to the version 3.1.26
sources for smail, to produce smail3.1.27.  The version number
that you are running can be found in the `level' file at the top of
the source tree.  It can also be found by running the command:

	smail -V -v

For information on smail releases and how you can obtain a complete
smail release or a patch release, send mail to the address:

	smail-patch@veritas.com

or to the !-style address:

	...{amdahl,apple,pyramid,uunet}!veritas!smail-patch

include as the first line of the message one of the following lines:

	send help <addr>
	send index <addr>
	send patch <num> <addr>

where <num> is a single patch number (e.g., 17) or a single patch range
(e.g., 4-7) and where <addr> is your address relative to veritas.  The
<addr> is optional and if omitted your return path is used.

The following files are no longer supported in the release and should
be removed by hand:

	contrib/micnet/routers.dif
	contrib/micnet/transports.dif
	samples/AUX-support/guide/LOCAL-CHANGES
	samples/AUX-support/man/LOCAL-INFO
	samples/AUX-support/man/Makefile

The following patch should be applied to the smail3.1.26 release.  To
apply this patch, obtain a copy of the program patch, release 2.0 or
higher.  The patch utility has been posted to the USENET group
comp.sources.unix, and is available from most sites that archive
public domain programs.  Apply this patch using the command:

	patch -p [-d /SMAIL_SOURCE_PATH] < this_patch_file

where "-d /SMAIL_SOURCE_PATH" specifies a root based path to the top of
the smail source tree, and where "patchfile" is the name of the file in
which this patch is stored.  The "-d /SMAIL_SOURCE_PATH" is not needed
if the current directory is already the top of the smail source tree.

NOTE: Don't forget the -p !!!!!

Prereq: PATCH_NUMBER=26
Index: patchnum
***************
*** 1,3 ****
! # @(#)patchnum	1.20 8/15/92 16:35:20
! PATCH_NUMBER=26
! PATCH_DATE=15-aug-1992
--- 1,3 ----
! # @(#)patchnum	1.21 9/8/92 01:40:33
! PATCH_NUMBER=27
! PATCH_DATE=08-sep-1992

Prereq: 3.1.26.7
Index: level
***************
*** 1,2 ****
! # @(#)level	1.21 8/15/92 16:35:18
! 3.1.26.7 Sat Aug 15 16:34:55 PDT 1992
--- 1,2 ----
! # @(#)level	1.22 9/8/92 01:40:27
! 3.1.27.1 Tue Sep  8 01:36:31 PDT 1992

Index: CHANGES
***************
*** 0 ****
--- 1,470 ----
+ CHANGES IN THE 3.1.27 RELEASE
+ 
+ Release 3.1.27 is a patch release to smail3.1.26.  This release is
+ primarily a bug fix, portability-enhancement release.  The total size
+ of the patch is larger than I expected it to be, based on the number
+ of bugs fixed, but the changes aren't very intrusive, so users with
+ custom enhancements should not have too many problems integrating them
+ into this release.
+ 
+ Also, at the time of the 3.1.27 release, I have a reasonably large
+ backlog of changes that I intend to include in a near-term release.
+ However, some of the fixes in this release are of sufficiently high
+ priority that I don't want to delay the release further to include any
+ more changes.
+ 
+ Changes in this release:
+ 
+  *  A bug in the DNS lookup routines was fixed which was causing core
+     dumps in dn_expand().
+ 
+  *  The SHELL variable can now be set on the make command line.  This
+     allows the use of alternate, /bin/sh-compatible shells.  Some
+     systems (notably Ultrix and Xenix) have /bin/sh bugs which can be
+     worked around by using a different shell.  I have also tried to
+     reduce the complexity of some shell scripts, in hopes that more
+     native shells will work correctly without needing to introduce
+     workarounds.
+ 
+  *  Add an AUTH_DOMAINS list to the EDITME file (alternately,
+     auth_domains in the config file) for setting a list of domains for
+     which your machine is authoritative.  This prevents the smarthost
+     router from matching non-existing hosts in domains for which your
+     host has complete routing information.  I included this in this
+     release, despite the fact that it is an enhancement, because the
+     change is small and because interactions with the smarthost router
+     have caused significant confusion lately.  paths files can be used
+     for similar purposes, but smail has come to be used more
+     extensively on pure Internet machines, which often lack paths
+     files.  Explaining why paths files must be used has become more
+     trouble for me than it is worth.
+ 
+  *  The visible_domains and more_hostnames config file variables can
+     now be set with the names "domains" and "gateway_names" for
+     compatibility with the EDITME file.  Again, explaining the
+     differences here were becoming more trouble than the trouble of
+     just making this change.
+ 
+  *  Some problems with uses of the tolower() function have (I hope)
+     been fixed.  Unfortunately (I guess), I don't have any non-POSIX
+     systems any more, so I can't tell if my fixes are sufficient.
+ 
+  *  Some changes to the motorolla delta system configuration file were
+     contributed by Francesco Potorti` <pot@fly.cnuce.cnr.it>.
+ 
+  *  Updates to the A/UX samples and conf/os files were added, as
+     contributed by Bob Denny.
+ 
+  *  A typo in the next2.0 configuration file was fixed.  Contributors
+     working on NeXT systems have been driving me a bit nuts, given
+     that their editor appears to add newlines and blank lines in the
+     middle of patch files.  I usually have to apply their patch files
+     by hand and I haven't always managed to compensate.
+ 
+  *  A typo in the sun_os4 configuration file was fixed.  This one was
+     purely my fault; I can't blame it on anyone else.
+ 
+  *  Nigel Metheringham contributed conf/os/mips-bsd4.3.
+ 
+  *  Some problems with timezones were (hopefully) corrected for NeXT
+     machines.
+ 
+  *  I completely rewrote conf/os/isc2.2.1.  I ripped out all of the
+     POSIX features.  Attempts to use POSIX features ran into too many
+     header file problems.  Also, what worked with the version of ISC
+     that I have access to didn't work with isc3.0.  The new file
+     should be sufficiently generic to work with most recent releases
+     of Interactive.  I have NOT tested this with gcc.  If this
+     configuration file doesn't work with gcc, then don't use gcc.
+ 
+  *  For systems that have the dbm.h or ndbm.h file in an awkward
+     location, the MISC_DEFINES variables DBM_INCLUDE and NDBM_INCLUDE
+     can be set to indicate the include paths to use.  See
+     conf/os/template for details.
+ 
+  *  A size_t reference in string.c, which was causing problems
+     compiling on a number of systems, was changed to an "int".
+ 
+  *  The Date header now indicates (by default) the time that the spool
+     file was created, rather than the time of message delivery.
+ 
+  *  Some typos in the smail(5) man page, with respect to UK-only bind
+     attributes, were fixed.  The attribute names should now appear
+     when you format the man page.
+ 
+  *  I changed some of the scripts in samples/bsmtp to work better in
+     the face of queue directories that exceed ARGMAX.  Some alternate
+     scripts were contributed which I may use instead, in a future
+     release.
+ 
+  *  I changed the sender_proto (the name supplied after the "with"
+     keyword in Received lines) for batched-SMTP input to "bsmtp".
+     Compressed, batched input is now "cbsmtp".
+ 
+  *  Several bugs were fixed in the samples/generic/* file.  In
+     particular, for directors a missing ':' was added and a comment in
+     the "lists" entry describing sender_okay was corrected.  For
+     transports, notify_comsat was added to the default "local"
+     transport.
+ 
+  *  The program invocation caused by invoking smail as "newaliases" or
+     with the "-bi" option, was changed to reset the effective user and
+     group IDs to the real user and group IDs.  The previous release
+     did (correctly) reset the uid and gid if -oA was used to specify
+     an alternate aliases file, but it probably allowed any user to
+     rebuild the regular alias file.  I say probably, because a bug was
+     causing the uid and gid to be set to random stack garbage, which
+     must have been 0 on most systems that tried the feature.
+ 
+  *  The accept() call on some systems (notably some SVR4 variants,
+     though not the one I use) fail if descriptors 0 and 1 aren't in
+     use.  Smail now opens /dev/null on descriptors 0 and 1, when
+     operating as a daemon.
+ 
+  *  The spool file format was changed (in an upward compatible, though
+     not backward-compatible fashion) so that blank arguments do not
+     screw up the argument list stored in spool files.  In earlier
+     releases, a blank argument, such as -F "", could corrupt the spool
+     file, since it used a blank line to separate an argument list from
+     the header list.  I am rather surprised that this bug has managed
+     to stay around so long.  It is an original design flaw.
+ 
+  *  The HELO, RCPT TO, and MAIL FROM requests in SMTP now require a
+     non-empty argument.  However, the argument to HELO is still not
+     checked for validity.
+ 
+  *  An extraneous utimbuf declaration was removed from src/sysdep.c
+     that was causing difficulties with compilation on some systems.
+ 
+  *  The files contrib/micnet/*.dif were removed.  These patch files
+     were no longer relevent, since the files that they were relative
+     to have changed substantially.
+ 
+  *  Split changes into a separate file from the README file.  It is
+     likely that the README file will split further in future releases.
+     Some users have commented the the README file has become a bit
+     unwieldy.
+ 
+ A short list of changes not included in 3.1.27, which will likely be
+ included in 3.1.28:
+ 
+  *  Some authentication of the sending hostname, based on IP addresses
+     versus the name supplied in the HELO line to SMTP.
+ 
+  *  Some enhancements to the message-retry/message-timeout logic,
+     including logic to remove stale files.  For now, the following
+     shell command can be used periodically to remove stale files:
+ 
+ 	find /usr/spool/smail/retry -type -f -mtime +7 -exec rm {} \;
+ 
+     Removing files older than the message-retry interval is reasonably
+     safe, since message-timeout logic is based on the modify time of a
+     message spool file, not on retry files.
+ 
+  *  A rerouter driver, submitted by Uwe Doering.  To remain
+     consistent with previous statements, I must restate that I dislike
+     hosts that do auto-rerouting.  However, this appears to be
+     necessary on the European continent, given the rather arbitrary
+     and beaurocratic nature of goings on there.
+ 
+  *  Significant changes to the logging code, to make log entries much
+     more readable, if less grep-able.  The changes were submitted by
+     Uwe Doering.  It will be relatively trivial to convert log files
+     for use with grep.  Perl scripts should have little problem with
+     the new format, although be warned that all existing perl scripts
+     will have to be rewritten for use with the next release.  The
+     smaillog program will be modified to account for the new format,
+     since it is included in the release.
+ 
+ 
+ CONTRIBUTORS TO RELEASE 3.1.26
+ 
+ Contributors to this release include Bob Denny, Uwe Doering, Greg Hackney,
+ Philip Hazel, Ron Heiby, Nigel Metheringham, Jim O'Connor, Chip Salzenberg,
+ Brian Taylor, Bill Trost, and Stephen J. Walick.
+ 
+ 
+ ----------------------------------------------------------------------------
+ CHANGES IN THE 3.1.26 RELEASE
+ 
+ Release 3.1.26 is a patch release to smail3.1.25.  This release is
+ primarily a functionality enhancement release.  A number of bugs have
+ been fixes as well.
+ 
+ The total number of changes is quite large.  As a result, people with
+ customizations which were not included in 3.1.26 may have a fair amount
+ of work to do.
+ 
+ Important enhancements in this release:
+ 
+  *  Greatly enhanced expansion strings, with conditionals and file
+     lookups.  The original version of this code was written by
+     Chip Salzenberg.
+ 
+  *  Per-transport-configurable header insertion and removal based
+     on the new expansion code.  In addition, the "From:" header can
+     now be configured, including the ability to use a file to find
+     a long form for local users (e.g, to get ronald.s.karr).  The
+     configurable header insertion/removal support can be used to
+     support the Content-Length field, by adding the following
+     generic attributes to the local transport:
+ 
+ 	remove_header="Content-Length",
+ 	append_header="Content-Length: $body_size"
+ 
+     Of some value with SVR4, you can also add a Content-Type
+     header field, if no Content-Type field already exists, with:
+ 
+ 	append_header="${if !header:Content-Type Content-Type: text}"
+ 
+  *  The default Received: header now contains the "from" and "with"
+     keywords, where such information is available.  Information is
+     determined from the HELO line in SMTP, the From_ line in regular
+     uucp mail, or it can be set using the -oMr and -oMs options, for
+     compatibility with sendmail.
+ 
+  *  Smail can now limit connections to the SMTP server, as long as
+     a standalone smail SMTP daemon is used, rather than using inetd
+     to start smtpd per connection attempt.  Two levels are provided:
+     a maximum number of connections that yield immediate message
+     delivery, and a maximum number of allowed connections.  This can
+     greatly help the maximum load that smail places on a server,
+     while allowing fast delivery if the server has light mail
+     activity.  This code was contributed by Chip Salzenberg.
+ 
+  *  Smail now tracks host accessibility for SMTP delivery.  If a host
+     is down, then mail to that host will be deferred immediately
+     (rather than waiting for a connection timeout) until a definable
+     time period expires.  In addition, mail that is undeliverable for
+     a definable time period will be bounced, rather than hanging around
+     in the smail queues forever.  The parameters for retry times and
+     message timeouts are configurable on a per-host or per-domain
+     basis.  Several implementations of these capabilities were
+     submitted, including implementations by Syd Weinstein and Dan Danz.
+     I decided on a version by Chip Salzenberg, which included per-host
+     configurability, and which (eventually) supported the host
+     accessibility tracking.
+ 
+  *  Interactive SMTP receive processes can now timeout.  By default,
+     SMTP command receipt times out after 5 minutes, and receipt of a
+     message after a DATA statement times out after 2 hours.  This was
+     added after an urgent, but gentle, request of Heiko Schlichting,
+     who had 100 receiver processes hanging around waiting forever for
+     SMTP input.  The specific timeouts can be modified in the run-time
+     config file by setting smtp_receive_command_timeout (default 5m)
+     and smtp_receive_message_timeout (default 2h).
+ 
+  *  Support was added for JANET reverse-order domain lookups in the
+     bind router.  Contact Philip Hazel <ph10@cus.cam.ac.uk> for
+     complete support.  The smail3 release contains only that code
+     that needs to be within the smail binary itself.
+ 
+  *  Added support for NeXT netinfo databases (from Dan Danz).
+ 
+  *  The DNS can now be queried within the tcpsmtp transport, without
+     involving the bind router driver.  In previous releases, MX
+     records could be used only if addresses were resolved by the
+     bind router.  Now, under configuration control, the tcpsmtp
+     transport driver can locate MX records itself, such as for
+     mail routed by a local paths file or by a queryprogram router.
+     This support was added, at my request, by Chip Salzenberg.
+ 
+  *  Added a -oX flag to smail that sets the TCP port number used to
+     listen for SMTP connections.  This is helpful in testing, because
+     this (along with the "service" attribute to the tcpsmtp driver)
+     can be used to setup a test network that operates independently
+     of an existing SMTP network.  This can be used to make sure that
+     smail works on your network before replacing an existing mailer.
+ 
+  *  The smail installation process now attempts to preserve replaced
+     binaries from your original operating system in .SAV files.  Thus,
+     your existing /bin/rmail and /usr/lib/sendmail will not be
+     removed, even if smail is reinstalled several times.  Previous
+     releases would (sometimes) keep one backup version (with a .O
+     suffix), which would then be removed on the next install.  The
+     new process makes a .SAV backup file, if one does not exist
+     already, allowing a one-time backup copy on the first installation
+     of smail.  .SAV backup files are made only for files that are
+     considered likely to provided in the base operating system.
+ 
+  *  The uuwho utility now uses searches for domain information, if
+     a full hostname match is not found.  For example, the command:
+ 
+ 	uuwho mitsu.veritas.com
+ 
+     will find the entry for .veritas.com, which does exist while
+     no entry for mitsu.veritas.com exists.  This was added by
+     Chip Salzenberg.
+ 
+  *  By "popular demand" :include: in mailing list and alias files
+     can now be followed by white-space.  This is for compatibility
+     with sendmail.  Comments are NOT allowed after :include:.  For
+     example, the following line:
+ 
+ 	:include: /list-directory/mailing-list
+ 
+     would previously have resulted in errors, but will now result
+     in inclusion of addresses in the file /list-directory/mailing-list.
+ 
+  *  The -bi option from sendmail is now supported, and newaliases is
+     now yet another link to smail.  This support was added to allow
+     existing YP makefiles (which call /usr/lib/sendmail to rebuild
+     the YP mail.aliases dbm file) to use smail3 replacing sendmail.
+     The original version of this enhancement was submitted by
+     Bruce Jerrick.
+ 
+  *  The sdbm library is now integrated in the smail release.  Systems
+     that do not have a native ndbm library now use the sdbm functions
+     to provide multiple DBM-like files.  Native dbm (not ndbm)
+     libraries can be used only if they support the dbmclose() function.
+     This was added by Chip Salzenberg, who was planning to use this
+     in association with his host status monitoring code, but later
+     realized the error of his ways.  But, the changes were left in
+     because they seemed reasonable.
+ 
+  *  The comsat daemon is now supported in the appendfile driver, and
+     is enabled, by default, in the "local" transport.
+ 
+  *  Mail which results in all recipients being eliminated (such as
+     through duplicate elimination or sender elimination within a
+     mailing list), will generate a bounce message.
+ 
+ Some other changes:
+ 
+  *  The sender_okay flag (for configuring removal of the sender
+     from aliasing and mailing list expansion) can now be configured
+     from the EDITME file.
+ 
+  *  Pathalias was updated to match the most recent release available
+     on uunet.
+ 
+  *  The compile process now echoes the results of variable substitition.
+     The previous release would generate lines such as:
+ 
+ 	. ./defs.sh; $CC $CFLAGS $INCLUDES -c foo.c
+ 
+     now, compiles will generate something like:
+ 
+ 	gcc -O -I/usr/include -c foo.c
+ 
+     make -n will still yield annoyingly small amounts of real information.
+ 
+  *  A sufficiently high debugging level will now enable debugging in
+     the resolver library.
+ 
+  *  Included some minor revisions to the bind router by Syd
+     Weinstein, to fetch A records as a second pass after fetching
+     MX records.  Apparently, there are differences in what different
+     servers return in a request for MX records (some return A
+     records, too, some don't).
+ 
+  *  Sytems that require an alternate set of #include files to compile
+     programs that use TCP/IP and sockets can define those #include
+     files in the conf/os files or in the EDITME file.  See
+     conf/os/template for details.
+ 
+  *  Added some AUX support contributed by Robert B. Denny, which can
+     be found in samples/AUX-support.  Most of the changes relate to
+     printing documentation.  Some sample configuration files are
+     also included.
+ 
+  *  Smail now uses SO_REUSEADDR and some appropriate descriptor closes,
+     to allow the smtp/queue-run daemon to be restarted cleanly even
+     if a receiver process has been forked.  Previous releases could get
+     errors in the bind() call indicating an address already in use.
+ 
+  *  A new attribute was added to the gethostbyname router
+     (only_local_domain) that disables matching of hosts outside of
+     the local domain.  This was addedy by Dan Danz.
+ 
+  *  Man pages were previously installed with mode 555.  They are now
+     installed with mode 444.
+ 
+  *  Added a NOTES directory containing messages that I have sent or
+     received that illustrate various points of interest.
+ 
+  *  Building of uuwho databases now differentiates between a #N line
+     introducing a hostname, and a #NOTE, or #North America line
+     introducing a random comment.  Recent map entries caused
+     extra, bogus, entries to be added to uuwho databases.
+ 
+  *  "A" records are now used in the order returned by DNS resolver
+     lookups.  Previously releases would reverse the A records, due
+     to the way these records were being added to a list, internally.
+     The RFCs require that A records be used in order, since they may
+     be sorted by network preference.
+ 
+  *  The local-* transports for local-form delivery to remote hosts
+     now does proper hop-count checking.  These transports use the
+     new local_xform attribute which does local-form transformations
+     without indicating that delivery is actually local.
+     
+ 
+ Some bug fixes:
+ 
+  *  Mail to systems with no MX records, but an A record, will now be
+     handled correctly by the bind router.  I have regular posted a
+     patch for this to various newsgroups and mailing lists, but did
+     not include the fix in an earlier official patch release.
+ 
+  *  Fixed some minor problems with bounce-message generation.  Bounce
+     messages are generated by reinvoking smail and sending the
+     bounce messages as a batched SMTP script.  The sender was
+     specified as <>, in accordance with RFC822, which smail considered
+     a remote address.  However, treating this as mail from a remote
+     system was inappropriate, so an alternate sender token <+>, is
+     now used to indicate a locally-generated bounce message.
+ 
+  *  Nul-terminated some generated strings that were not consistently
+     nul terminated.
+ 
+  *  Fixed some problems resulting from routers that resolve to the
+     local host, requiring further routing of the remainder address.
+ 
+  *  Fixed some problems in the trusted-code logic that was running
+     into problems with the SMTP interaction generated by MH.
+ 
+  *  Errors in .forward files now generate bounces to real-<username>
+     rather than to the postmaster.
+ 
+  *  NEWS_SPOOL_DIR was not being stored in the defs.h file, yielding
+     incorrect behavior from uuwho.
+ 
+  *  Fixed some problems with interactions between the -t and -f options.
+ 
+  *  Fixed some problems with varargs usage in log.c.
+ 
+  *  Include <vfork.h> for Suns, to avoid a problem interacting with
+     -O on Sun4's that could generate core dumps.
+ 
+  *  Fixed some segmentaion violations caused by bogus @foo addresses.
+ 
+  *  Fixed most (all?) places where smail was using a value immediately
+     after it was freed.  This allows smail to work, unmodified, with
+     the SVR3 -lmalloc library, or other versions of malloc that don't
+     leave data from the last free unmodified.
+ 
+  *  get_sender_addr(), which generates the sender address in various
+     important contexts, was returning the same data between multiple
+     calls, when it should have been returning different data.
+ 
+ 
+ CONTRIBUTORS TO RELEASE 3.1.26
+ 
+ This patch was made possible primarily through the work of Chip
+ Salzenberg, who contributed the first version of the enhanced string
+ expansion code (though I extended it rather a lot), the SMTP connection
+ limiting code, the reorganized bind code, plus the changes for the
+ retry file.  He also contributed a large number of minor enhancements
+ and bug fixes.
+ 
+ I don't have a good record of who else contributed code, fixes and
+ suggestions for this patch, but here is a partial list:
+ Tomas Ahl, Jack Bailey, Alan P Barrett, Mark Bixby, Randy Bush,
+ Dan Danz, Bob Denny, Jon Diekema, Michael Faurot, David J. Fiander,
+ Bill Hargen, Philip Hazel, Bill Heiser, Peter Honeyman, Bruce Jerrick,
+ Patrick Lee, Simon Leinen, Hillel Markowitz, Bill Masek, Jan-Piet Mens,
+ Les Mikesell, Lyndon Nerenberg, Jim O'Connor, Jim Pickering, Steve Piette,
+ Francesco Potorti`, Heiko Schlichting, David Schmidt, Monty Solomon,
+ Brian Taylor, Bill Trost, Gary S. Trujillo, Stephen J. Walick,
+ Lauren Weinstein, Syd Weinstein, and Andreas Wettengel.

Index: conf/os/mips-bsd4.3
***************
*** 0 ****
--- 1,61 ----
+ # @(#)conf/os/mips-bsd4.3	1.1 9/8/92 04:05:46
+ #
+ # mips-bsd4.3 - define the characteristics of MIPS in the BSD universe
+ #
+ # Contributed by Nigel Metheringham <nigelm@ohm.york.ac.uk>
+ 
+ # OSNAMES - Names defining this operating system
+ OSNAMES=UNIX_BSD4_3:UNIX_BSD4_2:UNIX_BSD:UNIX
+ 
+ # LOCKING_PROTOCOL - macros for efficient file locking
+ LOCKING_PROTOCOL="\
+ #define lock_fd(fd)	      (flock((fd), LOCK_EX|LOCK_NB) < 0? FAIL: SUCCEED)
+ #define lock_fd_wait(fd)	(flock((fd), LOCK_EX) < 0? FAIL: SUCCEED)
+ #define unlock_fd(fd)		((void) flock((fd), LOCK_UN))
+ #define unlock_fd_wait(fd)	((void) flock((fd), LOCK_UN))
+ #define lock_fd_rd_wait(fd)	(flock((fd), LOCK_SH) < 0? FAIL: SUCCEED)
+ "
+ 
+ # FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
+ FLOCK_MAILBOX=yes
+ 
+ # MAILBOX_DIR - in which directory are user mailbox files
+ MAILBOX_DIR=/usr/spool/mail
+ 
+ # CONSOLE - name of the console device file
+ CONSOLE=/dev/console
+ 
+ # DECLARE_STRINGS - declare string routines, using macros as needed
+ DECLARE_STRINGS="\
+ #include <string.h>
+ #define index strchr
+ #define rindex strrchr
+ "
+ 
+ # SECURE_PATH - directories containing system-supplied user programs
+ SECURE_PATH=/usr/ucb:/bin:/usr/bin
+ 
+ # OSLIBS - name any object libraries containing routines we will need
+ OSLIBS=-ldbm
+ 
+ # DRIVER_CONFIGURATION - configuration file describing smail drivers
+ DRIVER_CONFIGURATION=bsd-network
+ 
+ # RANLIB - how do we organize an existing object archive library
+ RANLIB=ranlib
+ 
+ # CHOWN - command to use for accessing the chown program
+ CHOWN=/bin/chown
+ 
+ # HAVE - what features should be used with this operating system
+ HAVE=RENAME:MKDIR:BSD_NETWORKING:SYSEXITS:NDBM:BSTRING:SYS5STRLIB:GETOPT
+ HAVE=$HAVE:GETHOSTNAME:HASH_BANG:DUP2:READDIR:SETGROUPS:FSYNC:FTRUNCATE:COMSAT
+ 
+ # MISC_DEFINES - miscellaneous definitions
+ #
+ # 4.3BSD has utime(), but does not have a header file containing the
+ # utimbuf structure, so declare it ourselves.
+ MISC_DEFINES=DECLARE_UTIMBUF:USE_TM_TZNAME
+ 
+ # UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
+ UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys

Index: samples/AUX-support/conf/EDITME
***************
*** 0 ****
--- 1,120 ----
+ # @(#)conf/EDITME-dist	1.46 8/15/92 15:52:50
+ #
+ # EDITME - edit me to perform high level configuration of smail...
+ #	   (most comments taken out for editability. See 'dist'.)
+ #
+ # For A/UX V2.0.1 at Alisa Systems, Inc.
+ #
+ #	Use BSD environment, flock() locking, symbolic links,
+ #	our flavor of directory heirarchies.
+ #
+ #	Robert B. Denny
+ #	Alisa Systems, Inc.
+ #	Tue Aug 20 15:02:11 PDT 1991
+ #
+ # Edits:
+ # rbd Thu Sep 12 00:02:04 1991	Change aliases type to lsearch. We don't
+ #				have ndbm. Heed warning!
+ # rbd Mon Nov 25 21:05:27 1991	For smail 3.1.24 (also A/UX 2.0.1). Also
+ #				removed references to UUCP zone (.UUCP).
+ # rbd Tue Nov 26 00:51:34 1991	Final touches.
+ # rbd Thu Nov 28 22:16:00 1991	Turn off DBM for uuwho, turn on UUCP_ZONE.
+ # rbd Mon Feb  3 12:11:08 1992	Turn off DBM for paths, turn off UUCP_ZONE.
+ #				Set up for generic binary distribution.
+ # rbd Sat Feb 15 09:20:20 1992	Change @(#) line for smail 3.1.25. No other
+ #				edits were needed for patch24 -> patch25.
+ # rbd Sat Aug 15 10:43:29 1992	Remove definition of UUCP_SYSTEMS_FILE. See
+ #				comments in ./os/aux2.0. Add -Dmc68000 for
+ #				new resolver 'h' files to define the byte
+ #				order for this machine (68000).
+ # rbd Sun Aug 16 17:13:37 1992	GAD! Smail 3.1.26 released. Changes for this
+ #				new version applied today.
+ 
+ #
+ # Basic compiler and system settings for A/UX
+ #
+ CFLAGS="-O -Dmc68000"
+ STRIP=yes
+ USE_SYMLINKS=yes
+ OS_TYPE=aux2.0
+ ARCH_TYPE=32bit
+ 
+ #
+ # Disable forwarding file support so mailers can tell if new mail
+ # has been seen. Smail-equipped systems don't need this crude
+ # facility anyway...
+ #
+ MISC_DEFINES=NO_FORWARDTO_FILE
+ 
+ #
+ # Look carefully at this stuff.
+ #
+ HOSTNAMES=notset		# PLEASE SET THIS IN YOUR CONFIG FILE!
+ DOMAINS=notset			# PLEASE SET THIS IN YOUR CONFIG FILE!
+ UUCP_ZONE=			# Default to strict SMTP formats
+ POSTMASTER=root			# Root is the postmaster
+ NOBODY=nobody
+ 
+ #
+ # Put the 'real' copy of smail into /usr/local/bin along with its
+ # friends. Leave the name alone. Then install it as sendmail so that
+ # various programs will be happy, and rmail for UUCP deliveries.
+ #
+ SMAIL_BIN_DIR=/usr/local/bin
+ SMAIL_NAME=
+ OTHER_SMAIL_NAMES=/bin/rmail:/usr/lib/sendmail	
+ 
+ LIB_DIR=/usr/local/lib/smail
+ UTIL_BIN_DIR=/usr/local/etc
+ NEWALIASES=/usr/ucb/newaliases
+ 
+ #
+ # Add support for a second config file for maximum flexibility.
+ # This is important for binary-only distributions!
+ #
+ SECOND_CONFIG_FILE=/private/usr/lib/smail # convention for NFS systems
+ 
+ #
+ # Use binary search for paths and aliases. Best tradeoff between 
+ # size and speed for most systems.
+ #
+ PATHS_FILE=paths
+ PATHS_TYPE=bsearch
+ ALIASES_FILE=/usr/lib/aliases
+ ALIASES_TYPE=bsearch
+ 
+ #
+ # Directory/file defaults.
+ #
+ SPOOL_DIRS=/usr/spool/smail
+ LOG_DIR=/usr/spool/smail/log
+ UNSHAR_MAP_DIR=/usr/spool/uumaps
+ NEWS_SPOOL_DIR=/usr/spool/news
+ TMP_DIR=$UNSHAR_MAP_DIR/tmp
+ SECURE_PATH=/bin:/usr/bin:/usr/ucb
+ 
+ #
+ # WARNING! Modified Makefiles are required for proper installation
+ #	   under A/UX! See man/Makefile and man/man[158]/Makefile.
+ #
+ MAN1=/usr/catman/u_man/man1
+ MAN1_EXT=1
+ MAN5=/usr/catman/u_man/man5
+ MAN5_EXT=5
+ MAN8=/usr/catman/a_man/man8
+ MAN8_EXT=8
+ 
+ COMPRESS=compress
+ COMP_FLAG="-f"
+ UNCOMPRESS=uncompress
+ ZCAT=zcat
+ DOT_Z=".Z"
+ 
+ : MISC_C_DEFINES='
+ '
+ 
+ : MISC_SH_DEFINES='
+ '
+ 
+ : MISC_SED_DEFINES='
+ '

Index: Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)Makefile	1.6 7/11/92 11:58:18
  # Top-level makefile for the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)Makefile	1.7 9/6/92 04:39:13
  # Top-level makefile for the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 47,53 ****
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
--- 47,53 ----
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
***************
*** 58,64 ****
  depend:	local_depend subdir_depend
  
  local_depend: check_defs
! 	sh ${MKDEPEND} Makefile
  	. ./${DEFS_SH}; echo "$$DEFS_DEPEND" >> Makefile
  	chmod -w Makefile
  
--- 58,64 ----
  depend:	local_depend subdir_depend
  
  local_depend: check_defs
! 	${SHELL} ${MKDEPEND} Makefile
  	. ./${DEFS_SH}; echo "$$DEFS_DEPEND" >> Makefile
  	chmod -w Makefile
  
***************
*** 69,75 ****
  	 done	# $(MAKE)
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${DEFS_SH}
  	@. ./${DEFS_SH}; \
--- 69,75 ----
  	 done	# $(MAKE)
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${DEFS_SH}
  	@. ./${DEFS_SH}; \

Index: README
***************
*** 13,19 ****
--- 13,23 ----
  sections describe system- and environment-specific configuration
  details that you should be aware of, if they apply to your situation.
  
+ Users of earlier Smail3.1 releases should review the CHANGES file, to
+ see what has changed or to see if some previously encountered problems
+ have been fixed.
  
+ 
  KNOWN PROBLEMS IN THE SMAIL3.1 RELEASE
  
  There are a small number of things that are known to cause problems,
***************
*** 60,73 ****
      At least one user was surprised to find smail using a different timezone
      than some other commands.
  
!  *  I get core dumps on SCO MPX 2.0 when using the bind router (I haven't
!     tried other SCO releases).  Whatever the problem is, it goes away
!     when I compile without -O.  If anybody finds the cause, please
!     let me know.  For now, if you get core dumps when using the bind
!     router on SCO, try compiling without -O.  I haven't tried this with
!     gcc.
  
  
  SUPPORT FOR JANET MAIL
  
  Smail now contains limited support for JANET mail (the reverse-order
--- 64,89 ----
      At least one user was surprised to find smail using a different timezone
      than some other commands.
  
! 
! GENERAL COMPILATION NOTES
! 
! On Interactive, and probably on other systems as well, if you don't
! use an using an ANSI C compiler you will get the following messages
! while compiling:
! 
! 	../../util/dbm_compat.h: 13: bad include syntax
! 	../../util/dbm_compat.h: 22: bad include syntax
! 
! Ignore these messages.  They result from an #ifdef'd out:
  
+ 	#include DBM_INCLUDE
  
+ where the C compiler does not allow macros to name include files.
+ This does cause any problems when compiling on Interactive, beyond the
+ generation of the above messages.  If your compiler really bombs out,
+ remove the offending lines from util/dbm_compat.h.
+ 
+ 
  SUPPORT FOR JANET MAIL
  
  Smail now contains limited support for JANET mail (the reverse-order
***************
*** 79,348 ****
  know.
  
  
- CHANGES IN THE 3.1.26 RELEASE
- 
- Release 3.1.26 is a patch release to smail3.1.25.  This release is
- primarily a functionality enhancement release.  A number of bugs have
- been fixes as well.
- 
- The total number of changes is quite large.  As a result, people with
- customizations which were not included in 3.1.26 may have a fair amount
- of work to do.
- 
- Important enhancements in this release:
- 
-  *  Greatly enhanced expansion strings, with conditionals and file
-     lookups.  The original version of this code was written by
-     Chip Salzenberg.
- 
-  *  Per-transport-configurable header insertion and removal based
-     on the new expansion code.  In addition, the "From:" header can
-     now be configured, including the ability to use a file to find
-     a long form for local users (e.g, to get ronald.s.karr).  The
-     configurable header insertion/removal support can be used to
-     support the Content-Length field, by adding the following
-     generic attributes to the local transport:
- 
- 	remove_header="Content-Length",
- 	append_header="Content-Length: $body_size"
- 
-     Of some value with SVR4, you can also add a Content-Type
-     header field, if no Content-Type field already exists, with:
- 
- 	append_header="${if !header:Content-Type Content-Type: text}"
- 
-  *  The default Received: header now contains the "from" and "with"
-     keywords, where such information is available.  Information is
-     determined from the HELO line in SMTP, the From_ line in regular
-     uucp mail, or it can be set using the -oMr and -oMs options, for
-     compatibility with sendmail.
- 
-  *  Smail can now limit connections to the SMTP server, as long as
-     a standalone smail SMTP daemon is used, rather than using inetd
-     to start smtpd per connection attempt.  Two levels are provided:
-     a maximum number of connections that yield immediate message
-     delivery, and a maximum number of allowed connections.  This can
-     greatly help the maximum load that smail places on a server,
-     while allowing fast delivery if the server has light mail
-     activity.  This code was contributed by Chip Salzenberg.
- 
-  *  Smail now tracks host accessibility for SMTP delivery.  If a host
-     is down, then mail to that host will be deferred immediately
-     (rather than waiting for a connection timeout) until a definable
-     time period expires.  In addition, mail that is undeliverable for
-     a definable time period will be bounced, rather than hanging around
-     in the smail queues forever.  The parameters for retry times and
-     message timeouts are configurable on a per-host or per-domain
-     basis.  Several implementations of these capabilities were
-     submitted, including implementations by Syd Weinstein and Dan Danz.
-     I decided on a version by Chip Salzenberg, which included per-host
-     configurability, and which (eventually) supported the host
-     accessibility tracking.
- 
-  *  Interactive SMTP receive processes can now timeout.  By default,
-     SMTP command receipt times out after 5 minutes, and receipt of a
-     message after a DATA statement times out after 2 hours.  This was
-     added after an urgent, but gentle, request of Heiko Schlichting,
-     who had 100 receiver processes hanging around waiting forever for
-     SMTP input.  The specific timeouts can be modified in the run-time
-     config file by setting smtp_receive_command_timeout (default 5m)
-     and smtp_receive_message_timeout (default 2h).
- 
-  *  Support was added for JANET reverse-order domain lookups in the
-     bind router.  Contact Philip Hazel <ph10@cus.cam.ac.uk> for
-     complete support.  The smail3 release contains only that code
-     that needs to be within the smail binary itself.
- 
-  *  Added support for NeXT netinfo databases (from Dan Danz).
- 
-  *  The DNS can now be queried within the tcpsmtp transport, without
-     involving the bind router driver.  In previous releases, MX
-     records could be used only if addresses were resolved by the
-     bind router.  Now, under configuration control, the tcpsmtp
-     transport driver can locate MX records itself, such as for
-     mail routed by a local paths file or by a queryprogram router.
-     This support was added, at my request, by Chip Salzenberg.
- 
-  *  Added a -oX flag to smail that sets the TCP port number used to
-     listen for SMTP connections.  This is helpful in testing, because
-     this (along with the "service" attribute to the tcpsmtp driver)
-     can be used to setup a test network that operates independently
-     of an existing SMTP network.  This can be used to make sure that
-     smail works on your network before replacing an existing mailer.
- 
-  *  The smail installation process now attempts to preserve replaced
-     binaries from your original operating system in .SAV files.  Thus,
-     your existing /bin/rmail and /usr/lib/sendmail will not be
-     removed, even if smail is reinstalled several times.  Previous
-     releases would (sometimes) keep one backup version (with a .O
-     suffix), which would then be removed on the next install.  The
-     new process makes a .SAV backup file, if one does not exist
-     already, allowing a one-time backup copy on the first installation
-     of smail.  .SAV backup files are made only for files that are
-     considered likely to provided in the base operating system.
- 
-  *  The uuwho utility now uses searches for domain information, if
-     a full hostname match is not found.  For example, the command:
- 
- 	uuwho mitsu.veritas.com
- 
-     will find the entry for .veritas.com, which does exist while
-     no entry for mitsu.veritas.com exists.  This was added by
-     Chip Salzenberg.
- 
-  *  By "popular demand" :include: in mailing list and alias files
-     can now be followed by white-space.  This is for compatibility
-     with sendmail.  Comments are NOT allowed after :include:.  For
-     example, the following line:
- 
- 	:include: /list-directory/mailing-list
- 
-     would previously have resulted in errors, but will now result
-     in inclusion of addresses in the file /list-directory/mailing-list.
- 
-  *  The -bi option from sendmail is now supported, and newaliases is
-     now yet another link to smail.  This support was added to allow
-     existing YP makefiles (which call /usr/lib/sendmail to rebuild
-     the YP mail.aliases dbm file) to use smail3 replacing sendmail.
-     The original version of this enhancement was submitted by
-     Bruce Jerrick.
- 
-  *  The sdbm library is now integrated in the smail release.  Systems
-     that do not have a native ndbm library now use the sdbm functions
-     to provide multiple DBM-like files.  Native dbm (not ndbm)
-     libraries can be used only if they support the dbmclose() function.
-     This was added by Chip Salzenberg, who was planning to use this
-     in association with his host status monitoring code, but later
-     realized the error of his ways.  But, the changes were left in
-     because they seemed reasonable.
- 
-  *  The comsat daemon is now supported in the appendfile driver, and
-     is enabled, by default, in the "local" transport.
- 
-  *  Mail which results in all recipients being eliminated (such as
-     through duplicate elimination or sender elimination within a
-     mailing list), will generate a bounce message.
- 
- Some other changes:
- 
-  *  The sender_okay flag (for configuring removal of the sender
-     from aliasing and mailing list expansion) can now be configured
-     from the EDITME file.
- 
-  *  Pathalias was updated to match the most recent release available
-     on uunet.
- 
-  *  The compile process now echoes the results of variable substitition.
-     The previous release would generate lines such as:
- 
- 	. ./defs.sh; $CC $CFLAGS $INCLUDES -c foo.c
- 
-     now, compiles will generate something like:
- 
- 	gcc -O -I/usr/include -c foo.c
- 
-     make -n will still yield annoyingly small amounts of real information.
- 
-  *  A sufficiently high debugging level will now enable debugging in
-     the resolver library.
- 
-  *  Included some minor revisions to the bind router by Syd
-     Weinstein, to fetch A records as a second pass after fetching
-     MX records.  Apparently, there are differences in what different
-     servers return in a request for MX records (some return A
-     records, too, some don't).
- 
-  *  Sytems that require an alternate set of #include files to compile
-     programs that use TCP/IP and sockets can define those #include
-     files in the conf/os files or in the EDITME file.  See
-     conf/os/template for details.
- 
-  *  Added some AUX support contributed by Robert B. Denny, which can
-     be found in samples/AUX-support.  Most of the changes relate to
-     printing documentation.  Some sample configuration files are
-     also included.
- 
-  *  Smail now uses SO_REUSEADDR and some appropriate descriptor closes,
-     to allow the smtp/queue-run daemon to be restarted cleanly even
-     if a receiver process has been forked.  Previous releases could get
-     errors in the bind() call indicating an address already in use.
- 
-  *  A new attribute was added to the gethostbyname router
-     (only_local_domain) that disables matching of hosts outside of
-     the local domain.  This was addedy by Dan Danz.
- 
-  *  Man pages were previously installed with mode 555.  They are now
-     installed with mode 444.
- 
-  *  Added a NOTES directory containing messages that I have sent or
-     received that illustrate various points of interest.
- 
-  *  Building of uuwho databases now differentiates between a #N line
-     introducing a hostname, and a #NOTE, or #North America line
-     introducing a random comment.  Recent map entries caused
-     extra, bogus, entries to be added to uuwho databases.
- 
-  *  "A" records are now used in the order returned by DNS resolver
-     lookups.  Previously releases would reverse the A records, due
-     to the way these records were being added to a list, internally.
-     The RFCs require that A records be used in order, since they may
-     be sorted by network preference.
- 
-  *  The local-* transports for local-form delivery to remote hosts
-     now does proper hop-count checking.  These transports use the
-     new local_xform attribute which does local-form transformations
-     without indicating that delivery is actually local.
-     
- 
- Some bug fixes:
- 
-  *  Mail to systems with no MX records, but an A record, will now be
-     handled correctly by the bind router.  I have regular posted a
-     patch for this to various newsgroups and mailing lists, but did
-     not include the fix in an earlier official patch release.
- 
-  *  Fixed some minor problems with bounce-message generation.  Bounce
-     messages are generated by reinvoking smail and sending the
-     bounce messages as a batched SMTP script.  The sender was
-     specified as <>, in accordance with RFC822, which smail considered
-     a remote address.  However, treating this as mail from a remote
-     system was inappropriate, so an alternate sender token <+>, is
-     now used to indicate a locally-generated bounce message.
- 
-  *  Nul-terminated some generated strings that were not consistently
-     nul terminated.
- 
-  *  Fixed some problems resulting from routers that resolve to the
-     local host, requiring further routing of the remainder address.
- 
-  *  Fixed some problems in the trusted-code logic that was running
-     into problems with the SMTP interaction generated by MH.
- 
-  *  Errors in .forward files now generate bounces to real-<username>
-     rather than to the postmaster.
- 
-  *  NEWS_SPOOL_DIR was not being stored in the defs.h file, yielding
-     incorrect behavior from uuwho.
- 
-  *  Fixed some problems with interactions between the -t and -f options.
- 
-  *  Fixed some problems with varargs usage in log.c.
- 
-  *  Include <vfork.h> for Suns, to avoid a problem interacting with
-     -O on Sun4's that could generate core dumps.
- 
-  *  Fixed some segmentaion violations caused by bogus @foo addresses.
- 
-  *  Fixed most (all?) places where smail was using a value immediately
-     after it was freed.  This allows smail to work, unmodified, with
-     the SVR3 -lmalloc library, or other versions of malloc that don't
-     leave data from the last free unmodified.
- 
-  *  get_sender_addr(), which generates the sender address in various
-     important contexts, was returning the same data between multiple
-     calls, when it should have been returning different data.
- 
- 
  FUTURE SMAIL3 RELEASES
  
  A preliminary version of the much-mentioned (in the past) Smail3.2
--- 95,100 ----
***************
*** 357,383 ****
  are interested, please send mail.
  
  
- ACKNOWLEDGEMENTS FOR PATCH 26
- 
- This patch was made possible primarily through the work of Chip
- Salzenberg, who contributed the first version of the enhanced string
- expansion code (though I extended it rather a lot), the SMTP connection
- limiting code, the reorganized bind code, plus the changes for the
- retry file.  He also contributed a large number of minor enhancements
- and bug fixes.
- 
- I don't have a good record of who else contributed code, fixes and
- suggestions for this patch, but here is a partial list:
- Tomas Ahl, Jack Bailey, Alan P Barrett, Mark Bixby, Randy Bush,
- Dan Danz, Bob Denny, Jon Diekema, Michael Faurot, David J. Fiander,
- Bill Hargen, Philip Hazel, Bill Heiser, Peter Honeyman, Bruce Jerrick,
- Patrick Lee, Simon Leinen, Hillel Markowitz, Bill Masek, Jan-Piet Mens,
- Les Mikesell, Lyndon Nerenberg, Jim O'Connor, Jim Pickering, Steve Piette,
- Francesco Potorti`, Heiko Schlichting, David Schmidt, Monty Solomon,
- Brian Taylor, Bill Trost, Gary S. Trujillo, Stephen J. Walick,
- Lauren Weinstein, Syd Weinstein, and Andreas Wettengel.
- 
- 
  GENERAL ACKNOWLEDGEMENTS
  
  Some smail3 users go back quite a ways and have provided invaluable
--- 109,114 ----
***************
*** 655,682 ****
  This list is sufficient for the default list of Precedence header
  field values supported by smail.
  
  
! SMAIL AND 4.2BSD AND ULTRIX
  
! To make the output of make more readable, the script conf/lib/xexec.sh
! was added, which echoes its arguments and then execs them.  This is
! done with:
  
! 	echo "	"$*
! 	exec "$@"
  
! There are reports that this doesn't work in Ultrix or stock 4.3BSD.
! The fix (I guess) is to change conf/lib/xexec.sh to:
  
! 	echo $* >&2
! 	exec $*
  
- Note that if you do this, you can't pass any arguments through xexec
- that contain space characters.  Smail doesn't include space characters
- in arguments, by default, but could depending upon what you include in
- your EDITME or conf/os files.
  
  
  PATCHES
  
  Patches may be made available in the future.  These will be announced
--- 386,440 ----
  This list is sufficient for the default list of Precedence header
  field values supported by smail.
  
+ It is possible to configure an SVR4 system to call smail by replacing
+ the file /etc/mail/mailsurr with the line:
+ 
+ 	'(.+)'	'(.+)'	'< /usr/local/smail/bin/smail -em -i \\2'
+ 
+ This works, but it has the annoying side effect of invoking smail
+ multiple times for each address given as an argument to /bin/mail or
+ /bin/rmail.  It is preferable to replace /bin/rmail with smail, and to
+ replace /bin/mail with the mail program supplied in pd/binmail.
  
! To configure SVR4 to use smail for handling SMTP, move the file
! /etc/rc2.d/S88smtpd to /etc/rc2.d/no-S88smtpd, move the file
! /etc/rc0.d/K74smtpd to /etc/rc0.d/no-S74smtpd, and then add a new file
! /etc/rc2.d/S88smail containing:
  
! 	/usr/lib/sendmail -bd -q30m
  
! Then, kill any existing smtpd program and start smail by executing the
! above command.
  
! To convert an SVR4.2 system create the same file above, remove the
! smtpd entry in /etc/inetd.conf, then execute the following commands:
  
! 	sacadm -k -p inetd
! 	sacadm -s -p inetd
! 	/usr/lib/sendmail -bd -q30m
  
  
+ SMAIL AND 4.3BSD OR ULTRIX
  
+ Some versions of Ultrix, plus stock 4.3BSD, have had problems in
+ recent releases with some shell scripts supplied with smail.  I have
+ made some attempts to simplify the offending shell scripts to avoid
+ problems.  However, if errors are still encountered with /bin/sh, then
+ use a different shell, such as ksh, pdksh, or bash, by compiling and
+ installing smail with commands like:
+ 
+ 	make SHELL=/bin/ksh depend
+ 	make SHELL=/bin/ksh all
+ 	make SHELL=/bin/ksh install
+ 
+ Some problems have also been reported with /bin/sh on Xenix.  I don't
+ know if there is an alternate shell available on Xenix.  However,
+ pdksh should compile and run there.  I realize that it seems absurd
+ that regular /bin/sh cannot be used on some systems.  Hopefully the
+ specific problems encountered can be found and remedied for future
+ releases.
+ 
+ 
  PATCHES
  
  Patches may be made available in the future.  These will be announced
***************
*** 703,708 ****
--- 461,470 ----
  subscribe send mail to:
  
  	smail3-users-request@cs.athabascau.ca
+ 
+ I do not have any connection with this list, other than the fact that
+ I maintain the software that it discusses.  So, please don't send list
+ change requests to me.
  
  Please send questions, comments, or anything else you have to say
  either to me, or to the discussion groups.

Index: compat/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)compat/Makefile	1.7 7/11/92 11:58:20
  # Makefile for the smail compat library.
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)compat/Makefile	1.8 9/6/92 04:39:15
  # Makefile for the smail compat library.
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 73,79 ****
  	${GET} $@
  
  ${DEFS_SH}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
--- 73,79 ----
  	${GET} $@
  
  ${DEFS_SH}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
***************
*** 86,92 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  
--- 86,92 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  

Index: conf/EDITME-dist
***************
*** 1,4 ****
! # @(#)conf/EDITME-dist	1.46 8/15/92 15:52:50
  #
  # EDITME - edit me to perform high level configuration of smail
  #
--- 1,4 ----
! # @(#)conf/EDITME-dist	1.49 9/8/92 02:21:22
  #
  # EDITME - edit me to perform high level configuration of smail
  #
***************
*** 166,172 ****
  #OS_TYPE=uts1.2				# UTS/580 release 1.2
  #OS_TYPE=uts2.0				# UTS/580 release 2.0
  #OS_TYPE=xenix5				# SCO Xenix System V
! #OS_TYPE=posix				# Generic P1003.1 system
  #OS_TYPE=isc2.2.1			# Interactive release 2.2.1
  #OS_TYPE=delta				# Motorola delta
  
--- 166,172 ----
  #OS_TYPE=uts1.2				# UTS/580 release 1.2
  #OS_TYPE=uts2.0				# UTS/580 release 2.0
  #OS_TYPE=xenix5				# SCO Xenix System V
! #OS_TYPE=xenix5+tcp			# SCO Xenix System V with TCP/IP
  #OS_TYPE=isc2.2.1			# Interactive release 2.2.1
  #OS_TYPE=delta				# Motorola delta
  
***************
*** 475,480 ****
--- 475,485 ----
  #
  # If you are registered in a domain, you might consider seting HOSTNAMES
  # to a list such as:   sitename.subdom.dom:sitename.dom:sitename.uucp
+ #
+ # NOTE: It is preferable, in most circumstances, to set the hostnames
+ # variable in /usr/lib/smail/config, rather than setting HOSTNAMES
+ # in this file.  The value of the "hostnames" variable in the config
+ # file can be changed without recompiling smail.
  
  #HOSTNAMES=kgbvax.ussr.comm:kgbvax.uucp		# example only
  
***************
*** 495,500 ****
--- 500,510 ----
  #	in the UUCP zone through the USENET maps.  Sites that really
  #	wish to be able to receive mail from anywhere in the world
  #	should get a registered domain.
+ #
+ # NOTE: It is preferable, in most circumstances, to set the domains
+ # variable in /usr/lib/smail/config, rather than setting DOMAINS
+ # in this file.  The value of the "domains" variable in the config
+ # file can be changed without recompiling smail.
  
  DOMAINS=uucp					# common
  #DOMAINS=ussr.comm:uucp				# example only
***************
*** 510,515 ****
--- 520,530 ----
  # Normally, no value is given for this variable, in which case the
  # value will be computed by smail at run-time from the actual name for
  # local host, as computed in a system-dependent fashion.
+ #
+ # NOTE: It is preferable, in most circumstances, to set the uucp_name
+ # variable in /usr/lib/smail/config, rather than setting UUCP_NAME
+ # in this file.  The value of the "uucp_name" variable in the config
+ # file can be changed without recompiling smail.
  
  #UUCP_NAME=kgbvax				# example only
  
***************
*** 530,535 ****
--- 545,555 ----
  # The VISIBLE_NAME value will not be recognized as a name for the local
  # host unless it is also included in one of the other lists of names for
  # the local host.
+ #
+ # NOTE: It is preferable, in most circumstances, to set the visible_name
+ # variable in /usr/lib/smail/config, rather than setting VISIBLE_NAME
+ # in this file.  The value of the "visible_name" variable in the config
+ # file can be changed without recompiling smail.
  
  #VISIBLE_NAME=kgbvax.uucp			# example only
  
***************
*** 545,554 ****
--- 565,610 ----
  #
  # This variable is a colon-separated list of names for the local host
  # which is not computed from the actual name for the local host.
+ #
+ # NOTE: It is preferable, in most circumstances, to set the gateway_names
+ # variable in /usr/lib/smail/config, rather than setting GATEWAY_NAMES
+ # in this file.  The value of the "gateway_names" variable in the config
+ # file can be changed without recompiling smail.
  
  #GATEWAY_NAMES=moscow.ussr.comm:ussr.comm:comm	# example only
  
  
+ # AUTH_DOMAINS - domains for which this host is authoritative
+ #
+ # optional (defaults to none)
+ #
+ # If this host contains all routing information needed for a particular
+ # set of domains, then smail should generate an error if it is given a
+ # hostname that is not resolved, but is within one of those domains.
+ # Normally, this isn't a problem because mail that is not matched by
+ # any routers generates a "host not found" error. However, the
+ # smarthost router can upset this by matching any hostname.  Without
+ # something to generate an error, a mail loop can occur where mail
+ # is sent to a host that controls a domain, and that host sends mail
+ # to another host listed as the "smarthost", which sends it back.
+ #
+ # A host which contains all routing information for a domain is called
+ # "authoritative" for that domain.  A host can be authoritative for
+ # any number of domains.  To declare this host to be authoritative
+ # for this domain, set AUTH_DOMAINS here (or auth_domains in the
+ # /usr/lib/smail/config file) to a colon-separated list of domains.
+ # This will prevent the smarthost router from matching any hosts within
+ # the indicated domains.
+ #
+ # NOTE: It is preferable, in most circumstances, to set the auth_domains
+ # variable in /usr/lib/smail/config, rather than setting AUTH_DOMAINS
+ # in this file.  The value of the "auth_domains" variable in the config
+ # file can be changed without recompiling smail.
+ 
+ #AUTH_DOMAINS=ussr.com
+ #AUTH_DOMAINS=veritas.com:tolerant.com
+ 
+ 
  # POSTMASTER - the default address for the mail administrator
  #
  # optional	(defaults to root)
***************
*** 669,675 ****
  #OTHER_SMAIL_NAMES=/usr/lib/sendmail		# could use this rather
  						# than putting it into
  						# SMAIL_NAME
! #OTHER_SMAIL_NAMES=/bin/rmail:/usr/lib/mail/execmail # for XENIX
  
  
  # LIB_DIR - directory where various smail files are found
--- 725,731 ----
  #OTHER_SMAIL_NAMES=/usr/lib/sendmail		# could use this rather
  						# than putting it into
  						# SMAIL_NAME
! #OTHER_SMAIL_NAMES=/usr/bin/rmail:/usr/lib/mail/execmail # for XENIX
  
  
  # LIB_DIR - directory where various smail files are found
***************
*** 774,780 ****
  #PATHS_FILE=mail.paths				# YP (NIS)
  
  #PATHS_TYPE=dbm					# indexed
! PATHS_TYPE=bsearch				# shorted
  #PATHS_TYPE=lsearch				# linear search
  #PATHS_TYPE=yp					# YP (NIS)
  
--- 830,836 ----
  #PATHS_FILE=mail.paths				# YP (NIS)
  
  #PATHS_TYPE=dbm					# indexed
! PATHS_TYPE=bsearch				# sorted
  #PATHS_TYPE=lsearch				# linear search
  #PATHS_TYPE=yp					# YP (NIS)
  
***************
*** 931,936 ****
--- 987,993 ----
  
  #UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys		# use this for normal UUCP
  #UUCP_SYSTEM_FILE=/usr/lib/uucp/Systems		# use this for HoneyDanBer UUCP
+ #UUCP_SYSTEM_FILE=/etc/uucp/Systems		# for System V Release 4
  
  
  # SPOOL_DIRS - smail spooling directories
***************
*** 944,956 ****
  # directory if desired.
  
  SPOOL_DIRS=/usr/spool/smail			# common
  #SPOOL_DIRS=/usr/spool/smail:/usr2/spool/smail	# use of alternate filesystem
  #SPOOL_DIRS=/usr/smail/spool			# I use this right now
  
  
  # LOG_DIR - smail logging directory
  #
! # optional (defaults to $SPOOL_DIR/log)
  #
  # Smail creates two log files in this directory: logfile and paniclog.
  # The first is a file that logs all incoming messages and deliveries,
--- 1001,1015 ----
  # directory if desired.
  
  SPOOL_DIRS=/usr/spool/smail			# common
+ #SPOOL_DIRS=/var/spool/smail			# for System V Release 4
  #SPOOL_DIRS=/usr/spool/smail:/usr2/spool/smail	# use of alternate filesystem
  #SPOOL_DIRS=/usr/smail/spool			# I use this right now
+ #SPOOL_DIRS=/var/smail/spool			# Another alternative
  
  
  # LOG_DIR - smail logging directory
  #
! # optional (defaults to (more or less) $SPOOL_DIRS/log)
  #
  # Smail creates two log files in this directory: logfile and paniclog.
  # The first is a file that logs all incoming messages and deliveries,
***************
*** 958,964 ****
--- 1017,1025 ----
  # errors that smail can manage to write into the log file.
  
  #LOG_DIR=/usr/spool/smail/log			# common
+ #LOG_DIR=/var/spool/smail/log			# for System V Release 4
  #LOG_DIR=/usr/smail/log				# I use this right now
+ #LOG_DIR=/var/smail/log				# Another alternative
  
  
  # UNSHAR_MAP_DIR - where unshared USENET map files are to be placed
***************
*** 981,986 ****
--- 1042,1048 ----
  # will not function.
  
  UNSHAR_MAP_DIR=/usr/spool/uumaps
+ #UNSHAR_MAP_DIR=/var/spool/uumaps		# for System V Release 4
  
  
  # NEWS_SPOOL_DIR - where news articles are stored

Index: conf/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)conf/Makefile	1.5 7/11/92 11:58:22
  # Makefile for the conf directory in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)conf/Makefile	1.6 9/6/92 04:39:16
  # Makefile for the conf directory in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=..

Index: conf/arch/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)conf/arch/Makefile	1.4 7/11/92 11:58:24
  # Makefile for the architecture descriptions in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)conf/arch/Makefile	1.5 9/6/92 04:39:18
  # Makefile for the architecture descriptions in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: conf/driver/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)conf/driver/Makefile	1.4 7/11/92 11:58:26
  # Makefile for the smail program and associated utilities
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)conf/driver/Makefile	1.5 9/6/92 04:39:19
  # Makefile for the smail program and associated utilities
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: conf/lib/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)conf/lib/Makefile	1.4 7/11/92 11:58:28
  # Makefile for the smail configuration utilities directory
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)conf/lib/Makefile	1.5 9/6/92 04:39:21
  # Makefile for the smail configuration utilities directory
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: conf/lib/arch.h
***************
*** 1,4 ****
! /* @(#)conf/lib/arch.h	1.4 7/11/92 12:09:31 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)conf/lib/arch.h	1.5 9/6/92 03:01:09 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 103,108 ****
--- 103,115 ----
  
  /* if USE_ASCII, rewrite the tolower function */
  #ifdef USE_ASCII
+ # ifdef ANSI_C
+ extern unsigned char lowcase[];		/* lower case conversion table */
+ extern unsigned char upcase[];		/* upper case conversion table */
+ # else	/* not ANSI_C */
+ extern char lowcase[];			/* lower case conversion table */
+ extern char upcase[];			/* upper case conversion table */
+ # endif	/* ANSI_C */
  # define lowercase(c) (lowcase[c])	/* quick table lookup for lower case */
  # define uppercase(c) (upcase[c])	/* quick table lookup for upper case */
  #else

Index: conf/lib/checkdefs.sh
***************
*** 1,6 ****
  :
  #!/bin/sh
! # @(#)conf/lib/checkdefs.sh	1.3 7/11/92 12:09:33
  # Update the defs.h, defs.sh and defs.sed files if they don't exist
  # or will change as a result of differences in the EDITME, os and arch
  # files.
--- 1,6 ----
  :
  #!/bin/sh
! # @(#)conf/lib/checkdefs.sh	1.4 9/6/92 04:39:22
  # Update the defs.h, defs.sh and defs.sed files if they don't exist
  # or will change as a result of differences in the EDITME, os and arch
  # files.
***************
*** 14,27 ****
  # Note:  this shell script uses case rather than test to prevent
  #	 a fork/exec on systems where test is not a builtin.
  #
! # Note:	 We assume that ROOT is passed in the environment.
  
  MKDEFS=$ROOT/conf/lib/mkdefs.sh
  
  if [ ! -f defs.sh ] || [ ! -f defs.sed ] || [ ! -f defs.h ]; then
  	rm -f defs.sh defs.sed defs.h
! 	echo sh $MKDEFS
! 	sh $MKDEFS
  else
  	echo Save copy of defs.sh, defs.h and defs.sed ...
  	if mv defs.sh .defs.sh &&
--- 14,27 ----
  # Note:  this shell script uses case rather than test to prevent
  #	 a fork/exec on systems where test is not a builtin.
  #
! # Note:	 We assume that ROOT and SHELL are passed in the environment.
  
  MKDEFS=$ROOT/conf/lib/mkdefs.sh
  
  if [ ! -f defs.sh ] || [ ! -f defs.sed ] || [ ! -f defs.h ]; then
  	rm -f defs.sh defs.sed defs.h
! 	echo $SHELL $MKDEFS
! 	$SHELL $MKDEFS
  else
  	echo Save copy of defs.sh, defs.h and defs.sed ...
  	if mv defs.sh .defs.sh &&
***************
*** 33,40 ****
  		echo "Failed to save defs.sh defs.h and defs.sed!" 1>&2
  		exit 1
  	fi
! 	echo sh $MKDEFS
! 	sh $MKDEFS
  	if cmp -s defs.sh .defs.sh &&
  	   cmp -s defs.h .defs.h &&
  	   cmp -s defs.sed .defs.sed
--- 33,40 ----
  		echo "Failed to save defs.sh defs.h and defs.sed!" 1>&2
  		exit 1
  	fi
! 	echo $SHELL $MKDEFS
! 	$SHELL $MKDEFS
  	if cmp -s defs.sh .defs.sh &&
  	   cmp -s defs.h .defs.h &&
  	   cmp -s defs.sed .defs.sed

Index: conf/lib/mkdefs.sh
***************
*** 1,5 ****
  #!/bin/sh
! # @(#)conf/lib/mkdefs.sh	1.36 8/8/92 17:33:10
  
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  #    Copyright (C) 1992  Ronald S. Karr
--- 1,5 ----
  #!/bin/sh
! # @(#)conf/lib/mkdefs.sh	1.38 9/8/92 01:09:51
  
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  #    Copyright (C) 1992  Ronald S. Karr
***************
*** 22,31 ****
--- 22,35 ----
  # simple variables that can be set in the EDITME, OS or ARCH files.
  # If these variables are set in the EDITME file, then the version
  # from the EDITME file should override.
+ 
+ # NOTE: The complete VARS string is too long for A/UX.  Split it into
+ #	two parts which are concatenated.
  VARS="\
   ALIASES_FILE\
   ALIASES_REMOVE_SENDER\
   ALIASES_TYPE\
+  AUTH_DOMAINS\
   BIT_PER_CHAR\
   BYTES_PER_ALIGN\
   CC\
***************
*** 32,37 ****
--- 36,42 ----
   CHOWN\
   COMPRESS\
   COMP_FLAG\
+  DOMAINS\
   DOT_Z\
   DRIVER_CONFIGURATION\
   FLOCK_MAILBOX\
***************
*** 52,57 ****
--- 57,64 ----
   MAN8\
   MAN8_EXT\
   MORE_HOSTNAMES\
+ "
+ VARS="$VARS\
   NEWALIASES\
   NEWS_SPOOL_DIR\
   NOBODY\
***************
*** 84,90 ****
   UUCP_ZONE\
   UUWHO_FILE\
   UUWHO_USE_DBM\
-  VISIBLE_DOMAINS\
   VISIBLE_NAME\
   ZCAT\
   SOCKET_INCLUDES\
--- 91,96 ----
***************
*** 629,635 ****
  #define POINTER_TYPE	$POINTER_TYPE
  #define BITS_PER_CHAR	$BITS_PER_CHAR
  #define BYTES_PER_ALIGN	$BYTES_PER_ALIGN
- #include "$RELATIVE_ROOT/conf/lib/arch.h"
  $MISC_C_DEFINES
  #if defined(__STDC__) && !defined(NO_ANSI_C)
  # ifndef ANSI_C
--- 635,640 ----
***************
*** 636,641 ****
--- 641,647 ----
  #  define ANSI_C 1
  # endif
  #endif
+ #include "$RELATIVE_ROOT/conf/lib/arch.h"
  #ifdef NEED_SOCKETS
  #ifdef HAVE_BSD_NETWORKING
  $SOCKET_INCLUDES

Index: conf/lib/mkdepend.sh
***************
*** 1,6 ****
  :
  #!/bin/sh
! # @(#)conf/lib/mkdepend.sh	1.8 7/11/92 12:09:41
  # build a list of dependencies and insert them at the end of the make file
  #
  # usage: makedepend -Idir ... makefile file.c ...
--- 1,6 ----
  :
  #!/bin/sh
! # @(#)conf/lib/mkdepend.sh	1.10 9/8/92 02:40:48
  # build a list of dependencies and insert them at the end of the make file
  #
  # usage: makedepend -Idir ... makefile file.c ...
***************
*** 34,41 ****
  # remove any previous attempts at building the new makefile
  /bin/rm -f X$makefile
  
- exec 3>&1
- 
  # remove everything in the makefile after the magic line
  # and append the dependency information
  ( sed '/^# DO NOT REMOVE THIS LINE/q' < $makefile;
--- 34,39 ----
***************
*** 49,55 ****
  	fi
  
  	# the following line grabs all of the included files
! 	eval echo '"	"'$CC -E -DDEPEND $CPPFLAGS "$i" >&3
  	eval $CC -E -DDEPEND $CPPFLAGS "$i" |
  		# grab filenames from /lib/cpp line and filename information
  		# this is of the form:
--- 47,53 ----
  	fi
  
  	# the following line grabs all of the included files
! 	echo "	$CC -E -DDEPEND $CPPFLAGS $i" 1>&3
  	eval $CC -E -DDEPEND $CPPFLAGS "$i" |
  		# grab filenames from /lib/cpp line and filename information
  		# this is of the form:
***************
*** 76,82 ****
  		      line=line " " $0; n++;
  		    }
  		    END { if (n > 0) { print line } }'
!   done ) > X$makefile
  
  # save a backup copy and replace the old makefile with the new one
  mv -f $makefile .$makefile
--- 74,80 ----
  		      line=line " " $0; n++;
  		    }
  		    END { if (n > 0) { print line } }'
!   done ) 3>&1 > X$makefile
  
  # save a backup copy and replace the old makefile with the new one
  mv -f $makefile .$makefile

Index: conf/lib/xexec.sh
***************
*** 1,5 ****
  :
! # @(#)conf/lib/xexec.sh	1.2 8/8/92 18:21:31
  
  echo "	"$*
! "$@"
--- 1,5 ----
  :
! # @(#)conf/lib/xexec.sh	1.3 9/6/92 04:39:25
  
  echo "	"$*
! $*

Index: conf/os/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)conf/os/Makefile	1.5 7/11/92 11:58:31
  # Makefile for the smail operating system description files
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)conf/os/Makefile	1.6 9/6/92 04:39:27
  # Makefile for the smail operating system description files
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: conf/os/aux2.0
***************
*** 1,27 ****
! # @(#)conf/os/aux2.0	1.1 5/27/91 19:13:35
  #
! # aux2.0 - define characteristics of Apple's A/UX version 2.0
  #
! # From: herbw@wiskit.rain.com
  
! . $ROOT/conf/os/sys5.2		# this is from a System V release 2 base
  
! # OSNAMES - Names
! OSNAMES=$OSNAMES:POSIX_OS:_POSIX_SOURCE
  
! # Disable locking with fcntl or flock calls
! LOCKING_PROTOCOL=
  
! # Add additional libraries for A/UX
! OSLIBS="$OSLIBS -lposix -lc_s -ldbm"
  
! # LOCK_BY_NAME - should spool files use named lock-files for locking
! #
! # Comment out this line if you have the lockf() call (see above).
! LOCK_BY_NAME=yes
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
! DRIVER_CONFIGURATION=bsd-network
  
  # HAVE - what features should be used with this operating system
! HAVE=$HAVE:RENAME:MKDIR:BSD_NETWORKING:DBM:GETHOSTNAME:DUP2:READDIR
--- 1,63 ----
! # @(#)conf/os/aux2.0	2.3 Sun Aug 16 17:46:25 1992
  #
! # aux2.0 - define characteristics of Apple A/UX v2.0/v2.0.1
  #
! # From: denny@alisa.com (for smail 3.1.27)
! #
! #
  
! # OSNAMES - Names defining this operating system
! OSNAMES=UNIX_SYS5_3:UNIX_SYS5:UNIX
  
! # LOCKING_PROTOCOL - macros for efficient file locking
! LOCKING_PROTOCOL="\
! #include <unistd.h>
! #define LOCK_REQUIRES_WRITE
! #define lock_fd(fd)		(lockf((fd), F_TLOCK, 0L) < 0? FAIL: SUCCEED)
! #define lock_fd_wait(fd)	(lockf((fd), F_LOCK, 0L) < 0? FAIL: SUCCEED)
! #define unlock_fd(fd)		((void) lockf((fd), F_ULOCK, 0L))
! #define unlock_fd_wait(fd)	((void) lockf((fd), F_ULOCK, 0L))
! #define USE_FCNTL_RD_LOCK
! #define lock_fd_rd_wait(fd)	(fcntl_rd_lock(fd))
! extern int fcntl_rd_lock();
! "
! 
! 
! # FLOCK_MAILBOX - should mailbox files be locked with lock_fd_wait
! FLOCK_MAILBOX=TRUE
! 
! # MAILBOX_DIR - in which directory are user mailbox files found
! MAILBOX_DIR=/usr/mail
! 
! # CONSOLE - name of the console device file
! CONSOLE=/dev/console
! 
! # DECLARE_STRINGS - declare string routines, using macros as needed
! DECLARE_STRINGS="\
! #include <string.h>
! #define index strchr
! #define rindex strrchr
! "
  
! # SECURE_PATH - directories containing system-supplied user programs
! SECURE_PATH=/usr/ucb:/bin:/usr/bin
  
! # OSLIBS - name any object libraries containing routines we will need
! OSLIBS=" -lc_s -ldbm"
  
! # RANLIB - how do we organize an existing object archive library
! RANLIB=:
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
! DRIVER_CONFIGURATION=arpa-network
  
+ # CHOWN - command to use for accessing the chown program
+ CHOWN=/bin/chown
+ 
  # HAVE - what features should be used with this operating system
! HAVE=RENAME:MKDIR:BSD_NETWORKING:DBM:BSTRING:SYS5STRLIB
! HAVE=$HAVE:GETOPT:GETHOSTNAME:UNAME:HASH_BANG:DUP2:READDIR
! HAVE=$HAVE:VFPRINTF:ULIMIT:BIND
! 
! # MISC_DEFINES - localized smail fixes for A/UX
! MISC_DEFINES=FORCE_DIRSIZ_VALUE=14

Index: conf/os/delta
***************
*** 1,4 ****
! # @(#)conf/os/delta	1.3 8/2/92 01:57:34
  #
  # delta - Motorola delta with 147 board (68030)
  #	  ******************* vvvv IMPORTANT vvvv ********************
--- 1,4 ----
! # @(#)conf/os/delta	1.5 9/6/92 03:03:59
  #
  # delta - Motorola delta with 147 board (68030)
  #	  ******************* vvvv IMPORTANT vvvv ********************
***************
*** 13,25 ****
  DRIVER_CONFIGURATION=bsd-network
  
  # HAVE - what features should be used with this operating system
! HAVE=$HAVE:MKDIR:BSD_NETWORKING:GETHOSTNAME:DBM:YP:ULIMIT:HAVE_HDB
  
  # MISC_DEFINES - miscellaneous things to put in the defs files
  #
- # DECLARE_UTIMBUF - utimbuf is neither declared in <time.h> nor in <sys/time.h>
  # ISC_ACCEPT_BUG  - accept() not interruptible, use select() first
! MISC_DEFINES=DECLARE_UTIMBUF:ISC_ACCEPT_BUG
  
  # COMPRESS(variable) - an executable that compresses files
  # COMP_FLAG(variable) - flag to use to force compression
--- 13,25 ----
  DRIVER_CONFIGURATION=bsd-network
  
  # HAVE - what features should be used with this operating system
! HAVE=$HAVE:BSD_NETWORKING:DBM:GETHOSTNAME:HAVE_HDB:MKDIR:ULIMIT:YP
  
  # MISC_DEFINES - miscellaneous things to put in the defs files
  #
  # ISC_ACCEPT_BUG  - accept() not interruptible, use select() first
! # DBM_INCLUDE	  - location of dbm.h include file
! MISC_DEFINES=ISC_ACCEPT_BUG:DBM_INCLUDE='<rpcsvc/dbm.h>'
  
  # COMPRESS(variable) - an executable that compresses files
  # COMP_FLAG(variable) - flag to use to force compression
***************
*** 37,46 ****
  #
  UUCP_SYSTEM_FILE=/usr/lib/uucp/Systems
  
- # CC - the compiler. We need to access <rpcsvc/dbm.h>
- #
- CC='cc -I/usr/include/rpcsvc'		# for dbm.h
- 
  # OSLIBS(list) - name any object libraries containing routines we will need
  #
  OSLIBS='-lc -lPW'			# use this to get regcmp/regex
--- 37,42 ----
***************
*** 63,69 ****
  MAN5_EXT=4
  MAN8=$MAN1
  MAN8_EXT=1m
- 
- # LOCK_BY_NAME(variable) - should spool files use named lock-files for locking
- #
- LOCK_BY_NAME=TRUE
--- 59,61 ----

Index: conf/os/isc2.2.1
***************
*** 1,46 ****
! # @(#)conf/os/isc2.2.1	1.2 8/9/92 01:16:26
  #
  # isc2.2.1 - define the characteristics of Interactive 2.2.1 with networking
! #            and at least while using gcc
  
  . $ROOT/conf/os/sys5.3
  
  # OSLIBS - name any object libraries containing routines we will need
! OSLIBS="$OSLIBS -linet -lcposix"	# add networking library and POSIX
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network
  
- # CFLAGS - defines passed on the cc command line
- #
- # Define _POSIX_SOURCE so that sys/types.h will define pid_t, and so
- # that unistd.h will define the options for pathconf().  Define in
- # CFLAGS, so that sys/types.h can be included before including defs.h.
- #
- # Defining _POSIX_SOURCE is generally a bad idea, since it usually
- # restricts symbols in header files to only those defined in posix.
- # However, in ISC's case, some needed symbols are defined only if
- # _POSIX_SOURCE is defined.
- CFLAGS=-D_POSIX_SOURCE
- 
- # as evidence of this problem, if _POSIX_SOURCE is defined, the locking
- # commands for lockf() are not defined in unistd.h.  At the same time,
- # if _POSIX_SOURCE is not defined, the pathconf() commands are not
- # defined (again in unistd.h).  The only way to get both is to define
- # one of the two sets outside of unistd.h.  Declare the locking commands
- # before including unistd.h for locking.
- LOCKING_PROTOCOL="
- #define F_ULOCK 0
- #define F_LOCK  1
- #define F_TLOCK 2
- #define F_TEST  3
- #define S_IFMT  0170000
- #define S_IFDIR 0040000
- #define S_IFCHR 0020000
- #define S_IFBLK 0060000
- #define S_IFREG 0100000
- $LOCKING_PROTOCOL"
- 
  # HAVE - what features should be used with this operating system
  HAVE=$HAVE:MKDIR:BSD_NETWORKING:GETHOSTNAME:BIND
  
--- 1,18 ----
! # @(#)conf/os/isc2.2.1	1.3 9/8/92 04:12:03
  #
  # isc2.2.1 - define the characteristics of Interactive 2.2.1 with networking
! #
! # POSIX features available in Interactive are not used because it is
! # too difficult to get #include files correct.
  
  . $ROOT/conf/os/sys5.3
  
  # OSLIBS - name any object libraries containing routines we will need
! OSLIBS="$OSLIBS -linet -lc_s"	# add networking library, shared libc
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network
  
  # HAVE - what features should be used with this operating system
  HAVE=$HAVE:MKDIR:BSD_NETWORKING:GETHOSTNAME:BIND
  
***************
*** 48,51 ****
  #
  # DECLARE_UTIMBUF - utimbuf is not always declared in <sys/time.h>
  # ISC_ACCEPT_BUG  - accept() not interruptible, use select() first
! MISC_DEFINES=DECLARE_UTIMBUF:ISC_ACCEPT_BUG:POSIX_OS
--- 20,23 ----
  #
  # DECLARE_UTIMBUF - utimbuf is not always declared in <sys/time.h>
  # ISC_ACCEPT_BUG  - accept() not interruptible, use select() first
! MISC_DEFINES=DECLARE_UTIMBUF:ISC_ACCEPT_BUG

Index: conf/os/next2.0
***************
*** 1,9 ****
! # @(#)conf/os/next2.0	1.4 8/2/92 00:20:59
  #
  # next2.0 - define the characteristics of NeXT 2.0
  #
  # contributed by roscom!monty@think.com
  # modified 92-02-16 by dan@az.stratus.com (Dan Danz) for  NeXT2.1
  
  # OSNAMES - names for this operating system
  OSNAMES=UNIX_BSD4_3:UNIX_BSD4_2:UNIX_BSD:UNIX
--- 1,10 ----
! # @(#)conf/os/next2.0	1.6 9/8/92 04:06:20
  #
  # next2.0 - define the characteristics of NeXT 2.0
  #
  # contributed by roscom!monty@think.com
  # modified 92-02-16 by dan@az.stratus.com (Dan Danz) for  NeXT2.1
+ # modified 92-09-08 by nigelm@ohm.york.ac.uk (Nigel Metheringham)
  
  # OSNAMES - names for this operating system
  OSNAMES=UNIX_BSD4_3:UNIX_BSD4_2:UNIX_BSD:UNIX
***************
*** 10,17 ****
  
  # LOCKING_PROTOCOL - macros for efficient file locking
  LOCKING_PROTOCOL="\
! #define lock_fd(fd)		(flock((fd), LOCK_EX|LOCK_NB) < 0? FAIL:  
! SUCCEED)
  #define lock_fd_wait(fd)	(flock((fd), LOCK_EX) < 0? FAIL: SUCCEED)
  #define unlock_fd(fd)		((void) flock((fd), LOCK_UN))
  #define unlock_fd_wait(fd)	((void) flock((fd), LOCK_UN))
--- 11,17 ----
  
  # LOCKING_PROTOCOL - macros for efficient file locking
  LOCKING_PROTOCOL="\
! #define lock_fd(fd)	      (flock((fd), LOCK_EX|LOCK_NB) < 0? FAIL: SUCCEED)
  #define lock_fd_wait(fd)	(flock((fd), LOCK_EX) < 0? FAIL: SUCCEED)
  #define unlock_fd(fd)		((void) flock((fd), LOCK_UN))
  #define unlock_fd_wait(fd)	((void) flock((fd), LOCK_UN))
***************
*** 53,59 ****
  NO_HAVE=UNAME:ULIMIT
  
  # MISC_DEFINES - miscellaneous definitions
! MISC_DEFINES=INET_NTOA_USE_STRUCT:WAIT_USE_UNION
  
  # NOBODY - username to use for annonymous situations
  NOBODY=nobody
--- 53,59 ----
  NO_HAVE=UNAME:ULIMIT
  
  # MISC_DEFINES - miscellaneous definitions
! MISC_DEFINES=INET_NTOA_USE_STRUCT:WAIT_USE_UNION:DECLARE_UTIMBUF:USE_TM_TZNAME
  
  # NOBODY - username to use for annonymous situations
  NOBODY=nobody

Index: conf/os/sun_os4
***************
*** 1,4 ****
! # @(#)conf/os/sun_os4	1.9 8/9/92 01:17:09
  #
  # sun_os4 - define the characteristics of SunOS release 4.x
  
--- 1,4 ----
! # @(#)conf/os/sun_os4	1.10 8/17/92 19:19:17
  #
  # sun_os4 - define the characteristics of SunOS release 4.x
  
***************
*** 37,43 ****
  SECURE_PATH=/usr/ucb:/bin:/usr/bin
  
  # OSLIBS - name any object libraries containing routines we will need
! OSLIBS=-ldbm -lresolv
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network
--- 37,43 ----
  SECURE_PATH=/usr/ucb:/bin:/usr/bin
  
  # OSLIBS - name any object libraries containing routines we will need
! OSLIBS="-ldbm -lresolv"
  
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network

Index: conf/os/sys5.4
***************
*** 1,4 ****
! # @(#)conf/os/sys5.4	1.9 8/8/92 18:42:39
  #
  # sys5.4 - define the characteristics of AT&T System V release 4
  
--- 1,4 ----
! # @(#)conf/os/sys5.4	1.11 9/8/92 03:57:52
  #
  # sys5.4 - define the characteristics of AT&T System V release 4
  
***************
*** 23,33 ****
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network	# Always supports DNS
  
  # SECURE_PATH - Path for system-provided user binaries
  SECURE_PATH=/usr/bin
  
  # CONSOLE - path to device for console messages
! CONSOLE=/dev/sysmsg
  
  # COMPRESS, etc. - Select method of file compression (use compress)
  COMPRESS=compress
--- 23,37 ----
  # DRIVER_CONFIGURATION - configuration file describing smail drivers
  DRIVER_CONFIGURATION=arpa-network	# Always supports DNS
  
+ # LMAIL - where the real /bin/mail resides
+ # see the comment in conf/EDITME-dist
+ LMAIL=/bin/lmail
+ 
  # SECURE_PATH - Path for system-provided user binaries
  SECURE_PATH=/usr/bin
  
  # CONSOLE - path to device for console messages
! CONSOLE=/dev/console
  
  # COMPRESS, etc. - Select method of file compression (use compress)
  COMPRESS=compress
***************
*** 38,43 ****
--- 42,48 ----
  
  # HAVE - what features should be used with this operating system
  HAVE=$HAVE:BSD_NETWORKING:YP:HASH_BANG:RLIMIT:NDBM:FSYNC:BIND:COMSAT
+ HAVE=$HAVE:FTRUNCATE:SETGROUPS
  
  # MISC_C_DEFINES - miscellaneous #defines
  # Define data and stack resource limits, to prevent an rlimit of
***************
*** 57,60 ****
  MISC_DEFINES=NO_PALIAS_MYMALLOC
  
  # UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
! UUCP_SYSTEM_FILE=/usr/lib/uucp/Systems
--- 62,65 ----
  MISC_DEFINES=NO_PALIAS_MYMALLOC
  
  # UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
! UUCP_SYSTEM_FILE=/etc/uucp/Systems

Index: conf/os/template
***************
*** 1,4 ****
! # @(#)conf/os/template	1.19 8/8/92 18:42:41
  #
  # template - template for operating system configuration description
  #
--- 1,4 ----
! # @(#)conf/os/template	1.20 9/6/92 01:09:30
  #
  # template - template for operating system configuration description
  #
***************
*** 369,374 ****
--- 369,384 ----
  #		they are not POSIX systems.  The <utime.h> file	is used
  #		automatically for POSIX systems.  For other systems,
  #		<utime.h> can be used by defining INCLUDE_UTIME_H.
+ #
+ #	DBM_INCLUDE='<dbm.h-include-path>'
+ #	NDBM_INCLUDE='<ndbm.h-include-path>'
+ #		Some systems support dbm functions (or ndbm functions)
+ #		but store there interface header files in unusual
+ #		places.  Such systems can set DBM_INCLUDE (NDBM_INCLUDE)
+ #		to point to the dbm (ndbm) include file.  For example,
+ #		the following is not unusual:
+ #
+ #			MISC_DEFINES=DBM_INCLUDE='<rpcsvc/dbm.h>'
  #
  #	void=int
  #		This must be used for systems that do not support the

Index: conf/os/xenix5
***************
*** 1,4 ****
! # @(#)conf/os/xenix5	1.6 8/2/92 03:37:34
  #
  # xenix5 - define the characteristics of SCO Xenix System V
  
--- 1,4 ----
! # @(#)conf/os/xenix5	1.7 8/17/92 17:48:03
  #
  # xenix5 - define the characteristics of SCO Xenix System V
  
***************
*** 55,60 ****
--- 55,63 ----
  # Xenix5.0 dumps core without a TZ env variable.
  # Xenix5.0 does not define strucct utimbuf, so smail must do it itself.
  MISC_DEFINES=REQUIRE_TZ:DECLARE_UTMIBUF
+ 
+ # MISC_C_DEFINES - miscellaneous inclusions in the defs.h files
+ MISC_C_DEFINES="#include <unistd.h>"
  
  # Architecture- and directory-specific definitions
  

Index: contrib/micnet/README
***************
*** 1,4 ****
- 
  #
  #  contrib/micnet/README  1.0
  #
--- 1,3 ----
***************
*** 17,35 ****
  		(also in this directory) and delivery via the transport
  		"remote"
  
- routers.dif - this is a context diff, which when used with "patch" will
- 		add the "micnet_neighbors" router to the 
- 		smaples/generic/routers files.
- 
  transport - this contains the entry for the "remote" transport
  
- transport.dif - a context diff that can be used to patch the "remote" transport
- 		into the samples/generic/transports file.
- 
  micname - a shell script which will return a list of micnet neighbors, to be
  		used by the "micnet_neighbors" router.  It should be put
  		in a directory that will be in smail3's path.
- 
- The diff's are included in anticipation of a Makefile being written which
- will use the info in EDIT_ME and os/whatever to automatically patch the
- routers and transports file, wherever they may be.
--- 16,23 ----

Index: guide/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)guide/Makefile	1.4 7/11/92 11:58:33
  # Makefile for the smail design documentation
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)guide/Makefile	1.5 9/6/92 04:39:28
  # Makefile for the smail design documentation
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=..

Index: guide/admin/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)guide/admin/Makefile	1.5 7/11/92 11:58:35
  # Makefile for the smail administration guide
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)guide/admin/Makefile	1.6 9/6/92 04:39:30
  # Makefile for the smail administration guide
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: guide/admin/config
***************
*** 1,4 ****
! .\" @(#)guide/admin/config	1.4 4/23/92 01:32:59
  .NH
  Setting up Run-time Configuration Files
  .PP
--- 1,4 ----
! .\" @(#)guide/admin/config	1.5 9/6/92 04:13:42
  .NH
  Setting up Run-time Configuration Files
  .PP
***************
*** 91,97 ****
  For example, the file
  .DS I
  postmaster = tron@glotz.uucp
! visible_domains = wall.com
  spool_mode = 0664
  .DE
  sets the default address for the postmaster to ``tron@glotz.uucp'',
--- 91,97 ----
  For example, the file
  .DS I
  postmaster = tron@glotz.uucp
! domains = wall.com
  spool_mode = 0664
  .DE
  sets the default address for the postmaster to ``tron@glotz.uucp'',

Index: man/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)man/Makefile	1.4 7/11/92 11:58:37
  # Makefile for the smail man directories
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/Makefile	1.5 9/6/92 04:39:31
  # Makefile for the smail man directories
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: man/man1/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)man/man1/Makefile	1.6 7/11/92 11:58:39
  # Makefile for the smail section 1 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man1/Makefile	1.7 9/6/92 04:39:33
  # Makefile for the smail section 1 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 87,93 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}
--- 87,93 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}

Index: man/man5/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)man/man5/Makefile	1.6 7/11/92 11:58:41
  # Makefile for the smail section 5 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man5/Makefile	1.7 9/6/92 04:39:34
  # Makefile for the smail section 5 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 73,79 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}
--- 73,79 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}

Index: man/man5/smail.an
***************
*** 1,4 ****
! .\" @(#)man/man5/smail.an	1.32 8/15/92 16:23:36
  .de BD          \"% entry descriptions
  .br
  .TP
--- 1,4 ----
! .\" @(#)man/man5/smail.an	1.35 9/6/92 04:10:09
  .de BD          \"% entry descriptions
  .br
  .TP
***************
*** 547,552 ****
--- 547,558 ----
  .I smail
  program.
  .br
+ .DD auth_domains string off
+ A colon-separated list of domain names for which this host is
+ considered authoritative.  A host that is authoritative for a domain
+ has access to all routing information needed for that domain.  The
+ primary purpose of this variable is to list domains that will not be
+ matched by the \fBsmarthost\fP router driver.
  .DD auto_mkdir boolean on
  If set, then any directories required for spooling and logging
  will be created if they do not exist.
***************
*** 570,576 ****
  be referenced relative to the
  .I smail_lib_dir
  directory.
! .DD date_field string "``Date: $date''"
  This string will be expanded to form the
  .B Date:
  header field.
--- 576,582 ----
  be referenced relative to the
  .I smail_lib_dir
  directory.
! .DD date_field string "``Date: $spool_date''"
  This string will be expanded to form the
  .B Date:
  header field.
***************
*** 694,700 ****
  then the hostnames value will be computed by
  pairing the localhosts's name, computed in a system-dependent
  manner, with all values in the
! .I visible_domains
  attribute list.
  .DD lock_by_name boolean system-dependent
  If this is on, then
--- 700,706 ----
  then the hostnames value will be computed by
  pairing the localhosts's name, computed in a system-dependent
  manner, with all values in the
! .I domains
  attribute list.
  .DD lock_by_name boolean system-dependent
  If this is on, then
***************
*** 799,810 ****
  A colon-separated list of hostnames.
  This list is in addition to any names which may have been
  computed from the
! .B visible_domains
  attribute in forming the value of
  .BR hostnames .
  Thus,
  it is useful for specifying names which are not formed
  from the computed name for the host.
  .DD nobody string "site-dependent: often ``nobody''"
  This names a default user that defines
  permissions when no other user is specified.
--- 805,820 ----
  A colon-separated list of hostnames.
  This list is in addition to any names which may have been
  computed from the
! .B domains
  attribute in forming the value of
  .BR hostnames .
  Thus,
  it is useful for specifying names which are not formed
  from the computed name for the host.
+ .IP
+ The \fBmore_hostnames\fP attribute can also be specified as
+ \fBgateway_names\fP, since the attribute is often used to indicate the
+ list of domains for which this machine is a gateway.
  .DD nobody string "site-dependent: often ``nobody''"
  This names a default user that defines
  permissions when no other user is specified.
***************
*** 1179,1185 ****
  machines, when the
  .B from
  attribute is turned on for a transport.
! .DD visible_domains string "uucp"
  .PD 0
  .DD visible_name string "computed at run time"
  .PD
--- 1189,1195 ----
  machines, when the
  .B from
  attribute is turned on for a transport.
! .DD domains string "uucp"
  .PD 0
  .DD visible_name string "computed at run time"
  .PD
***************
*** 1196,1224 ****
  .B hostnames
  attribute is not specified
  then that attribute will be filled in
! with hostnames of the form \fIhostname\fP.\fIvisible_domain\fP,
  where
  .I hostname
  is derived in a system-dependent manner
  and where
! .IR visible_domain ,
  here,
  is one name from the
! .B visible_domains
  list attribute.
  Each entry in the
! .B visible_domains
  list is used, in order, to created the
  .B hostnames
  value.
  .IP
  For sites in the UUCP zone
! .B visible_domains
  will often merely be the string ``uucp''.
  Finally,
  the variable
  .B $visible_name
  is available in string expansions.
  .br
  .SH DIRECTOR, ROUTER AND TRANSPORT FILE FORMATS
  The
--- 1206,1237 ----
  .B hostnames
  attribute is not specified
  then that attribute will be filled in
! with hostnames of the form \fIhostname\fP.\fIdomain\fP,
  where
  .I hostname
  is derived in a system-dependent manner
  and where
! .IR domain ,
  here,
  is one name from the
! .B domains
  list attribute.
  Each entry in the
! .B domains
  list is used, in order, to created the
  .B hostnames
  value.
  .IP
  For sites in the UUCP zone
! .B domains
  will often merely be the string ``uucp''.
  Finally,
  the variable
  .B $visible_name
  is available in string expansions.
+ .IP
+ For compatibility with earlier versions of smail3.1, the \fBdomains\fP
+ list can also be specified as \fBvisible_domains\fP.
  .br
  .SH DIRECTOR, ROUTER AND TRANSPORT FILE FORMATS
  The
***************
*** 3283,3289 ****
  The following attributes are for use in the UK, where mail routing is
  complicated by the co-existence of both the Internet and the JANET mail
  protocols.
! .BB uk_greybook_transport string
  If this attribute is set, then an address which is matched in the DNS but
  which does not have any usable MX records because they have been discarded
  for UK-specific reasons (see below) will be routed to this transport,
--- 3296,3302 ----
  The following attributes are for use in the UK, where mail routing is
  complicated by the co-existence of both the Internet and the JANET mail
  protocols.
! .BD uk_greybook_transport string
  If this attribute is set, then an address which is matched in the DNS but
  which does not have any usable MX records because they have been discarded
  for UK-specific reasons (see below) will be routed to this transport,
***************
*** 3293,3302 ****
  If this attribute is not set, such an address will cause a `nomatch'
  return, allowing a subsequent router (typically smarthost) to handle the
  message.
! .BB uk_greybook_worldorder boolean
  If this switch is set, addresses that are sent to the greybook transport
  are left in world order, otherwise they are inverted into UK order.
! .BB uk_ignore_gateways string
  A list of known gateways which are not to be used for sending SMTP mail
  within the UK (that is, to addresses that end in `.uk'). For example:
  
--- 3306,3315 ----
  If this attribute is not set, such an address will cause a `nomatch'
  return, allowing a subsequent router (typically smarthost) to handle the
  message.
! .BD uk_greybook_worldorder boolean
  If this switch is set, addresses that are sent to the greybook transport
  are left in world order, otherwise they are inverted into UK order.
! .BD uk_ignore_gateways string
  A list of known gateways which are not to be used for sending SMTP mail
  within the UK (that is, to addresses that end in `.uk'). For example:
  
***************
*** 3306,3318 ****
                        mhs-relay.ac.uk"
  .RE
  
! .BB uk_max_precedencem number
  The highest MX precedence value that is acceptable for an address in the
  UK for SMTP mail. The default value is 999, which disables this option, but
  sites in the UK should normally set it to 9 in accordance with the
  established convention that preference values greater than 9 should not be
  used for intra-UK SMTP mail.
! .BB uk_try_inverting boolean
  If this attribute is set, then when an address cannot be found in the DNS,
  even after widening with the strings given in the widen_domains attribute,
  the original address is inverted (e.g. uk.ac.somewhere becomes
--- 3319,3331 ----
                        mhs-relay.ac.uk"
  .RE
  
! .BD uk_max_precedence number
  The highest MX precedence value that is acceptable for an address in the
  UK for SMTP mail. The default value is 999, which disables this option, but
  sites in the UK should normally set it to 9 in accordance with the
  established convention that preference values greater than 9 should not be
  used for intra-UK SMTP mail.
! .BD uk_try_inverting boolean
  If this attribute is set, then when an address cannot be found in the DNS,
  even after widening with the strings given in the widen_domains attribute,
  the original address is inverted (e.g. uk.ac.somewhere becomes
***************
*** 3401,3406 ****
--- 3414,3424 ----
  An exception is that an address cannot
  be sent to the smarthost driver twice,
  as this would mean that the path to the smarthost was not known.
+ .PP
+ The global configuration variable \fBauth_domains\fP affects the
+ smarthost router by restricting the set of hostnames that can be
+ matched by the smarthost router to hostnames that are outside of the
+ domains listed in \fBauth_domains\fP.
  .PP
  For example, if the site
  .I namei

Index: man/man8/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)man/man8/Makefile	1.6 7/11/92 11:58:44
  # Makefile for the smail section 8 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man8/Makefile	1.7 9/6/92 04:39:36
  # Makefile for the smail section 8 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 58,67 ****
  ${MAN8}: ${DEFS_SED}
  
  ${DEFS_SH} ${DEFS_H} ${DEFS_SED}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  ${VERSION_SH} ${VERSION_H} ${VERSION_SED}:
! 	ROOT=${ROOT} sh ${MKVERSION}
  
  all:
  
--- 58,67 ----
  ${MAN8}: ${DEFS_SED}
  
  ${DEFS_SH} ${DEFS_H} ${DEFS_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  ${VERSION_SH} ${VERSION_H} ${VERSION_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKVERSION}
  
  all:
  
***************
*** 93,99 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}
--- 93,99 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}

Index: pd/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/Makefile	1.7 7/12/92 02:45:11
  # Makefile for items that are in the public domain
  #
  # This file is in the public domain
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/Makefile	1.8 9/6/92 04:39:38
  # Makefile for items that are in the public domain
  #
  # This file is in the public domain
***************
*** 10,16 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 10,16 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 72,83 ****
  depend: local_depend subdir_depend
  
  local_depend: check_defs
! 	sh ${MKDEPEND} Makefile
  	. ./${DEFS_SH}; echo "$$DEFS_DEPEND" >> Makefile
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  subdir_depend:
  	@for i in ${MAKE_SUB_DIRS} strlib; do \
--- 72,83 ----
  depend: local_depend subdir_depend
  
  local_depend: check_defs
! 	${SHELL} ${MKDEPEND} Makefile
  	. ./${DEFS_SH}; echo "$$DEFS_DEPEND" >> Makefile
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  subdir_depend:
  	@for i in ${MAKE_SUB_DIRS} strlib; do \

Index: pd/binmail/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/binmail/Makefile	1.6 6/27/92 17:04:21
  #
  # Makefile for binmail
  #
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/binmail/Makefile	1.7 9/6/92 04:39:40
  #
  # Makefile for binmail
  #
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 72,78 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  # install with care!
  #
--- 72,78 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  # install with care!
  #
***************
*** 85,91 ****
  	   '')	echo LMAIL not defined in EDITME, binmail not installed; \
  		exit 0;;\
  	   esac; \
! 	   sh -c "if [ -f $$LMAIL ]; then \
  	     echo $$LMAIL already exists, it is the old /bin/mail program'?'; \
  	     echo perhaps you should copy $$LMAIL back to /bin/mail'?'; \
  	     echo install not done to be on the safe side; \
--- 85,91 ----
  	   '')	echo LMAIL not defined in EDITME, binmail not installed; \
  		exit 0;;\
  	   esac; \
! 	   ${SHELL} -c "if [ -f $$LMAIL ]; then \
  	     echo $$LMAIL already exists, it is the old /bin/mail program'?'; \
  	     echo perhaps you should copy $$LMAIL back to /bin/mail'?'; \
  	     echo install not done to be on the safe side; \

Index: pd/getopt/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/getopt/Makefile	1.7 6/27/92 17:06:00
  #
  # Makefile for getopt
  
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/getopt/Makefile	1.8 9/6/92 04:39:43
  #
  # Makefile for getopt
  
***************
*** 9,15 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 9,15 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 52,58 ****
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  ${COMPAT_LIB}:
  	cd ${COMPAT_LIB_DIR}; ${MK}
--- 52,58 ----
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  ${COMPAT_LIB}:
  	cd ${COMPAT_LIB_DIR}; ${MK}
***************
*** 68,74 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${UTIL_TARGETS} ${DEFS_SH}
  	@. ./${DEFS_SH}; \
--- 68,74 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${UTIL_TARGETS} ${DEFS_SH}
  	@. ./${DEFS_SH}; \

Index: pd/pathalias/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # Smail SCCS ID: @(#)pd/pathalias/Makefile	1.10 6/27/92 17:07:41
  # pathalias -- by steve bellovin, as told to peter honeyman
  
  # NOTE: this does not build arpatxt, to avoid requiring regular
--- 1,5 ----
  #!/bin/make -f
! # Smail SCCS ID: @(#)pd/pathalias/Makefile	1.11 9/6/92 04:39:46
  # pathalias -- by steve bellovin, as told to peter honeyman
  
  # NOTE: this does not build arpatxt, to avoid requiring regular
***************
*** 11,17 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 11,17 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 75,81 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: all ${DEFS_SH}
  	@. ./${DEFS_SH}; \
--- 75,81 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: all ${DEFS_SH}
  	@. ./${DEFS_SH}; \

Index: pd/sdbm/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/sdbm/Makefile	1.9 6/27/92 17:14:45
  # Makefile for the sdbm library as distributed with smail.
  #
  # See the file COPYING, distributed with smail, for restriction
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/sdbm/Makefile	1.10 9/6/92 04:39:48
  # Makefile for the sdbm library as distributed with smail.
  #
  # See the file COPYING, distributed with smail, for restriction
***************
*** 11,17 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 11,17 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 73,79 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  
--- 73,79 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  

Index: pd/strlib/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/strlib/Makefile	1.5 6/27/92 17:07:49
  
  # Makefile for the public domain string library for smail
  
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/strlib/Makefile	1.6 9/6/92 04:39:51
  
  # Makefile for the public domain string library for smail
  
***************
*** 9,15 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 9,15 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 63,69 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  
--- 63,69 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install:
  

Index: pd/uuwho/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)pd/uuwho/Makefile	1.10 6/27/92 17:07:53
  #
  # Makefile for uuwho
  
--- 1,5 ----
  #!/bin/make -f
! # @(#)pd/uuwho/Makefile	1.11 9/6/92 04:39:55
  #
  # Makefile for uuwho
  
***************
*** 9,15 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 9,15 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 63,69 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${TARGETS} ${DEFS_SH}
  	@. ./${DEFS_SH}; \
--- 63,69 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  install: ${TARGETS} ${DEFS_SH}
  	@. ./${DEFS_SH}; \

Index: samples/AUX-support/AUX-README
***************
*** 1,30 ****
! #@(#)samples/AUX-support/AUX-README	1.1 6/27/92 18:37:12
!                    ============================
!                    Smail 3.1.24 for A/UX V2.0.1
!                    ============================
  
- [[ This was submitted given a 3.1.24 base, but it should work in
-    releases after 3.1.24 -- tron@veritas.com ]]
- 
  By:
  	Robert B. Denny (rbd)
  	denny@alisa.com
! 	Mon Feb  3 10:42:12 1992
  
! This variant of the smail 3.1 kit has changes for A/UX Version 2.0.1.
! Refer to EDITME and to the files mk.out and mkinst.out for transcripts
! of the installation process on my system.
! 
! WARNING: This kit assumes that you have an up-do-date Smail 3.1.24 kit.
! 						            ^^^^^^
! Here is what comes with this kit:
  
  AUX-README		This file
! conf/EDITME		The build-time configuration.
! guide/LOCAL-CHANGES	Describes changes to guide building
  guide/admin/Makefile	Modified guide makefile
- man/LOCAL-INFO		Changes to man page handling
- man/Makefile		Modified man page Makefile
  man/auxman		Scripts for installing manpages on A/UX
  man/linkman
  man/rmvman
--- 1,23 ----
!                        ============================
!                        Smail 3.1.27 for A/UX V2.0.1
!                        ============================
  
  By:
  	Robert B. Denny (rbd)
  	denny@alisa.com
! 	Thu Aug 20 01:42:59 1992
! 
! This kit contains replacements and additions that you need to
! successfully build and install smail 3.1.27 on A/UX 2.0.1.  Refer to
! EDITME for hints at local configuration.  Sorry, but I have not yet
! upgraded to A/UX V3.0.
  
! Here is what comes with this kit (installed relative to samples/AUX-support)
  
  AUX-README		This file
! conf/EDITME		The build-time configuration for my system.
! conf/os/aux2.0		The OS-dependent configuration stuff
  guide/admin/Makefile	Modified guide makefile
  man/auxman		Scripts for installing manpages on A/UX
  man/linkman
  man/rmvman
***************
*** 35,52 ****
  rbd/mkpath.conf		Sample mkpath config file
  rbd/procmaps		Handy cron script for building maps with Cnews
  
  Installation:
  
! Log in as user root and change to the smail kit root directory
! Edit the ./conf/EDITME file. Your directory layout may differ.
! Edit the ./config file and copy it to LIBDIR (/usr/local/lib/smail)
! Edit the ./mkpath.conf file and copy it to LIBDIR/maps
! Build and install. Look at README for information. 
! Print the Guide: 
  	Select a LaserWriter in the Chooser.
  	# cd ./guide/admin 
  	# make troff
! Print the manpages:
  	# cd ../../man/man1
  	# make psprint
  	repeat for man5 and man8
--- 28,81 ----
  rbd/mkpath.conf		Sample mkpath config file
  rbd/procmaps		Handy cron script for building maps with Cnews
  
+ ================
+ Pre-Installation:
+ ================
+ 
+ Unsharing the kit causes the files to be placed into the ./samples/AUX-support
+ directory, where the stuff was put in the first place.
+ 
+ ============
  Installation:
+ ============
+ 
+ (1) Log in as user root and change to the samples/AUX-support directory.
+ 
+ (2) Edit the ./conf/EDITME file. Your directory layout may differ, but
+     I recommend that you use my directory layout.  Now copy the edited 
+     file to the live conf directory.
+ 
+ (3) Edit the ./rbd/config file and copy it to LIBDIR (/usr/local/lib/smail).
+     NOTE: I set HOSTNAMES and DOMAINS to 'notset' in EDITME. You could
+     change them there, but I recommend that you set them in the config
+     file. This permits you to experiment and test without recompiling
+     everything.
  
! (4) Edit the ./rbd/mkpath.conf file and copy it to LIBDIR/maps
! 
! (5) Copy the aux2.0 file into conf/os, replacing any old one that is there.
! 
! (6) Copy the Makefiles under ./man/man1 etc. to the live man/ subdirectories,
!     and the ???man scripts to the live man/ directory.
! 
! (7) Copy the Makefile under ./guide to the live guide/ directory.
! 
! (8) Checklist:
!        [ ]  Edited EDITME in the real conf/ directory
!        [ ]  new aux2.0 file in the live conf/os directory
!        [ ]  man and guide Makefiles replaced the old ones
!        [ ]  auxman, linkman and rmvman in the live man/ directory?
! 
! (9) Build and install. Look at README for information. WARNING, you should
!     do a 'make clobber' to get rid of all old stuff, then do a fresh make
!     depend, and the make.
! 
! (10) Print the Guide: 
  	Select a LaserWriter in the Chooser.
  	# cd ./guide/admin 
  	# make troff
! 
! (11) Print the manpages:
  	# cd ../../man/man1
  	# make psprint
  	repeat for man5 and man8
***************
*** 55,61 ****
  
  If you are using Cnews, the procmaps script will handle unbatching of
  received map articles and rebuilding the paths and uuwho databases.
! Run it from cron once a day or so.
  
  Note that the EDITME definitions are set to build a very vanilla
  configuration. All you need is a tiny config file like the sample
--- 84,90 ----
  
  If you are using Cnews, the procmaps script will handle unbatching of
  received map articles and rebuilding the paths and uuwho databases.
! Run it from cron once a day or so. You can run it as user root.
  
  Note that the EDITME definitions are set to build a very vanilla
  configuration. All you need is a tiny config file like the sample

Index: samples/AUX-support/guide/admin/Makefile
***************
*** 1,6 ****
  #!/bin/make -f
! # @(#)guide/admin/Makefile	1.3 02 Dec 1990 03:51:29
! # modified version: @(#)samples/AUX-support/guide/admin/Makefile	1.2 7/11/92 11:58:46
  # Makefile for the smail administration guide
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)guide/admin/Makefile	1.5 7/11/92 11:58:35
  # Makefile for the smail administration guide
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 10,15 ****
--- 9,15 ----
  # and warranty information.
  #
  # rbd	91.08.19	PostScript printing on A/UX
+ # rbd	92.08.17	For 3.1.26 (no changes to shell code)
  #
  SHELL=/bin/sh
  MAKE=make

Index: samples/AUX-support/man/auxman

Index: samples/AUX-support/man/linkman

Index: samples/AUX-support/man/man1/Makefile
***************
*** 1,6 ****
  #!/bin/make -f
! # @(#)man/man1/Makefile	1.3 02 Dec 1990 03:51:43
! # modified version: @(#)samples/AUX-support/man/man1/Makefile	1.2 7/11/92 11:58:50
  # Makefile for the smail section 1 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man1/Makefile	1.6 7/11/92 11:58:39
  # Makefile for the smail section 1 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 11,19 ****
  #
  # Edited:
  #	Robert B. Denny
! #	Alisa Systems, Inc.
! #	Pasadena, CA  91101
! #	denny@bobmac.alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
--- 10,16 ----
  #
  # Edited:
  #	Robert B. Denny
! #	denny@alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
***************
*** 34,39 ****
--- 31,37 ----
  MKDIRS=${ROOT}/conf/lib/mkdirs.sh
  INSTM=${ROOT}/conf/lib/instm.sh
  INST=${ROOT}/conf/lib/inst.sh
+ XEXEC=${SHELL} ${ROOT}/conf/lib/xexec.sh
  DEFS_SH=defs.sh
  DEFS_H=defs.h
  DEFS_SED=defs.sed

Index: samples/AUX-support/man/man5/Makefile
***************
*** 1,6 ****
  #!/bin/make -f
! # @(#)man/man5/Makefile	1.3a Wed Aug 21 19:20:22 PDT 1991
! # modified version: @(#)samples/AUX-support/man/man5/Makefile	1.2 7/11/92 11:58:52
  # Makefile for the smail section 5 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man5/Makefile	1.6 7/11/92 11:58:41
  # Makefile for the smail section 5 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 11,19 ****
  #
  # Edited:
  #	Robert B. Denny
! #	Alisa Systems, Inc.
! #	Pasadena, CA  91101
! #	denny@bobmac.alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
--- 10,16 ----
  #
  # Edited:
  #	Robert B. Denny
! #	denny@alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
***************
*** 34,39 ****
--- 31,37 ----
  MKDIRS=${ROOT}/conf/lib/mkdirs.sh
  INSTM=${ROOT}/conf/lib/instm.sh
  INST=${ROOT}/conf/lib/inst.sh
+ XEXEC=${SHELL} ${ROOT}/conf/lib/xexec.sh
  DEFS_SH=defs.sh
  DEFS_H=defs.h
  DEFS_SED=defs.sed

Index: samples/AUX-support/man/man8/Makefile
***************
*** 1,6 ****
  #!/bin/make -f
! # @(#)man/man8/Makefile	1.3a Wed Aug 21 19:20:22 PDT 1991
! # modified version: @(#)samples/AUX-support/man/man8/Makefile	1.2 7/11/92 11:58:54
  # Makefile for the smail section 8 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)man/man8/Makefile	1.6 7/11/92 11:58:44
  # Makefile for the smail section 8 man pages
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 11,19 ****
  #
  # Edited:
  #	Robert B. Denny
! #	Alisa Systems, Inc.
! #	Pasadena, CA  91101
! #	denny@bobmac.alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
--- 10,16 ----
  #
  # Edited:
  #	Robert B. Denny
! #	denny@alisa.com
  #
  #	Changes for A/UX V2, man page handling is quite different.
  #	Added "ps" to create PostScript flavor files, "print" to
***************
*** 34,39 ****
--- 31,37 ----
  MKDIRS=${ROOT}/conf/lib/mkdirs.sh
  INSTM=${ROOT}/conf/lib/instm.sh
  INST=${ROOT}/conf/lib/inst.sh
+ XEXEC=${SHELL} ${ROOT}/conf/lib/xexec.sh
  DEFS_SH=defs.sh
  DEFS_H=defs.h
  DEFS_SED=defs.sed

Index: samples/AUX-support/man/rmvman

Index: samples/AUX-support/rbd/config
***************
*** 1,4 ****
- # @(#)samples/AUX-support/rbd/config	1.1 6/27/92 18:37:32
  # Smail 3.1 config file for dakota.alisa.com
  #
  # Bob Denny - Mon Feb  3 16:02:38 1992
--- 1,3 ----
***************
*** 5,8 ****
  #
  postmaster=denny		# I get error messages
  visible_domains=alisa.com	# Our domain
! -hostnames			# Run-time computation of host names
--- 4,61 ----
  #
  postmaster=denny		# I get error messages
  visible_domains=alisa.com	# Our domain
! -hostnames			# Run-time computation of host namesEND_OF_FILE
! if test 217 -ne `wc -c <'samples/AUX-support/rbd/config'`; then
!     echo shar: \"'samples/AUX-support/rbd/config'\" unpacked with wrong size!
! fi
! # end of 'samples/AUX-support/rbd/config'
! fi
! if test -f 'samples/AUX-support/rbd/mkpath.conf' -a "${1}" != "-c" ; then 
!   echo shar: Will not clobber existing file \"'samples/AUX-support/rbd/mkpath.conf'\"
! else
! echo shar: Extracting \"'samples/AUX-support/rbd/mkpath.conf'\" \(1243 characters\)
! sed "s/^X//" >'samples/AUX-support/rbd/mkpath.conf' <<'END_OF_FILE'
! # mkpath.conf - build the paths database input for smail using mkpaths(8)
! #
! # Builds the paths file (dbm style) into LIB_DIR (/usr/local/lib/smail)
! #
! # NOTE: Requires <localhost>.map in LIB_DIR/maps which overrides any
! #	connectivity data that may be in the usenet maps. Also,
! #	any other local maps must exist in LIB_DIR/maps/????.map.
! #
! # By:	Bob Denny
! #	Fri Sep 13 12:53:33 1991
! #	Delete my near neighbors until I get new maps...
! #
! # Bob Denny - Sun Oct 27 23:55:15 PST 1991
! #	Add dcthree to local overrides.
! # Bob Denny - Mon Feb  3 15:31:34 1992
! #	Change 'paths' file to be bsearch'ed, rather than dbm.
! #
! # NOTE: Blank lines in this file generate no-op pathalias directives.
! #
! # Get the usenet world maps
! cd /usr/spool/uumaps
! safemap [ud].*
! #
! # Delete ourselves from the usenet map info.
! #
! delete `uuname -l`
! #
! # Delete near neighbors... We have most current info.
! # Don't ask why "delete foo" doesn't work... 
! #
! delete `echo dogcow`
! delete `echo dcthree`
! delete `echo flying`
! #
! # Add in our local host's map entry (latest and greatest)
! # and merge in any other local/new maps
! #
! cd /usr/local/lib/smail/maps
! map *.map
! #
! # Now make the "paths" file for smail in the LIB_DIR.
! #
! cd /usr/local/lib/smail
! pathsort > /usr/local/lib/smail/paths

Index: samples/AUX-support/rbd/mkpath.conf
***************
*** 1,45 ****
! # @(#)samples/AUX-support/rbd/mkpath.conf	1.1 6/27/92 18:37:34
! # mkpath.conf - build the paths database input for smail using mkpaths(8)
! #
! # Builds the paths file (dbm style) into LIB_DIR (/usr/local/lib/smail)
! #
! # NOTE: Requires <localhost>.map in LIB_DIR/maps which overrides any
! #	connectivity data that may be in the usenet maps. Also,
! #	any other local maps must exist in LIB_DIR/maps/????.map.
! #
! # By:	Bob Denny
! #	Fri Sep 13 12:53:33 1991
! #	Delete my near neighbors until I get new maps...
! #
! # Bob Denny - Sun Oct 27 23:55:15 PST 1991
! #	Add dcthree to local overrides.
! # Bob Denny - Mon Feb  3 15:31:34 1992
! #	Change 'paths' file to be bsearch'ed, rather than dbm.
! #
! # NOTE: Blank lines in this file generate no-op pathalias directives.
! #
! # Get the usenet world maps
! cd /usr/spool/uumaps
! safemap [ud].*
! #
! # Delete ourselves from the usenet map info.
! #
! delete `uuname -l`
! #
! # Delete near neighbors... We have most current info.
! # Don't ask why "delete foo" doesn't work... 
! #
! delete `echo dogcow`
! delete `echo dcthree`
! delete `echo flying`
! #
! # Add in our local host's map entry (latest and greatest)
! # and merge in any other local/new maps
! #
! cd /usr/local/lib/smail/maps
! map *.map
! #
! # Now make the "paths" file for smail in the LIB_DIR.
! #
! cd /usr/local/lib/smail
! pathsort > /usr/local/lib/smail/paths
--- 1,44 ----
! X# mkpath.conf - build the paths database input for smail using mkpaths(8)
! X#
! X# Builds the paths file (dbm style) into LIB_DIR (/usr/local/lib/smail)
! X#
! X# NOTE: Requires <localhost>.map in LIB_DIR/maps which overrides any
! X#	connectivity data that may be in the usenet maps. Also,
! X#	any other local maps must exist in LIB_DIR/maps/????.map.
! X#
! X# By:	Bob Denny
! X#	Fri Sep 13 12:53:33 1991
! X#	Delete my near neighbors until I get new maps...
! X#
! X# Bob Denny - Sun Oct 27 23:55:15 PST 1991
! X#	Add dcthree to local overrides.
! X# Bob Denny - Mon Feb  3 15:31:34 1992
! X#	Change 'paths' file to be bsearch'ed, rather than dbm.
! X#
! X# NOTE: Blank lines in this file generate no-op pathalias directives.
! X#
! X# Get the usenet world maps
! Xcd /usr/spool/uumaps
! Xsafemap [ud].*
! X#
! X# Delete ourselves from the usenet map info.
! X#
! Xdelete `uuname -l`
! X#
! X# Delete near neighbors... We have most current info.
! X# Don't ask why "delete foo" doesn't work... 
! X#
! Xdelete `echo dogcow`
! Xdelete `echo dcthree`
! Xdelete `echo flying`
! X#
! X# Add in our local host's map entry (latest and greatest)
! X# and merge in any other local/new maps
! X#
! Xcd /usr/local/lib/smail/maps
! Xmap *.map
! X#
! X# Now make the "paths" file for smail in the LIB_DIR.
! X#
! Xcd /usr/local/lib/smail
! Xpathsort > /usr/local/lib/smail/paths

Index: samples/AUX-support/rbd/procmaps
***************
*** 1,6 ****
  #!/bin/sh
! # @(#)samples/AUX-support/rbd/procmaps	1.1 6/27/92 18:37:35
! # procmaps - Process incoming Usenet maps
  #
  # Bob Denny - Tue Sep 24 14:14:29 1991
  #
--- 1,5 ----
  #!/bin/sh
! # @(#) procmaps - Process incoming Usenet maps
  #
  # Bob Denny - Tue Sep 24 14:14:29 1991
  #

Index: samples/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)samples/Makefile	1.3 7/11/92 11:58:56
  # Makefile for the samples directory in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)samples/Makefile	1.4 9/6/92 04:40:07
  # Makefile for the samples directory in the smail source tree
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 15,21 ****
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=..
--- 15,21 ----
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=..

Index: samples/bsmtp/batchsmtp.sh
***************
*** 1,11 ****
  #!/bin/sh
! # @(#)samples/bsmtp/batchsmtp.sh	1.5 7/30/92 06:03:45
  
  # deliver messages accumlated into subdirectories of the
  # outq spool directory.  Subdirectory names are based on
  # the actual hostnames involved:
  
! LOCALHOST=busboy.uts.amdahl.com
  MAXSIZE=100000
  
  OUTQ=/usr/spool/smail/outq
--- 1,11 ----
  #!/bin/sh
! # @(#)samples/bsmtp/batchsmtp.sh	1.6 9/6/92 04:37:45
  
  # deliver messages accumlated into subdirectories of the
  # outq spool directory.  Subdirectory names are based on
  # the actual hostnames involved:
  
! LOCALHOST=veritas.veritas.com
  MAXSIZE=100000
  
  OUTQ=/usr/spool/smail/outq
***************
*** 14,31 ****
  cd $OUTQ || exit 1
  
  # loop through all of the subdirectories
! for i in *
  do
      (
  	# change to directory or exit subshell
! 	test -d $i || exit
! 	cd $i || exit 1
  
  	# send multiple batches
  	while :
  	do
  		# get the list of message files; quit if none
! 		msgs="`ls q* 2>/dev/null`"
  		test -n "$msgs" || break
  
  		# accumulate until total size exceeds maximum
--- 14,31 ----
  cd $OUTQ || exit 1
  
  # loop through all of the subdirectories
! for host in *
  do
      (
  	# change to directory or exit subshell
! 	test -d $host || exit
! 	cd $host || exit 1
  
  	# send multiple batches
  	while :
  	do
  		# get the list of message files; quit if none
! 		msgs="`ls 2>/dev/null | grep '^q'`"
  		test -n "$msgs" || break
  
  		# accumulate until total size exceeds maximum
***************
*** 42,52 ****
  
  		# send messages, adding HELO and QUIT commands
  		( echo "HELO $LOCALHOST"
! 		  cat $send
! 		  echo QUIT ) | $UUX - $i!rsmtp
  
  		# remove messages that were sent
! 		rm $send
  	done
      )
  done
--- 42,58 ----
  
  		# send messages, adding HELO and QUIT commands
  		( echo "HELO $LOCALHOST"
! 		  for f in $send
! 		  do
! 			  cat $f
! 		  done
! 		  echo QUIT ) | $UUX - $host!rsmtp
  
  		# remove messages that were sent
! 		for f in $send
! 		do
! 			rm $f
! 		done
  	done
      )
  done

Index: samples/bsmtp/cbsmtp.sh
***************
*** 1,11 ****
  #!/bin/sh
! # @(#)samples/bsmtp/cbsmtp.sh	1.4 11/3/91 02:13:06
  
  # deliver messages accumlated into subdirectories of the
  # outq spool directory.  Subdirectory names are based on
  # the actual hostnames involved:
  
! LOCALHOST=busboy.uts.amdahl.com
  MAXSIZE=100000
  
  OUTQ=/usr/spool/smail/outq
--- 1,11 ----
  #!/bin/sh
! # @(#)samples/bsmtp/cbsmtp.sh	1.5 9/6/92 04:37:49
  
  # deliver messages accumlated into subdirectories of the
  # outq spool directory.  Subdirectory names are based on
  # the actual hostnames involved:
  
! LOCALHOST=veritas.veritas.com
  MAXSIZE=100000
  
  OUTQ=/usr/spool/smail/outq
***************
*** 15,32 ****
  cd $OUTQ || exit 1
  
  # loop through all of the subdirectories
! for i in *
  do
      (
  	# change to directory or exit subshell
! 	test -d $i || exit
! 	cd $i || exit 1
  
  	# send multiple batches
  	while :
  	do
  		# get the list of message files; quit if none
! 		msgs="`ls q* 2>/dev/null`"
  		test -n "$msgs" || break
  
  		# accumulate until total size exceeds maximum
--- 15,32 ----
  cd $OUTQ || exit 1
  
  # loop through all of the subdirectories
! for host in *
  do
      (
  	# change to directory or exit subshell
! 	test -d $host || exit
! 	cd $host || exit 1
  
  	# send multiple batches
  	while :
  	do
  		# get the list of message files; quit if none
! 		msgs="`ls 2>/dev/null | grep '^q'`"
  		test -n "$msgs" || break
  
  		# accumulate until total size exceeds maximum
***************
*** 43,53 ****
  
  		# send compressed messages, adding HELO and QUIT commands
  		( echo "HELO <$LOCALHOST>"
! 		  cat $send
! 		  echo QUIT ) | $COMPRESS | $UUX - $i!rsmtp
  
  		# remove messages that were sent
! 		rm $send
  	done
      )
  done
--- 43,59 ----
  
  		# send compressed messages, adding HELO and QUIT commands
  		( echo "HELO <$LOCALHOST>"
! 		  for f in $send
! 		  do
! 			  cat $f
! 		  done
! 		  echo QUIT ) | $COMPRESS | $UUX - $host!rsmtp
  
  		# remove messages that were sent
! 		for f in $send
! 		do
! 			rm $f
! 		done
  	done
      )
  done

Index: samples/bsmtp/rcsmtp.sh
***************
*** 1,5 ****
  #!/bin/sh
! # @(#)samples/bsmtp/rcsmtp.sh	1.3 7/11/92 12:01:24
  
  # Receive compressed batches of SMTP commands and send them
  # to smail.
--- 1,5 ----
  #!/bin/sh
! # @(#)samples/bsmtp/rcsmtp.sh	1.4 9/6/92 04:16:11
  
  # Receive compressed batches of SMTP commands and send them
  # to smail.
***************
*** 6,10 ****
  
  # the following line should be changed to reflect the
  # organization of your system.
! /usr/local/bin/compress -d | /bin/rsmtp
  exit 0
--- 6,10 ----
  
  # the following line should be changed to reflect the
  # organization of your system.
! /usr/local/bin/compress -d | /bin/rsmtp -oMr cbsmtp
  exit 0

Index: samples/generic/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)samples/generic/Makefile	1.3 7/11/92 11:58:59
  # Makefile for the generic configuration file samples
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)samples/generic/Makefile	1.4 9/6/92 04:40:09
  # Makefile for the generic configuration file samples
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 15,21 ****
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 15,21 ----
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: samples/generic/config
***************
*** 1,4 ****
! # @(#)samples/generic/config	1.6 8/8/92 16:26:40
  
  # This file specifies all of the config file variables, and gives
  # default values all of them.  The default values correspond to
--- 1,4 ----
! # @(#)samples/generic/config	1.7 9/6/92 04:14:28
  
  # This file specifies all of the config file variables, and gives
  # default values all of them.  The default values correspond to
***************
*** 17,59 ****
  # you wish to modify, you will avoid setting inappropriate values for
  # os-dependent attributes.
  
  +auto_mkdir
! auto_mkdir_mode = 0755
! console = /dev/console
! copying_file = COPYING
! date_field = "Date: $date"
! delivery_mode = background
! director_file = directors
  -error_copy_postmaster
  # +flock_mailbox 		# under 4.3BSD
  -flock_mailbox			# otherwise
! fnlock_interval = 3
! fnlock_mode = 0666
! fnlock_retries = 5
! from_field = "From: $sender${if def:sender_name: ($sender_name)}"
! grades = "special-delivery:9:air-mail:A:first-class:C:bulk:a:junk:n"
! hit_table_len = 241
  -hostnames
  -lock_by_name			# on BSD systems or System V.2/V.3
  # +lock_by_name			# otherwise
! lock_mode = 0444
! log_mode = 0644
! logfile = /usr/spool/smail/log/logfile
! max_hop_count = 20
! max_message_size = 100k
! # message_buf_size = 4096	# for machines with small memories
! message_buf_size = 100k		# otherwise
! message_id_field = "Message-Id: <$message_id@$primary_name>"
! message_log_mode = 0664
! method_dir = methods
  -more_hostnames
! nobody = nobody			# under 4.3BSD or SunOS
! # nobody = guest		# another possibility
! open_interval = 2
! open_retries = 0		# if an atomic rename() is available
! # open_retries = 2		# otherwise
! paniclog = /usr/spool/smail/log/paniclog
! postmaster_address = root
  -queue_only
  received_field="Received: \
  	${if def:sender_host\
--- 17,61 ----
  # you wish to modify, you will avoid setting inappropriate values for
  # os-dependent attributes.
  
+ -auth_domains
  +auto_mkdir
! auto_mkdir_mode=0755
! console=/dev/console
! copying_file=COPYING
! date_field="Date: $spool_date"
! delivery_mode=background
! director_file=directors
! domains=uucp
  -error_copy_postmaster
  # +flock_mailbox 		# under 4.3BSD
  -flock_mailbox			# otherwise
! fnlock_interval=3
! fnlock_mode=0666
! fnlock_retries=5
! from_field="From: $sender${if def:sender_name: ($sender_name)}"
! grades="special-delivery:9:air-mail:A:first-class:C:bulk:a:junk:n"
! hit_table_len=241
  -hostnames
  -lock_by_name			# on BSD systems or System V.2/V.3
  # +lock_by_name			# otherwise
! lock_mode=0444
! log_mode=0644
! logfile=/usr/spool/smail/log/logfile
! max_hop_count=20
! max_message_size=100k
! # message_buf_size=4096		# for machines with small memories
! message_buf_size=100k		# otherwise
! message_id_field="Message-Id: <$message_id@$primary_name>"
! message_log_mode=0664
! method_dir=methods
  -more_hostnames
! nobody=nobody			# under 4.3BSD or SunOS
! # nobody=guest			# another possibility
! open_interval=2
! open_retries=0			# if an atomic rename() is available
! # open_retries=2		# otherwise
! paniclog=/usr/spool/smail/log/paniclog
! postmaster_address=root
  -queue_only
  received_field="Received: \
  	${if def:sender_host\
***************
*** 67,78 ****
  retry_duration=5d
  retry_file=retry
  retry_interval=10m
! return_path_field = "Return-Path: <$sender>"
! router_file = routers
  -second_config_file
! smail = /usr/lib/sendmail
! smail_lib_dir = /usr/lib/smail
! smail_util_dir = /usr/lib/smail
  -smart_path
  -smart_transport
  -smart_user
--- 69,80 ----
  retry_duration=5d
  retry_file=retry
  retry_interval=10m
! return_path_field="Return-Path: <$sender>"
! router_file=routers
  -second_config_file
! smail=/usr/lib/sendmail
! smail_lib_dir=/usr/lib/smail
! smail_util_dir=/usr/lib/smail
  -smart_path
  -smart_transport
  -smart_user
***************
*** 82,94 ****
  smtp_accept_queue=5
  smtp_receive_command_timeout=5m
  smtp_receive_message_timeout=2h
! spool_dirs = /usr/spool/smail
! spool_grade = C
! # spool_mode = 0640		# under System V
! spool_mode = 0440		# otherwise
! transport_file = transports
  -trusted
  -trusted_groups
  -uucp_name
- visible_domains = uucp
  -visible_name
--- 84,95 ----
  smtp_accept_queue=5
  smtp_receive_command_timeout=5m
  smtp_receive_message_timeout=2h
! spool_dirs=/usr/spool/smail
! spool_grade=C
! # spool_mode=0640		# under System V
! spool_mode=0440			# otherwise
! transport_file=transports
  -trusted
  -trusted_groups
  -uucp_name
  -visible_name

Index: samples/generic/directors
***************
*** 1,4 ****
! # @(#)samples/generic/directors	1.5 8/8/92 16:39:48
  
  # This file defines the configuration of the director subsystem as
  # compiled into the smail binary.  By modifying the source file config.h
--- 1,4 ----
! # @(#)samples/generic/directors	1.6 9/6/92 04:41:29
  
  # This file defines the configuration of the director subsystem as
  # compiled into the smail binary.  By modifying the source file config.h
***************
*** 32,39 ****
  					# with nobody by default, so setting
  					# this is not useful.
  	sender_okay,			# don't remove sender from expansions
- 	owner=owner-$user,		# problems go to an owner address
  #	-sender_okay,			# do remove sender, sendmail compatible
  
  	file=/usr/lib/aliases,		# default: sendmail compatible
  #	file=mail.aliases,		# use this for YP
--- 32,39 ----
  					# with nobody by default, so setting
  					# this is not useful.
  	sender_okay,			# don't remove sender from expansions
  #	-sender_okay,			# do remove sender, sendmail compatible
+ 	owner=owner-$user;		# problems go to an owner address
  
  	file=/usr/lib/aliases,		# default: sendmail compatible
  #	file=mail.aliases,		# use this for YP
***************
*** 104,110 ****
  	caution,			# flag all addresses with caution
  	nobody,				# and then associate the nobody user
  	-sender_okay,			# do remove sender from list expansions
! #	sender_okay,			# DO remove the sender
  	owner=owner-$user;		# system V sites may wish to use
  					# o-$user, as owner-$user may be
  					# too long for a 14-char filename.
--- 104,110 ----
  	caution,			# flag all addresses with caution
  	nobody,				# and then associate the nobody user
  	-sender_okay,			# do remove sender from list expansions
! #	sender_okay,			# do NOT remove the sender
  	owner=owner-$user;		# system V sites may wish to use
  					# o-$user, as owner-$user may be
  					# too long for a 14-char filename.

Index: samples/generic/transports
***************
*** 1,4 ****
! # @(#)samples/generic/transports	1.10 8/8/92 19:49:09
  
  # This file defines the configuration of the transport subsystem as
  # compiled into the smail binary.  By modifying the source files
--- 1,4 ----
! # @(#)samples/generic/transports	1.11 9/6/92 04:41:55
  
  # This file defines the configuration of the transport subsystem as
  # compiled into the smail binary.  By modifying the source files
***************
*** 117,122 ****
--- 117,123 ----
  					# MMDF mailbox format and for
  					# use with the Content-Length
  					# header fields.
+ 	notify_comsat,			# notify comsat daemon of delivery
  #	suffix="\1\1\1\1\n",		# MMDF mailbox format
  #	prefix="\1\1\1\1\n",		# MMDF mailbox format
  

Index: samples/queryprog/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)samples/queryprog/Makefile	1.3 7/11/92 11:59:01
  # Makefile for the generic configuration file samples
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)samples/queryprog/Makefile	1.4 9/6/92 04:40:11
  # Makefile for the generic configuration file samples
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 15,21 ****
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  
  ROOT=../..
--- 15,21 ----
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  
  ROOT=../..

Index: src/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)src/Makefile	1.19 7/11/92 11:53:26
  # Makefile for the smail program
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)src/Makefile	1.20 9/6/92 04:40:13
  # Makefile for the smail program
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKVERSION=${ROOT}/conf/lib/mkversion.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKVERSION=${ROOT}/conf/lib/mkversion.sh
***************
*** 132,141 ****
  	  done
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  ${VERSION_H} ${VERSION_SH} ${VERSION_SED}:
! 	ROOT=${ROOT} sh ${MKVERSION}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
--- 132,141 ----
  	  done
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  ${VERSION_H} ${VERSION_SH} ${VERSION_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKVERSION}
  
  names:
  	@for i in ${SRC}; do echo ${SRC_PREFIX}$$i; done
***************
*** 184,190 ****
  	  chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  remove_driver_makefiles:
  	rm -f directors/Makefile routers/Makefile transports/Makefile
--- 184,190 ----
  	  chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  remove_driver_makefiles:
  	rm -f directors/Makefile routers/Makefile transports/Makefile

Index: src/bindlib.c
***************
*** 1,4 ****
! /* @(#)src/bindlib.c	1.15 8/8/92 17:33:44 */
  
  /*
   *    Copyright (C) 1992  Ronald S. Karr
--- 1,4 ----
! /* @(#)src/bindlib.c	1.16 9/5/92 22:16:42 */
  
  /*
   *    Copyright (C) 1992  Ronald S. Karr
***************
*** 1036,1041 ****
--- 1036,1042 ----
      if (anslen < 0) {
  	switch (h_errno) {
  	case NO_DATA:
+ 	    *pack_size = 0;
  	    return DB_SUCCEED;
  
  	case HOST_NOT_FOUND:

Index: src/config.c
***************
*** 1,4 ****
! /* @(#)src/config.c	1.13 8/3/92 03:33:20 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/config.c	1.14 9/6/92 03:26:28 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 97,102 ****
--- 97,103 ----
  					/* timeout for smtp command reads */
  long smtp_receive_message_timeout = SMTP_RECEIVE_MESSAGE_TIMEOUT;
  					/* timeout for smtp message */
+ char *auth_domains = AUTH_DOMAINS;	/* authoritative domain list */
  #ifdef GLOTZNET
  int tzoffset = 0;			/* glotznet host timezone offset */
  int tznodst = 0;			/* glotznet does not have DST */

Index: src/config.h
***************
*** 1,4 ****
! /* @(#)src/config.h	1.25 8/3/92 05:14:38 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/config.h	1.27 9/6/92 04:12:59 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 144,149 ****
--- 144,160 ----
  # define UUCP_NAME NULL			/* Normal setting */
  #endif
  
+ /*
+  * A list of authoritative domains for this host can be configured
+  * by setting this to a colon-separated list of domains.
+  *
+  * NOTE: This can be set with the config file value "auth_domains".
+  */
+ 
+ #ifndef AUTH_DOMAINS
+ # define AUTH_DOMAINS NULL		/* Normal setting */
+ #endif
+ 
  
  /*
   * STRONG SUGGESTIONS
***************
*** 625,631 ****
   * NOTE: This can be set with the config file value "date_field"
   */
  #ifndef	DATE_FIELD
! # define DATE_FIELD	"Date: $date"
  #endif
  
  /*
--- 636,642 ----
   * NOTE: This can be set with the config file value "date_field"
   */
  #ifndef	DATE_FIELD
! # define DATE_FIELD	"Date: $spool_date"
  #endif
  
  /*

Index: src/extern.h
***************
*** 1,4 ****
! /* @(#)src/extern.h	1.30 8/9/92 16:34:06 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/extern.h	1.31 9/6/92 01:31:02 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 21,35 ****
  extern struct block *perm;		/* permanent allocation block */
  extern int x_dont_panic;                /* dont panic in X_CHECK() */
  
- /* external variables defined in ascii.c */
- #ifdef ANSI_C
- extern unsigned char lowcase[];		/* lower case conversion table */
- extern unsigned char upcase[];		/* upper case conversion table */
- #else	/* not ANSI_C */
- extern char lowcase[];			/* lower case conversion table */
- extern char upcase[];			/* upper case conversion table */
- #endif	/* ANSI_C */
- 
  /* external variables defined in config.c */
  extern char *visible_name;		/* hostname used in outgoing addrs */
  extern char *visible_domains;		/* domain used in outgoing headers */
--- 21,26 ----
***************
*** 100,105 ****
--- 91,97 ----
  extern long retry_duration;		/* default delivery retry duration */
  extern long smtp_receive_command_timeout; /* timeout for receiving SMTP cmds */
  extern long smtp_receive_message_timeout; /* timeout for receiving SMTP msg */
+ extern char *auth_domains;		/* authoritative domain list */
  #ifdef GLOTZNET
  extern int tzoffset;			/* timezone offset for glotznet host */
  extern int tznodst;			/* true if no DST for glotznet host */

Index: src/main.c
***************
*** 1,4 ****
! /* @(#)src/main.c	1.21 7/11/92 11:49:37 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/main.c	1.22 9/6/92 00:50:04 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 699,705 ****
  	    utilargs[2] = NULL;
  	}
  	child = open_child(utilargs, (char *)NULL, (FILE *)NULL, (FILE *)NULL,
! 			   -1, CHILD_MINENV);
  	if (child == -1) {
  	    if (errfile) {
  		fprintf(errfile, "%s: Cannot start %s: %s\n",
--- 699,705 ----
  	    utilargs[2] = NULL;
  	}
  	child = open_child(utilargs, (char *)NULL, (FILE *)NULL, (FILE *)NULL,
! 			   -1, CHILD_MINENV, getuid(), getgid());
  	if (child == -1) {
  	    if (errfile) {
  		fprintf(errfile, "%s: Cannot start %s: %s\n",

Index: src/mkdrivtab.sh
***************
*** 1,4 ****
! # @(#)src/mkdrivtab.sh	1.7 6/27/92 17:14:49
  
  # Script to create drivertab.c and the driver makefile directories
  # from a driver configuration file.  This script makes heavy use of
--- 1,4 ----
! # @(#)src/mkdrivtab.sh	1.8 9/6/92 04:40:16
  
  # Script to create drivertab.c and the driver makefile directories
  # from a driver configuration file.  This script makes heavy use of
***************
*** 161,167 ****
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=\${MAKE} -\${MAKEFLAGS}
  SRC_PREFIX=
  ROOT=../..
  MKDEPEND=\${ROOT}/conf/lib/mkdepend.sh
--- 161,167 ----
  LINT=lint
  CC=cc
  CLEAN=sccs clean
! MK=\${MAKE} -\${MAKEFLAGS} SHELL=\${SHELL}
  SRC_PREFIX=
  ROOT=../..
  MKDEPEND=\${ROOT}/conf/lib/mkdepend.sh
***************
*** 214,220 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}
--- 214,220 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  clean:
  	rm -f ${DEFS_SH} ${DEFS_H} ${DEFS_SED}

Index: src/modes.c
***************
*** 1,4 ****
! /* @(#)src/modes.c	1.35 8/9/92 01:18:30 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/modes.c	1.37 9/6/92 01:18:08 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 810,818 ****
      if (deliver_mode == BACKGROUND)
  	deliver_mode = FOREGROUND;
  
!     /* we aren't interested in stdin or stdout */
      (void) close(0);
      (void) close(1);
  
      /* setup the listen socket */
      if (smtp_service_name == NULL) {
--- 810,823 ----
      if (deliver_mode == BACKGROUND)
  	deliver_mode = FOREGROUND;
  
!     /*
!      * we aren't interested in the old stdin or stdout, substitute
!      * /dev/null
!      */
      (void) close(0);
      (void) close(1);
+     open("/dev/null", 0);
+     dup(0);
  
      /* setup the listen socket */
      if (smtp_service_name == NULL) {
***************
*** 1682,1688 ****
  	    col = 8 + 8 + sizeof("Args: ")-1 + strlen(*argv++);
  	}
  	while (*argv) {
! 	    if (col + (int)strlen(*argv) > 76) {
  		col = 8 + 8 + sizeof("Args: ") - 1;
  		(void) fputs("\n\t\t      ", stdout);
  	    } else {
--- 1687,1693 ----
  	    col = 8 + 8 + sizeof("Args: ")-1 + strlen(*argv++);
  	}
  	while (*argv) {
! 	    if (col + (int)strlen(*argv) > 74) {
  		col = 8 + 8 + sizeof("Args: ") - 1;
  		(void) fputs("\n\t\t      ", stdout);
  	    } else {
***************
*** 1690,1696 ****
  		col++;
  	    }
  	    col += strlen(*argv);
! 	    fputs(*argv++, stdout);
  	}
  	putchar('\n');
  	if (save_debug > 0) {
--- 1695,1706 ----
  		col++;
  	    }
  	    col += strlen(*argv);
! 	    if (strlen(*argv) == 0 || index(*argv, ' ') != NULL) {
! 		col += 2;
! 		printf("'%s'", *argv++, stdout);
! 	    } else {
! 		fputs(*argv++, stdout);
! 	    }
  	}
  	putchar('\n');
  	if (save_debug > 0) {

Index: src/queue.c
***************
*** 1,4 ****
! /* @(#)src/queue.c	1.20 8/3/92 05:10:24 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/queue.c	1.21 9/6/92 01:19:23 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 295,301 ****
      }
  
      /* envelope ends in one blank line */
!     if (put_line("") == FAIL) {
  	return FAIL;
      }
  
--- 295,301 ----
      }
  
      /* envelope ends in one blank line */
!     if (PUTSPOOL('\n') == EOF) {
  	return FAIL;
      }
  
***************
*** 466,472 ****
      /*
       * write the name to disk
       */
!     (void) lseek(spoolfile, 0L, 0);
      if (write(spoolfile, local_sender, i) < i) {
  	return FAIL;
      }
--- 466,472 ----
      /*
       * write the name to disk
       */
!     (void) lseek(spoolfile, 1L, 0);
      if (write(spoolfile, local_sender, i) < i) {
  	return FAIL;
      }
***************
*** 494,499 ****
--- 494,501 ----
  put_line(s)
      register char *s;
  {
+     if (PUTSPOOL('!') == EOF)
+ 	return FAIL;
      while (*s) {
  	if (*s == '\\') {
  	    /* encode \ as \\ and newline as \n */
***************
*** 545,550 ****
--- 547,553 ----
      char *p;
      char ls[MAXUSER + 1];		/* local sender from file */
      int just_trust = TRUE;		/* true if no "trusted" variables */
+     int first;
  
      DEBUG(DBG_QUEUE_HI, "read_message called\n");
      /* seek to the beginning of the region */
***************
*** 554,562 ****
  
      /* get the login username from the spool file */
      i = 0;
      while ((c = GETSPOOL()) != EOF && c != READ_FAIL &&
  	   c != '\n' && c != ' ' && i < MAXUSER) {
! 	ls[i++] = c;
      }
      /* read to the end of the first line */
      while (c != '\n' && c != EOF && c != READ_FAIL) {
--- 557,568 ----
  
      /* get the login username from the spool file */
      i = 0;
+     first = 1;
      while ((c = GETSPOOL()) != EOF && c != READ_FAIL &&
  	   c != '\n' && c != ' ' && i < MAXUSER) {
! 	if (c != '!' || ! first)
! 	    ls[i++] = c;
! 	first = 0;
      }
      /* read to the end of the first line */
      while (c != '\n' && c != EOF && c != READ_FAIL) {
***************
*** 573,579 ****
  	    *p++ = c;
  	}
  	*p = '\0';
! 	(void) sscanf(buf, "%d %d", &real_uid, &prog_egid);
      }
      if (c == READ_FAIL) {
  	write_log(LOG_SYS|LOG_PANIC, "read failed: %s/%s: %s",
--- 579,588 ----
  	    *p++ = c;
  	}
  	*p = '\0';
! 	p = buf;
! 	if (*p == '!')
! 	    p++;
! 	(void) sscanf(p, "%d %d", &real_uid, &prog_egid);
      }
      if (c == READ_FAIL) {
  	write_log(LOG_SYS|LOG_PANIC, "read failed: %s/%s: %s",
***************
*** 642,647 ****
--- 651,657 ----
  	   tell_spool());
      argv = (char **)xmalloc(a * sizeof(char *));
      i = 0;
+     first = 1;
      while ((c = GETSPOOL()) != EOF && c != '\n') {
  	struct str str;
  	register struct str *sp = &str;	/* temp string */
***************
*** 649,654 ****
--- 659,669 ----
  	/* read one vector */
  	STR_INIT(sp);
  	do {
+ 	    if (first) {
+ 		first = 0;
+ 		if (c == '!')
+ 		    continue;
+ 	    }
  	    if (c == '\\') {
  		c = GETSPOOL();
  		if (c == EOF) {
***************
*** 679,684 ****
--- 694,700 ----
  	    a += 32;
  	    argv = (char **)xrealloc((char *)argv, a*sizeof(char *));
  	}
+ 	first = 1;
      }
  
      /* finish off the argument vector */

Index: src/routers/smarthost.c
***************
*** 1,4 ****
! /* @(#)src/routers/smarthost.c	1.5 7/11/92 11:50:46 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/routers/smarthost.c	1.6 9/6/92 03:47:23 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 109,115 ****
  	    if (cur->flags & ADDR_SMARTHOST) {
  		DEBUG2(DBG_DRIVER_MID, "router %s:  did not match %s\n",
  		       rp->name, cur->target);
! 	    } else {
  		if (priv->host == NULL) {
  		    char *p;
  
--- 109,115 ----
  	    if (cur->flags & ADDR_SMARTHOST) {
  		DEBUG2(DBG_DRIVER_MID, "router %s:  did not match %s\n",
  		       rp->name, cur->target);
! 	    } else if (! match_auth_domains(cur->target)) {
  		if (priv->host == NULL) {
  		    char *p;
  
***************
*** 157,162 ****
--- 157,164 ----
  
  /*
   * rtv_smarthost - match anything, unless ADDR_SMARTHOST is set
+  *
+  * Also, don't match anything in the auth_domains list.
   */
  /*ARGSUSED*/
  void
***************
*** 174,180 ****
      for (cur = in; cur; cur = next) {
  	next = cur->succ;
  
! 	if (cur->flags & ADDR_SMARTHOST) {
  	    /* no match if we are disabling smarthost routing here */
  	    cur->succ = *retry;
  	    *retry = cur;
--- 176,183 ----
      for (cur = in; cur; cur = next) {
  	next = cur->succ;
  
! 	if ((cur->flags & ADDR_SMARTHOST) ||
! 	    match_auth_domains(cur->target)) {
  	    /* no match if we are disabling smarthost routing here */
  	    cur->succ = *retry;
  	    *retry = cur;
***************
*** 225,230 ****
--- 228,248 ----
      } else {
  	return NULL;
      }
+ }
+ 
+ int
+ match_auth_domains(target)
+     char *target;
+ {
+     char *dom;
+ 
+     if (auth_domains == NULL)
+ 	return 0;
+     for (dom = strcolon(auth_domains); dom; dom = strcolon((char *)NULL)) {
+ 	if (is_suffix(dom, target, FALSE))
+ 	    return 1;
+     }
+     return 0;
  }
  
  

Index: src/smailconf.c
***************
*** 1,4 ****
! /* @(#)src/smailconf.c	1.13 8/3/92 03:33:27 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/smailconf.c	1.14 9/6/92 04:10:57 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 58,63 ****
--- 58,65 ----
  
  /* define the attributes which may be in the config file */
  static struct attr_table conf_attributes[] = {
+     { "auth_domains", t_string, NULL, (tup *)&auth_domains, 0 },
+     { "auth_domain", t_string, NULL, (tup *)&auth_domains, 0 },
      { "auto_mkdir", t_boolean, NULL, (tup *)&auto_mkdir, 0 },
      { "auto_mkdir_mode", t_int, NULL, (tup *)&auto_mkdir_mode, 0 },
      { "config_file", t_string, NULL, (tup *)&config_file, 0 },
***************
*** 66,71 ****
--- 68,77 ----
      { "date_field", t_string, NULL, (tup *)&date_field, 0 },
      { "delivery_mode", t_string, NULL, (tup *)&delivery_mode_string, 0 },
      { "director_file", t_string, NULL, (tup *)&director_file, 0 },
+     { "domains", t_string, NULL, (tup *)&visible_domains, 0 },
+     { "domain", t_string, NULL, (tup *)&visible_domains, 0 },
+     { "visible_domains", t_string, NULL, (tup *)&visible_domains, 0 },
+     { "visible_domain", t_string, NULL, (tup *)&visible_domains, 0 },
      { "error_copy_postmaster", t_boolean, NULL,
        (tup *)&error_copy_postmaster, 0 },
      { "flock_mailbox", t_boolean, NULL, (tup *)&flock_mailbox, 0 },
***************
*** 89,94 ****
--- 95,101 ----
      { "message_log_mode", t_int, NULL, (tup *)&message_log_mode, 0 },
      { "method_dir", t_string, NULL, (tup *)&method_dir, 0 },
      { "more_hostnames", t_string, NULL, (tup *)&more_hostnames, 0 },
+     { "gateway_names", t_string, NULL, (tup *)&more_hostnames, 0 },
      { "nobody", t_string, NULL, (tup *)&nobody, 0 },
      { "open_interval", t_int, NULL, (tup *)&open_interval, 0 },
      { "open_retries", t_int, NULL, (tup *)&open_retries, 0 },
***************
*** 122,127 ****
--- 129,135 ----
      { "smtp_receive_message_timeout", t_interval, NULL,
        (tup *)&smtp_receive_message_timeout, 0 },
      { "spool_dirs", t_string, NULL, (tup *)&spool_dirs, 0 },
+     { "spool_dir", t_string, NULL, (tup *)&spool_dir, 0 },
      { "spool_grade", t_char, NULL, (tup *)&spool_grade, 0 },
      { "spool_mode", t_int, NULL, (tup *)&spool_mode, 0 },
      { "switch_percent_and_bang", t_boolean, NULL,
***************
*** 129,135 ****
--- 137,145 ----
      { "transport_file", t_string, NULL, (tup *)&transport_file, 0 },
      { "trusted", t_string, NULL, (tup *)&trusted, 0 },
      { "trusted_users", t_string, NULL, (tup *)&trusted, 0 },
+     { "trusted_user", t_string, NULL, (tup *)&trusted, 0 },
      { "trusted_groups", t_string, NULL, (tup *)&trusted_groups, 0 },
+     { "trusted_group", t_string, NULL, (tup *)&trusted_groups, 0 },
  #ifdef GLOTZNET
      { "tzoffset", t_int, NULL, (tup *)&tzoffset, 0 },
      { "tznodst", t_boolean, NULL, (tup *)&tznodst, 0 },
***************
*** 136,142 ****
  #endif /* GLOTZNET */
      { "uucp_name", t_string, NULL, (tup *)&uucp_name, 0 },
      { "version", t_infoproc, NULL, (tup *)version, 0 },
-     { "visible_domains", t_string, NULL, (tup *)&visible_domains, 0 },
      { "visible_name", t_string, NULL, (tup *)&visible_name, 0 },
  };
  struct attr_table *end_conf_attributes = ENDTABLE(conf_attributes);
--- 146,151 ----

Index: src/smtprecv.c
***************
*** 1,4 ****
! /* @(#)src/smtprecv.c	1.13 8/8/92 17:40:47 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/smtprecv.c	1.16 9/6/92 01:33:48 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 21,26 ****
--- 21,27 ----
  #include "addr.h"
  #include "dys.h"
  #include "log.h"
+ #include "hash.h"
  #ifndef DEPEND
  # include "extern.h"
  # include "debug.h"
***************
*** 148,154 ****
  	s = expand_string(smtp_banner, (struct addr *)NULL,
  			  (char *)NULL, (char *)NULL);
  	while (*s) {
! 	    (void) fprintf(out, "220%c", index(s, '\n') == NULL? ' ': '-');
  	    while (*s) {
  		putc(*s, out);
  		if (*s++ == '\n') break;
--- 149,155 ----
  	s = expand_string(smtp_banner, (struct addr *)NULL,
  			  (char *)NULL, (char *)NULL);
  	while (*s) {
! 	    fprintf(out, "220%c", index(s, '\n') == NULL? ' ': '-');
  	    while (*s) {
  		putc(*s, out);
  		if (*s++ == '\n') break;
***************
*** 156,162 ****
  	}
  	putc('\r', out);
  	putc('\n', out);
! 	(void) fflush(out);
      }
  
      while (! term_signal || out == NULL) {
--- 157,163 ----
  	}
  	putc('\r', out);
  	putc('\n', out);
! 	fflush(out);
      }
  
      while (! term_signal || out == NULL) {
***************
*** 165,201 ****
  	}
  	switch (read_smtp_command(in)) {
  	case HELO_CMD:
! 	    if (sender_host == NULL) {
! 		strip_rfc822_comments(data);
  		sender_host = COPY_STRING(data);
  	    }
  	    if (sender_proto == NULL) {
! 		sender_proto = (out? "smtp": "batched-smtp");
  	    }
  	    if (out) {
! 		(void)fprintf(out, "250 %s Hello %s\r\n",
! 			      primary_name, data);
! 		(void)fflush(out);
  	    }
  	    reset_state();
  	    break;
  
  	case MAIL_CMD:
  	    if (sender) {
! 		(void) fprintf(out, "503 Sender already specified\r\n");
! 		(void) fflush(out);
  		break;
  	    }
- 	    strip_rfc822_comments(data);
  	    sender = preparse_address(data, &error);
  	    if (out) {
  		if (sender) {
! 		    (void) fprintf(out, "250 <%s> ... Sender Okay\r\n",
  				   sender);
  		} else {
! 		    (void) fprintf(out, "501 <%s> ... %s\r\n", data, error);
  		}
! 		(void) fflush(out);
  	    }
  	    if (sender && sender[0] == '\0') {
  		/* special error sender form <> given */
--- 166,213 ----
  	}
  	switch (read_smtp_command(in)) {
  	case HELO_CMD:
! 	    strip_rfc822_comments(data);
! 	    if (out && data[0] == '\0') {
! 		fprintf(out, "501 HELO requires domain name as operand\r\n");
! 		fflush(out);
! 		break;
! 	    }
! 	    if (sender_host == NULL && data[0] != '\0') {
  		sender_host = COPY_STRING(data);
  	    }
  	    if (sender_proto == NULL) {
! 		sender_proto = (out? "smtp": "bsmtp");
  	    }
  	    if (out) {
! 		fprintf(out, "250 %s Hello %s\r\n", primary_name, data);
! 		fflush(out);
  	    }
  	    reset_state();
  	    break;
  
  	case MAIL_CMD:
+ 	    strip_rfc822_comments(data);
+ 	    if (out && data[0] == '\0') {
+ 		fprintf(out, "501 MAIL FROM requires address as operand\r\n");
+ 		fflush(out);
+ 		break;
+ 	    }
  	    if (sender) {
! 		if (out) {
! 		    fprintf(out, "503 Sender already specified\r\n");
! 		    fflush(out);
! 		}
  		break;
  	    }
  	    sender = preparse_address(data, &error);
  	    if (out) {
  		if (sender) {
! 		    fprintf(out, "250 <%s> ... Sender Okay\r\n",
  				   sender);
  		} else {
! 		    fprintf(out, "501 <%s> ... %s\r\n", data, error);
  		}
! 		fflush(out);
  	    }
  	    if (sender && sender[0] == '\0') {
  		/* special error sender form <> given */
***************
*** 208,223 ****
  	    break;
  
  	case RCPT_CMD:
- 	    cur = alloc_addr();
  	    strip_rfc822_comments(data);
  	    if (out) {
  		if (cur->work_addr = preparse_address(data, &error)) {
! 		    (void) fprintf(out, "250 <%s> ... Recipient Okay\r\n",
! 				   cur->work_addr);
! 		    (void) fflush(out);
  		} else {
! 		    (void) fprintf(out, "501 <%s> ... %s\r\n", data, error);
! 		    (void) fflush(out);
  		    break;
  		}
  	    }
--- 220,240 ----
  	    break;
  
  	case RCPT_CMD:
  	    strip_rfc822_comments(data);
+ 	    if (out && data[0] == '\0') {
+ 		fprintf(out, "501 RCPT TO requires address as operand\r\n");
+ 		fflush(out);
+ 		break;
+ 	    }
+ 	    cur = alloc_addr();
  	    if (out) {
  		if (cur->work_addr = preparse_address(data, &error)) {
! 		    fprintf(out, "250 <%s> ... Recipient Okay\r\n",
! 			    cur->work_addr);
! 		    fflush(out);
  		} else {
! 		    fprintf(out, "501 <%s> ... %s\r\n", data, error);
! 		    fflush(out);
  		    break;
  		}
  	    }
***************
*** 238,245 ****
  	case DATA_CMD:
  	    if (sender == NULL) {
  		if (out) {
! 		    (void) fprintf(out, "503 Need MAIL command\r\n");
! 		    (void) fflush(out);
  		} else {
  		    /* sink the message for the sake of further batched cmds */
  		    if (spool_fn) {
--- 255,262 ----
  	case DATA_CMD:
  	    if (sender == NULL) {
  		if (out) {
! 		    fprintf(out, "503 Need MAIL command\r\n");
! 		    fflush(out);
  		} else {
  		    /* sink the message for the sake of further batched cmds */
  		    if (spool_fn) {
***************
*** 251,258 ****
  	    }
  	    if (recipients == NULL) {
  		if (out) {
! 		    (void) fprintf(out, "503 Need RCPT (recpient)\r\n");
! 		    (void) fflush(out);
  		} else {
  		    /* sink the message for the sake of further batched cmds */
  		    if (spool_fn) {
--- 268,275 ----
  	    }
  	    if (recipients == NULL) {
  		if (out) {
! 		    fprintf(out, "503 Need RCPT (recpient)\r\n");
! 		    fflush(out);
  		} else {
  		    /* sink the message for the sake of further batched cmds */
  		    if (spool_fn) {
***************
*** 263,271 ****
  		break;
  	    }
  	    if (out) {
! 		(void) fprintf(out,
  		     "354 Enter mail, end with \".\" on a line by itself\r\n");
! 		(void) fflush(out);
  		alarm(0);
  	    }
  
--- 280,288 ----
  		break;
  	    }
  	    if (out) {
! 		fprintf(out,
  		     "354 Enter mail, end with \".\" on a line by itself\r\n");
! 		fflush(out);
  		alarm(0);
  	    }
  
***************
*** 289,303 ****
  		exitvalue = EX_IOERR;
  		log_spool_errors();
  		if (out) {
! 		    (void) fprintf(out,
! 				   "451 Failed to queue message: %s: %s\r\n",
! 				   error, strerrno());
! 		    (void) fflush(out);
  		    break;
  		} else if (errfile) {
! 		    (void) fprintf(errfile,
! 				   "Failed to queue message: %s: %s\r\n",
! 				   error, strerrno());
  		}
  	    }
  	    smtp_processing_signals();
--- 306,318 ----
  		exitvalue = EX_IOERR;
  		log_spool_errors();
  		if (out) {
! 		    fprintf(out, "451 Failed to queue message: %s: %s\r\n",
! 			    error, strerrno());
! 		    fflush(out);
  		    break;
  		} else if (errfile) {
! 		    fprintf(errfile, "Failed to queue message: %s: %s\r\n",
! 			    error, strerrno());
  		}
  	    }
  	    smtp_processing_signals();
***************
*** 310,317 ****
  		log_spool_errors();
  		unlink_spool();
  		if (out) {
! 		    (void) fprintf(out, "451 error in spooled message\r\n");
! 		    (void) fflush(out);
  		}
  		break;
  	    }
--- 325,332 ----
  		log_spool_errors();
  		unlink_spool();
  		if (out) {
! 		    fprintf(out, "451 error in spooled message\r\n");
! 		    fflush(out);
  		}
  		break;
  	    }
***************
*** 322,329 ****
  	    log_incoming();
  	    log_spool_errors();
  	    if (out) {
! 		(void) fprintf(out, "250 Mail accepted\r\n");
! 		(void) fflush(out);
  	    }
  	    /* always allow an extra element to store the ending NULL */
  	    if (file_i >= file_cnt) {
--- 337,344 ----
  	    log_incoming();
  	    log_spool_errors();
  	    if (out) {
! 		fprintf(out, "250 Mail accepted\r\n");
! 		fflush(out);
  	    }
  	    /* always allow an extra element to store the ending NULL */
  	    if (file_i >= file_cnt) {
***************
*** 339,349 ****
  	case VRFY_CMD:
  	    if (out) {
  #ifdef NO_VERIFY
! 		(void) fprintf(out, "502 Command not implemented\r\n");
  #else
  		strip_rfc822_comments(data);
  		verify_addr(data, out);
! 		(void) fflush(out);
  #endif
  	    }
  	    break;
--- 354,364 ----
  	case VRFY_CMD:
  	    if (out) {
  #ifdef NO_VERIFY
! 		fprintf(out, "502 Command not implemented\r\n");
  #else
  		strip_rfc822_comments(data);
  		verify_addr(data, out);
! 		fflush(out);
  #endif
  	    }
  	    break;
***************
*** 351,361 ****
  	case EXPN_CMD:
  	    if (out) {
  #ifdef NO_VERIFY
! 		(void) fprintf(out, "502 Command not implemented\r\n");
  #else
  		strip_rfc822_comments(data);
  		expand_addr(data, out);
! 		(void) fflush(out);
  #endif
  	    }
  	    break;
--- 366,376 ----
  	case EXPN_CMD:
  	    if (out) {
  #ifdef NO_VERIFY
! 		fprintf(out, "502 Command not implemented\r\n");
  #else
  		strip_rfc822_comments(data);
  		expand_addr(data, out);
! 		fflush(out);
  #endif
  	    }
  	    break;
***************
*** 362,370 ****
  
  	case QUIT_CMD:
  	    if (out) {
! 		(void) fprintf(out, "221 %s closing connection\r\n",
  			       primary_name);
! 		(void) fflush(out);
  	    }
  	    reset_state();
  	    files[file_i++] = NULL;
--- 377,385 ----
  
  	case QUIT_CMD:
  	    if (out) {
! 		fprintf(out, "221 %s closing connection\r\n",
  			       primary_name);
! 		fflush(out);
  	    }
  	    reset_state();
  	    files[file_i++] = NULL;
***************
*** 375,389 ****
  	case RSET_CMD:
  	    reset_state();
  	    if (out) {
! 		(void) fprintf(out, "250 Reset state\r\n");
! 		(void) fflush(out);
  	    }
  	    break;
  
  	case NOOP_CMD:
  	    if (out) {
! 		(void) fprintf(out, "250 Okay\r\n");
! 		(void) fflush(out);
  	    }
  	    break;
  
--- 390,404 ----
  	case RSET_CMD:
  	    reset_state();
  	    if (out) {
! 		fprintf(out, "250 Reset state\r\n");
! 		fflush(out);
  	    }
  	    break;
  
  	case NOOP_CMD:
  	    if (out) {
! 		fprintf(out, "250 Okay\r\n");
! 		fflush(out);
  	    }
  	    break;
  
***************
*** 396,404 ****
  			error = NULL;
  			temp = c_atol(data, &error);
  			if (error) {
! 			    (void) fprintf(out, "500 bad number: %s\r\n",
! 					   error);
! 			    (void) fflush(out);
  			    break;
  			}
  		    } else {
--- 411,418 ----
  			error = NULL;
  			temp = c_atol(data, &error);
  			if (error) {
! 			    fprintf(out, "500 bad number: %s\r\n", error);
! 			    fflush(out);
  			    break;
  			}
  		    } else {
***************
*** 405,425 ****
  			temp = 1;
  		    }
  		    if (temp == 0) {
! 			(void) fprintf(out, "250 Debugging disabled\r\n");
  		    } else {
! 			    DEBUG(DBG_QUEUE_LO,
! 				  "debugging output grabbed by SMTP\r\n");
! 			(void) fprintf(out, "250 Debugging level: %d\r\n",
! 				       temp);
  		    }
! 		    (void) fflush(out);
  		    debug = temp;
  		    errfile = out;
  		    break;
  		}
  #endif	/* NODEBUG */
! 		(void) fprintf(out, "500 I hear you knocking, but you can't come in\r\n");
! 		(void) fflush(out);
  	    }
  	    break;
  
--- 419,438 ----
  			temp = 1;
  		    }
  		    if (temp == 0) {
! 			fprintf(out, "250 Debugging disabled\r\n");
  		    } else {
! 			DEBUG(DBG_QUEUE_LO,
! 			      "debugging output grabbed by SMTP\r\n");
! 			fprintf(out, "250 Debugging level: %d\r\n", temp);
  		    }
! 		    fflush(out);
  		    debug = temp;
  		    errfile = out;
  		    break;
  		}
  #endif	/* NODEBUG */
! 		fprintf(out, "500 I hear you knocking, but you can't come in\r\n");
! 		fflush(out);
  	    }
  	    break;
  
***************
*** 426,442 ****
  	case HELP_CMD:
  	    if (out) {
  		for (i = 0; i < TABLESIZE(help_msg); i++) {
! 		    (void) fprintf(out, "%s\r\n", help_msg[i]);
  		}
! 		(void) fflush(out);
  	    }
  	    break;
  
  	case EOF_CMD:
  	    if (out) {
! 		(void) fprintf(out, "421 %s Lost input channel\r\n",
! 			       primary_name);
! 		(void) fflush(out);
  	    }
  	    files[file_i++] = NULL;
  	    errfile = save_errfile;
--- 439,454 ----
  	case HELP_CMD:
  	    if (out) {
  		for (i = 0; i < TABLESIZE(help_msg); i++) {
! 		    fprintf(out, "%s\r\n", help_msg[i]);
  		}
! 		fflush(out);
  	    }
  	    break;
  
  	case EOF_CMD:
  	    if (out) {
! 		fprintf(out, "421 %s Lost input channel\r\n", primary_name);
! 		fflush(out);
  	    }
  	    files[file_i++] = NULL;
  	    errfile = save_errfile;
***************
*** 445,452 ****
  
  	default:
  	    if (out) {
! 		(void) fprintf(out, "500 Command unrecognized\r\n");
! 		(void) fflush(out);
  	    }
  	    break;
  	}
--- 457,464 ----
  
  	default:
  	    if (out) {
! 		fprintf(out, "500 Command unrecognized\r\n");
! 		fflush(out);
  	    }
  	    break;
  	}
***************
*** 456,464 ****
       * we appear to have received a SIGTERM, so shutdown and tell the
       * remote host.
       */
!     (void) fprintf(out, "421 %s Service not available, closing channel\r\n",
! 		   primary_name);
!     (void) fflush(out);
  
      files[file_i] = NULL;
      errfile = save_errfile;
--- 468,476 ----
       * we appear to have received a SIGTERM, so shutdown and tell the
       * remote host.
       */
!     fprintf(out, "421 %s Service not available, closing channel\r\n",
! 	    primary_name);
!     fflush(out);
  
      files[file_i] = NULL;
      errfile = save_errfile;
***************
*** 566,573 ****
      /* build the mungeable addr string */
      addr->work_addr = preparse_address(in_addr, &error);
      if (addr->work_addr == NULL) {
! 	(void) fprintf(out, "501 %s ... %s\r\n", in_addr, error);
! 	(void) fflush(out);
  	return;
      }
  
--- 578,585 ----
      /* build the mungeable addr string */
      addr->work_addr = preparse_address(in_addr, &error);
      if (addr->work_addr == NULL) {
! 	fprintf(out, "501 %s ... %s\r\n", in_addr, error);
! 	fflush(out);
  	return;
      }
  
***************
*** 581,600 ****
  	}
      }
  
!     resolve_addr_list(addr, &okay, &defer, &fail, FALSE);
      if (okay) {
  	register struct addr *cur;	/* current addr to display */
  
  	/* display the complete list of resolved addresses */
  	for (cur = okay; cur->succ; cur = cur->succ) {
! 	    (void) fprintf(out, "250-%s\r\n", cur->in_addr);
! 	    (void) fflush(out);
  	}
  	/* the last one should not begin with 250- */
! 	(void) fprintf(out, "250 %s\r\n", cur->in_addr);
      } else {
  	/* just say we couldn't find it */
! 	(void) fprintf(out, "550 %s ... not matched\r\n", in_addr);
      }
  }
  
--- 593,615 ----
  	}
      }
  
!     hit_table = new_hash_table(hit_table_len,
! 			       (struct block *)NULL,
! 			       HASH_DEFAULT);
!     resolve_addr_list(addr, &okay, &defer, &fail, TRUE);
      if (okay) {
  	register struct addr *cur;	/* current addr to display */
  
  	/* display the complete list of resolved addresses */
  	for (cur = okay; cur->succ; cur = cur->succ) {
! 	    fprintf(out, "250-%s\r\n", cur->in_addr);
! 	    fflush(out);
  	}
  	/* the last one should not begin with 250- */
! 	fprintf(out, "250 %s\r\n", cur->in_addr);
      } else {
  	/* just say we couldn't find it */
! 	fprintf(out, "550 %s ... not matched\r\n", in_addr);
      }
  }
  
***************
*** 618,625 ****
      /* build the mungeable addr string */
      addr->work_addr = preparse_address(in_addr, &error);
      if (addr->work_addr == NULL) {
! 	(void) fprintf(out, "501 %s ... %s\r\n", in_addr, error);
! 	(void) fflush(out);
  	return;
      }
  
--- 633,640 ----
      /* build the mungeable addr string */
      addr->work_addr = preparse_address(in_addr, &error);
      if (addr->work_addr == NULL) {
! 	fprintf(out, "501 %s ... %s\r\n", in_addr, error);
! 	fflush(out);
  	return;
      }
  
***************
*** 635,650 ****
      verify_addr_list(addr, &okay, &defer, &fail);
  
      if (okay) {
! 	(void) fprintf(out, "250 %s\r\n", in_addr);
      } else if (defer) {
! 	(void) fprintf(out, "550 %s ... cannot verify: %s\r\n",
! 		       in_addr, defer->error->message);
      } else if (fail) {
! 	(void) fprintf(out, "550 %s ... not matched: %s\r\n",
! 		       in_addr, fail->error->message);
      } else {
  	/* hmmm, it should have been in one of the lists */
! 	(void) fprintf(out, "550 %s ... not matched\r\n", in_addr);
      }
  }
  #endif	/* NO_VERIFY */
--- 650,665 ----
      verify_addr_list(addr, &okay, &defer, &fail);
  
      if (okay) {
! 	fprintf(out, "250 %s\r\n", in_addr);
      } else if (defer) {
! 	fprintf(out, "550 %s ... cannot verify: %s\r\n", in_addr,
! 		defer->error->message);
      } else if (fail) {
! 	fprintf(out, "550 %s ... not matched: %s\r\n", in_addr,
! 		fail->error->message);
      } else {
  	/* hmmm, it should have been in one of the lists */
! 	fprintf(out, "550 %s ... not matched\r\n", in_addr);
      }
  }
  #endif	/* NO_VERIFY */
***************
*** 715,723 ****
  smtp_receive_timeout_sig(sig)
      int sig;
  {
!     (void) fprintf(out_file,
! 		   "421 %s SMTP command receive timeout, closing channel\r\n",
! 		   primary_name);
      write_log(LOG_SYS, "SMTP connection timeout%s%s.",
  	      sender_host? "while talking with": "",
  	      sender_host? sender_host: "");
--- 730,737 ----
  smtp_receive_timeout_sig(sig)
      int sig;
  {
!     fprintf(out_file, "421 %s SMTP command timeout, closing channel\r\n",
! 	    primary_name);
      write_log(LOG_SYS, "SMTP connection timeout%s%s.",
  	      sender_host? "while talking with": "",
  	      sender_host? sender_host: "");
***************
*** 739,747 ****
  {
      (void) signal(sig, SIG_IGN);
      if (out_file) {
! 	(void) fprintf(out_file,
! 		       "421 %s Service not available, closing channel\r\n",
! 		       primary_name);
      }
      unlink_spool();
      exit(EX_OSFILE);
--- 753,760 ----
  {
      (void) signal(sig, SIG_IGN);
      if (out_file) {
! 	fprintf(out_file, "421 %s Service not available, closing channel\r\n",
! 		primary_name);
      }
      unlink_spool();
      exit(EX_OSFILE);

Index: src/string.c
***************
*** 1,4 ****
! /* @(#)src/string.c	1.12 8/8/92 19:30:45 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/string.c	1.13 9/6/92 03:25:14 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 771,777 ****
      char *s, *e;
  {
      char *p;
!     size_t n;
  
      n = (e - s);
      p = xmalloc(n + 1);
--- 771,777 ----
      char *s, *e;
  {
      char *p;
!     int n;
  
      n = (e - s);
      p = xmalloc(n + 1);

Index: src/sysdep.c
***************
*** 1,4 ****
! /* @(#)src/sysdep.c	1.27 7/11/92 11:51:19 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)src/sysdep.c	1.30 9/8/92 04:28:08 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 48,61 ****
  # endif
  #endif
  
- #ifdef POSIX_OS
- #else
-   struct utimbuf {
-       time_t actime;
-       time_t modtime;
-   };
- #endif
- 
  #if defined(POSIX_OS)
  # include <limits.h>
  # include <unistd.h>
--- 48,53 ----
***************
*** 115,120 ****
--- 107,117 ----
  # define STATUS_TYPE	int
  #endif
  
+ #if defined(FORCE_DIRSIZ_VALUE)
+ #undef DIRSIZ
+ #define DIRSIZ	FORCE_DIRSIZ_VALUE
+ #endif
+ 
  /* functions local to this file */
  static char *get_time_zone();
  static void fullname_from_gcos();
***************
*** 243,248 ****
--- 240,248 ----
      struct tm *ltm;
  {
  #if	(defined(UNIX_BSD) && !defined(POSIX_OS) || defined(USE_GETTIMEOFDAY)) && !defined(USE_TZNAME)
+ #if	defined(USE_TM_TZNAME)
+     return ltm->tz_zone;
+ #else	/* not USE_TM_TZNAME */
      struct timeval tv;
      struct timezone tz;
      (void) gettimeofday(&tv, &tz);
***************
*** 251,256 ****
--- 251,257 ----
      if (tznodst) ltm->tm_isdst = 0;
  #endif /* GLOTZNET */
      return timezone(tz.tz_minuteswest, ltm->tm_isdst);
+ #endif	/* USE_TM_TZNAME */
  #else	/* (not UNIX_BSD || POSIX_OS) && !USE_GETTIMEOFDAY && !USE_TZNAME */
  # if defined(UNIX_SYS5) || defined(POSIX_OS) || defined(USE_TZNAME)
      extern char *tzname[2];

Index: util/Makefile
***************
*** 1,5 ****
  #!/bin/make -f
! # @(#)util/Makefile	1.17 7/11/92 11:39:46
  # Makefile for the smail utility tools
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,5 ----
  #!/bin/make -f
! # @(#)util/Makefile	1.19 9/6/92 04:40:18
  # Makefile for the smail utility tools
  #
  #    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 14,20 ****
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
--- 14,20 ----
  AR=ar
  LINT=lint
  CLEAN=sccs clean
! MK=${MAKE} -${MAKEFLAGS} SHELL=${SHELL}
  SRC_PREFIX=
  MKDEPEND=${ROOT}/conf/lib/mkdepend.sh
  MKDEFS=${ROOT}/conf/lib/mkdefs.sh
***************
*** 64,70 ****
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} sh ${MKDEFS}
  
  ${COMPAT_LIB}:
  	cd ${COMPAT_LIB_DIR}; ${MK}
--- 64,70 ----
  	${GET} $@
  
  ${DEFS_H} ${DEFS_SH} ${DEFS_SED}:
! 	ROOT=${ROOT} ${SHELL} ${MKDEFS}
  
  ${COMPAT_LIB}:
  	cd ${COMPAT_LIB_DIR}; ${MK}
***************
*** 118,124 ****
  	chmod -w Makefile
  
  check_defs:
! 	ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  mkline:	mkline.o string.o field.o parse.o ascii.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC $$CFLAGS $$LDFLAGS -o mkline mkline.o \
--- 118,124 ----
  	chmod -w Makefile
  
  check_defs:
! 	SHELL=${SHELL} ROOT=${ROOT} ${SHELL} ${CHECKDEFS}
  
  mkline:	mkline.o string.o field.o parse.o ascii.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC $$CFLAGS $$LDFLAGS -o mkline mkline.o \
***************
*** 152,160 ****
  	sed -f ${DEFS_SED} $@.sh > $@
  	chmod +x $@
  
! pathmerge: pathmerge.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC $$CFLAGS $$LDFLAGS -o pathmerge \
! 		pathmerge.o $$LIBS ${COMPAT_LIB}
  
  getmap: getmap.sh ${DEFS_SED}
  	@-rm -f $@
--- 152,160 ----
  	sed -f ${DEFS_SED} $@.sh > $@
  	chmod +x $@
  
! pathmerge: pathmerge.o ascii.o ${DEFS_SH} ${COMPAT_LIB}
  	@. ./${DEFS_SH}; ${XEXEC} $$CC $$CFLAGS $$LDFLAGS -o pathmerge \
! 		pathmerge.o ascii.o $$LIBS ${COMPAT_LIB}
  
  getmap: getmap.sh ${DEFS_SED}
  	@-rm -f $@

Index: util/dbm_compat.h
***************
*** 1,4 ****
! /* @(#)util/dbm_compat.h	1.5 7/11/92 11:39:51 */
  
  /*
   * dbm_compat.h:
--- 1,4 ----
! /* @(#)util/dbm_compat.h	1.6 9/6/92 01:09:15 */
  
  /*
   * dbm_compat.h:
***************
*** 9,23 ****
  
  #ifdef HAVE_DBM
  
  #include <dbm.h>
  
  #else	/* !HAVE_DBM */
  
  #ifdef HAVE_NDBM
! #include <ndbm.h>
! #else
  #include "sdbm.h"
! #endif
  
  /* Imitate dbm using  */
  
--- 9,31 ----
  
  #ifdef HAVE_DBM
  
+ #ifdef DBM_INCLUDE_FILE
+ #include DBM_INCLUDE_FILE
+ #else
  #include <dbm.h>
+ #endif
  
  #else	/* !HAVE_DBM */
  
  #ifdef HAVE_NDBM
! # ifdef NDBM_INCLUDE_FILE
! # include NDBM_INCLUDE_FILE
! # else
! # include <ndbm.h>
! # endif
! #else	/* not HAVE_NDBM */
  #include "sdbm.h"
! #endif	/* HAVE_NDBM */
  
  /* Imitate dbm using  */
  

Index: util/dcasehost.c
***************
*** 1,4 ****
! /* @(#)util/dcasehost.c	1.3 7/11/92 11:39:53 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)util/dcasehost.c	1.4 9/6/92 01:10:10 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 24,36 ****
   */
  
  #include <stdio.h>
  #include "defs.h"
  
- #ifdef USE_ASCII
- extern char lowcase[];			/* lower case conversion table */
- extern char upcase[];			/* upper case conversion table */
- #endif /* USE_ASCII */
- 
  char *program;			/* argv[0] from main */
  
  char buf[BUFSIZ+1+1];		/* i/o line buffer */
--- 24,32 ----
   */
  
  #include <stdio.h>
+ #include <ctype.h>
  #include "defs.h"
  
  char *program;			/* argv[0] from main */
  
  char buf[BUFSIZ+1+1];		/* i/o line buffer */
***************
*** 125,131 ****
  	    register char *p;	/* index */
  
  	    for (p=buf; p < f1_white; ++p) {
! 		*p = tolower(*p);
  	    }
  	}
  
--- 121,127 ----
  	    register char *p;	/* index */
  
  	    for (p=buf; p < f1_white; ++p) {
! 		*p = lowercase(*p);
  	    }
  	}
  

Index: util/mksort.c
***************
*** 1,4 ****
! /* @(#)util/mksort.c	1.4 7/11/92 11:40:17 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
--- 1,4 ----
! /* @(#)util/mksort.c	1.5 9/6/92 01:10:32 */
  
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
***************
*** 155,169 ****
      register int c1, c2;
  
      for (;;) {
! #ifdef USE_ASCII
! 	c1 = tolower(*s1++);
! 	c2 = tolower(*s2++);
! #else
! 	if (isupper(c1 = *s1++))
! 	    c1 = tolower(c1);
! 	if (isupper(c2 = *s2++))
! 	    c2 = tolower(c2);
! #endif
  	if (isspace(c1) || c1 == ':')
  	    c1 = '\0';
  	if (isspace(c2) || c2 == ':')
--- 155,162 ----
      register int c1, c2;
  
      for (;;) {
! 	c1 = lowercase(*s1++);
! 	c2 = lowercase(*s2++);
  	if (isspace(c1) || c1 == ':')
  	    c1 = '\0';
  	if (isspace(c2) || c2 == ':')

Index: util/pathmerge.c
***************
*** 1,4 ****
! /* @(#)util/pathmerge.c	1.3 7/11/92 11:40:26 */
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
   *    Copyright (C) 1992  Ronald S. Karr
--- 1,4 ----
! /* @(#)util/pathmerge.c	1.4 9/6/92 01:10:35 */
  /*
   *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
   *    Copyright (C) 1992  Ronald S. Karr
***************
*** 20,25 ****
--- 20,26 ----
   */
  #include <stdio.h>
  #include <ctype.h>
+ #include "defs.h"
  
  extern int errno;		/* last system error */
  char *malloc();			/* our storage allocator */
***************
*** 30,36 ****
  #define TRUE 1
  #define FALSE 0
  
! #define lower(c) ((char)(tolower(toascii((int)(c)))))	/* safe tolower */
  
  /*
   * file state
--- 31,37 ----
  #define TRUE 1
  #define FALSE 0
  
! #define lower(c) ((char)(lowercase(toascii((int)(c)))))	/* safe tolower */
  
  /*
   * file state
