Changes made to Jnos 1.11a to yield 1.11b:

smtpserv.c			Added SMTP_DENY_RELAY and SMTP_REFILE #defines.

smtpcli.c			Fix smtp-gateway loop.

mailbox.c			Improve MBOX_DYNIPROUTE code.

smisc.c, config.c, rip.c	Improve UDP_DYNIPROUTE code.

qrz.c				Don't show '.' as lastname suffix. Handle too-
				long callsigns better.

iface.c				Improve if_detach() Hopper cleaup.

mboxmail.c			Fix missing bytecount in tmpfile passed to ed.

global.h			Added #include <errno.h> for newer Linuxen.

unixasy.c			Include lockfile path in lock-failed msg.

lapb.c				Handle incoming pkts while disconnected better.

mailutil.[ch], files.[ch],	Add SMTP_REFILE #define, that allows rewriting
nos.cfg				based on "from|to" addresses.  Rules are kept
				in /spool/refile by default.

buckbook.c			Support Buckmaster country, email, url and QSLmgr.

sockuser.c			Handle EOF better while a look-session is on.

fbbfwd.c			Agregate NULLCHAR assignments so generated code
				is smaller.

forward.c			Minor optimization.

index.c				Major optimization.

convers.c			Added /who #chan_num and CNV_TIMESTAMP_MSG code.

unix.[ch]			Fixed shell command for UNIX version.

fingerd.c			Added sccstat pseudo-user.

mail2ind.c			Added -f option to show area stats.

domain.c, netuser.h		Rework resolve_mx() when SMTP_A_BEFORE_WILDMX
				is #define'd, to prefer an A RR over a wildcard
				MX RR.
=======================================================================
Karl DJ9NZ suggested we needed a way to disallow Jnos acting as a mail relay
for hosts that are not trusted, that is, not a member of one of the system's
subnets.  I changed smtpserv() in smtpserv.c to do this when SMTP_DENY_RELAY is
#define'd.  This feature should be used cautiously; be sure the netmask is
defined correctly for all interfaces.

I made changes to mailbox.c (for MBOX_DYNIPROUTE) and to smisc.c (for
UDP_DYNIPROUTE) so Jnos behaves like K2MF's MFNOS in adding and deleting
dynamic IP gateway routes.  For a route to be added, there must be no existing
route, OR the existing route must be via the Loopback interface, or via the
encap interface with non-zero route timers.  The typical procedure would be for
the sysop to route a subnet to loopback, in anticipation of it being changed
later by a dynamic-ip gateway.  I also added code to rip.c (rt_timeout()) and
config.c (rt_timeout() also) to restore such routes to the Loopback interface
when they time out.  This acts as a bit-bucket and causes traffic to expired
gateways to be silently dropped.  Thanks to Barry K2MF for the improvements.
I also added more comments to the 1.11a descriptions in readme.now to clarify
the loopback recommendation.

I changed qrz.c to not display '.' as the lastname suffix.  This field is now
used to flag the existence of an email addr stored in netaddr.qrz, but I have
no docs on how to decode it!  Robin G8ECJ reported a problem in the handling
of a too-long callsign.  qrzfind() now tests the length sooner to avoid over-
writing storage.

Barry K2MF suggested an improvement to if_detach(), which removes the packet
completely, instead of nulling the iface ptr for packets coming from interfaces
being detached.  It seems even the nulled packets can cause problems later on
in some circumstances.  Fixed, in iface.c.

Scott N2BZT found a problem under DOS 5.0 when using the SEND_EDIT_OK option.
It turns out that DOS 4.01 (and earlier?) set the bytecount, but not in
DOS 5.0 and later, when invoking the editor for the tmpfile.  I have made a
change to dup the file handle and then close it, in dosend() in mboxmail.c.
This should fix it for all DOS releases!

I added an explicit #include <errno.h> in global.h, since in newer Linux
installs, stdlib.h doesn't include errno.h anymore.

I added mention of the lockfile path in the lock-failed error message, so
that installations with different locking directories might see where Jnos is
trying to create a lockfile.  Thanks to Pierfrancesco IK5PVX for the idea.
I modified asy_attach() in unixasy.c.

