Things that should be done before the next minor release (patches are,
of course, graciously accepted!):

Important Bugs:
--------------------

- fix bug where qualify_domain() isn't called for addresses specified on
the command line (i.e. it only seems to be called when '-t' is used)

- fix broken $target_domain when bang paths are used:

	smail -bv -v99 rkk.ru!info
	dtd_aliasfile called
	expand_string(/etc/virtual/${lc:target_domain}, , ) called
	expand_string returns /etc/virtual/info

- verify that it is indeed legal for a SMTP connection timeout error to
still result in forwarding what appears to be a complete message....

- use ftruncate() to remove partially written messages in appendfile.c
if ERR_135 [if possible].

- fix directors "domains" handling v.s hash table [doesn't seem to be a
problem (other than needing an option similar to the routers "always""
flag to force no other non-matching director to be tried)].

- look into crash with empty input file [possibly fixed in 3.2.1?]

- fix "from_field" to never allow "From:" to go missing and if it's nil
do something appropriate....

- fix db lookup parser to allow '#' in left-hand side (if quoted?) [aliasfile]

- investigate the Apparently-To: being set, while input_addr not being set:
(no To/Resent-To/Cc/Bcc, etc., header in data, just envelope "MAIL FROM:")
	
	Received: from [204.92.254.3] by most.weird.com
		via sendmail with smtp (ident woods using rfc1413)
		id <m0udnxb-00076qC@most.weird.com>
		for <unknown>; Tue, 9 Jul 1996 21:20:59 -0400 (EDT)
		(Smail-3.2 1996-Jul-4 #1 built 1996-Jul-4)
	Apparently-To: foo@anet

perhaps $input_addr should be set from envelope (always?).

- do something about the premature lower-casing of user names.  Users
with upper case characters may not be able to receive mail (or at least
read the stuff they've received....)  [this might be the same region of
code that's causing problems for "domains" handling in directors]
(perhaps also add a meta policy flag "allow-mixed-case-users")
[done?  needs a test case.]

- fix aliasfile parser to allow case sensitive aliases (ala above?)
[keep in mind the lists director uses "lists/${lc:user}"]

- test with sdbm

- HAVE_SETGROUPS on FreeBSD > 1.1.1.5 panics with NFS accesses (Jim Mercer)
[seems FreeBSD and BSDI have gone out on a limb to change the API to
setgroups() such that there is no "default" group -- stupid in my mind,
but; and in that version of FreeBSD there are some incomplete changes to
the API that cause the panic -- too bad in my mind!  ;-), but this means
we probably should do something to handle these OSs.]

- a zero-byte retry file seems to be un-lockable....

- turn down the verbose logging of failed locks, if known other smail
process holds lock....  eg:

	02/28/96 12:07:36: open_spool: /local/var/spool/smail/input/0trpIB-00076nC: lock failed: Permission denied

[Unfortunately this will probably require re-writing the spool locking
functions to use pid-in-a-lock-file mechanisms.]

- check out what's going on with Apparently-From being added multiple
times

- check out re-writing Apparently-From if from '-f'


Incomplete Features:
--------------------

- fully support $max_message_size [include hints to user about resending
in bounce if not immeadiately rejected by ESMTP, and perhaps add a new
option $truncate_oversize_bounce or similar with default ON].

- enable and test HAVE_DF_SPOOL for all systems were possible [or wait
for autoconf?].

- think about allowing $listen_name to be set on command line too [if
this is used for more than one domain then you'll need separate config
files anyay, so just use -C; but if you are using this to avoid having
smtp some interfaces then this info may be easier to manage in one place
in the /etc/rc* files or whatever].

- investigate if allowing some way to specify a requirement for HELO or
EHLO in initial conversation, perhaps on a per-host or per-network
basis, would be of any use [such as avoiding broken MS & Lotus gateways].

- investigate a better default value for $return_path_field.

- do something to make aliasfile parsing identical across lookup protos.
(related to 'db lookup parser' bug above?)

- implement 'mailq' to follow through on '-t' option (i.e. read header)

- have 'mailq' print "Mail queue is empty' when it is (isatty()?) ala sendmail

- Put the following in default.c for SVR4's local, pipe, & file transports:

	remove_header="Content-Length",
	append_header="${if !header:Content-Type :Content-Type: text}",
	append_header="Content-Length: $body_size",

- put the following in default.c for SCO's local & file transports:

	suffix="\1\1\1\1\n",            # MMDF mailbox format
	prefix="\1\1\1\1\n",            # MMDF mailbox format

- think about how to integrate checkerr and savelog so that security
violations can be snarfed from logfile just after it is cycled.  Perhaps
a new over-all maintenance script (smailmaint?) could do the work and
there would only be one crontab entry necessary.  [syslog logging will
change all of this since then security violations will get more
attention from syslog if the admin desires...]


New Features:
--------------------

- implement optional $max_mailbox_size [optionally as a colon separated
list of "user=size" tokens with something like '*' as the default user
and "nolimit" to unset per user].

- never completely fill the spooldir if HAVE_DF_SPOOL (add optional
$min_spooldir_free?)

- be careful about never filling the logfile too (can we instantly defer
connections if we're out of resources like this?)

- log SMTP VRFY's, EXPN's, and maybe even VERB's, maybe with a
$log_events flag to control which are on [or wait for syslog support?]

- make the startup log message more verbose (version, build, build date,
release date, etc.) [use $smtp_banner ???]

- write a minimal mailstats replacement (new log file format only)
[real stats, not just what logsumm does]

- implement 'mailq' option to read the "error" queue (mailq -e?)

- implement '-R'

     -Rstring       Go through the  queue  of  pending  mail  and
                    attempt  to  deliver any message with a reci-
                    pient containing the specified string.   This
                    is useful for clearing out mail directed to a
                    machine which has been down for awhile.

- implement ETRN from RFC 1985 ala the above.

- implement other standards-track SMTP extensions....


Miscellaneous:
--------------------

- add #ifdef HAVE_UNISTD_H #include <unistd.h> where appropriate [or
wait for autoconf?].

- remove nested includes from "jump.h" [and everywhere!].

- think about getting <string.h> out of defs.h [or wait for autoconf?]

- investigate: ORIG-ID:<199604230758.AA13625@post.tandem.com\POS,$ZNET^U5>

- think about doing something to allow an alias to be used to force a
"no-such-user" bounce.

- install ".so" longname manual pages on systems with longnames [need to
fix up xrefs too?]

- should we add IsValid*() checking?  from:
<ftp://ftp.cert.org/pub/cert_advisories/CA-96.04.corrupt_info_from_servers>