Jim WU3V reported a Linux Jnos crash apparently due to receiving certain packets
while already disconnected.  The code in lapb_input() in lapb.c was trying to
use an axp pointer whose associated structure was just freed.  Fixed.

By popular demand, I added the ability to rewrite a message into an area (or
smtp destination) based on the message's envelope From and To address.  The
rules are stored in /spool/refile by default (set Refilefile to a different
value in nos.cfg to change the default filename).  The rules are similar to
those used in the standard rewrite file, except that field one contains the
expected From address immediately followed by a '|' symbol, then immediately
followed by the expected To address.  This feature is enabled by compiling
with SMTP_REFILE #define'd.  If the refile attempt fails, then the standard
rewrite is performed.  Example:  to file nos-bbs messages arriving for user
n5knx on gateway w5ddl.ampr.org, into a area called nos-bbs, use:
nos-bbs@hydra.carleton.ca|n5knx@w5ddl*	nos-bbs
As always, a mapping to "refuse" will result in the message being rejected
(or returned to sender, depending on the protocol used).  Affected were
files.c/.h, smtpserv.c, mailutil.c/.h, and nos.cfg.

Bob WA2MNO pointed out that the Jnos Buckmaster cdrom support didn't print the
new info: country, email and URL adresses, and QSL manager.  Fixed, by changes
to buckbook.c.

Jim WU3V reported a problem with the Linux Jnos, when a look session is engaged
and an EOF is read by recvchar() in sockuser.c.  It turns out that in some
circumstances, the usock structure corresponding to the socket has been freed
and reused, by the time the rrecvchar() routine returns.  Thus when the usock
structure's look session pointer is used, it may actually be garbage.  I
changed recvchar() to test for a non-EOF return before derefencing the pointer.

I made a small change to fbbfwd.c so that pointers are assigned the NULLCHAR
value in one statement, rather then several separated by intervening code, so
the compiler can generate less code to achieve the same result.

Based on Mike WD6EHR's request and Glenn WB6W's code, I added to convers.c
the ability to list users by channel number: /who #chan_num  e.g. /w #19
and also to prefix msgs sent to local users with a hh:mm timestamp, if
CNV_TIMESTAMP_MSG is #define'd when Jnos is compiled.

Robin, G8ECJ reported a problem in the Linux handling of the shell command.
I took a look at the code and realized it needed to be reworked to allow
viewing the output from issued commands, and also to allow the remote sysop
to issue non-null shell commands.  I also decided it was better to merge
all the arguments for the user, rather to require that multi-argument commands
be quoted.  Thus the shell command now acts more like the DOS version,
except that /c has no meaning and should not be used.  Examples:
    shell ls -algr
    ! ls -l
    at now+0001 "! find / -xdev -name core > /tmp/cores &"

I added sccstat as a pseudo-user, to fingerd.c.  Thanks to Robin G8ECJ for the
idea.

Orrin WN1Z described an smtp loop when the smtp gateway was set to the Jnos
ip address.  I fixed this by testing for this special case (formerly it
was just tested if HOPPER was #define'd), in smtp_send() in smtpcli.c.

I happened to observe that by making the print_index() routine in index.c
conditioned on MAIL2IND being #define'd, we could save 500+ bytes.  Every byte
helps the DOS version!

I added a quick and dirty area summarizer to mail2ind, via the -f option.
It'll show msg counts and total msg size in kilobytes in various categories.

A long discussion in nos-bbs pointed out how Jnos normally follows the crowd
and gives precedence to a wildcard-MX RR (resource record) over an A RR.  This
means that given these resource records:
	little.ole.me.com.	IN	A	192.1.2.3
	*.me.com.		IN	MX  10  192.4.5.6
email to "little" would be delivered to 192.4.5.6.  To force email to be
delivered directly to "little", you would normally have to add another,
explicit, MX RR:
	little.ole.me.com.	IN	MX  20	192.1.2.3
This can be a problem when you aren't in charge of the DNS!  I added a compile-
time #define called SMTP_A_BEFORE_WILDMX, to cause Jnos to give precedence to
an A RR over a wildcard MX.  I'm not sure which feature I dislike more: this
new #define, or wildcard-MXes in general!
