Introduction and disclaimers ---------------------------- Firstly, in big letters, this version of KA9Q/NOS is an unofficial bug fix release based on Demon Internet's v2.16d code. It is NOT approved of nor supported by Demon Internet Ltd in any official or unofficial form. My only connection with Demon is as a paying customer. See the included file changes.txt for details of changes to each source file. Everything that appears under each file should be a complete list of changes that have gone into building this version although a few changes listed aren't built into this version. There are no TextWin-specific changes (unless I've broken something whilst merging the code). Full source code will follow shortly. I only have nntpcli.c, smtpcli.c and smtpserv.c left to tidy up the commenting in but as it's taken me long enough to get this far, I thought I'd release the executables now. Lastly, I'll repeat this version is unapproved and not supported by Demon Internet in any shape or form. Direct all queries to . Any ideas, suggestions, diffs, moans and whinges for future features or fixes are more than welcome. Graham E. Kinns 17 Aug 1997 Versions to grab ---------------- Standard KA9Q/NOS: large.zip Large model - "everything" u-lite.zip Ultra-Lite - this is the Large model without: telnet server (mailbox), RIP, Domain server, IP filtering, Finger server, FTP server, Zmodem, packet traceing, rlogin, ttylink server, remote client and server, ! shell out, packet driver/ethernet support. As a bonus, a POP3 long finger client is incuded to list your mail waiting on Demon from anywhere. See the sdps command below. TextWin: tw-tiny.zip Tiny model - missing telnet server (mailbox), RIP, Domain server, IP filtering, Finger server, FTP server, Zmodem tw-ulite.zip Ultra-Lite - as the standard ultra-lite above, including sdps. Quick start ----------- Backup and/or rename your existing net.exe and replace it with one of the above versions. No changes to autoexec.net should be necessary but if you have a tweaked configuration then the following notes will be of interest. Changes you should be aware of ------------------------------ * rewrite file and bounce addresses The return address for bounces generated by the SMTP client is checked with the rewrite file to ensure local addresses are handled correctly (with mail forwarding, there's currently no other way to determine if an address is local). The rewrite file MUST NOT therefore mangle any non-local addresses - this includes rules such as: *.*@* $1_$2@$3 r *@* $1 An example fixed replacement - the first line is only needed with mail forwarding; $h is replaced by your full hostname; the third line isn't strictly necessary either if your hostname is defined as sample.demon.co.uk: *@mydomain.org $1@$h r *.*@sample.demon.co.uk $1_$2@$h r *@sample.demon.co.uk $1 'smtp server relay off' may not work correctly with a rewrite file that mangles non-local addresses. Source routing (@somehost.dom:x@y) is now stripped before rewriting so rules beginning @*: will no longer work (AFAIK Demon haven't delivered mail with this format for a while anyway). * Login sequence and PPP are much quicker Any commands after the 'dial sl0 ...' line in autoexec.net may not be executed until after the routing is up and traffic is flowing. Adding the following commands can further increase login times: ppp sl0 lcp timeout 1 ppp sl0 ipcp timeout 1 time delay 0 The first two lines compensate for a current feature of the Ascends' PPP code. The time delay setting defaults to 10 seconds, too high IMHO given the current route setup times. PAP also seems now to work reliably. * Command changes - 'finger ...' supports -l option for long finger. - 'time server ...' doesn't resolve hostname until required 'time server none' removes hostname. - 'time read' and 'time set' run without hogging the console Also timeouts on initial time connection and data read to prevent hanging connection. - 'smtp gateway ...' doesn't resolve hostname until required 'smtp gateway none' removes hostname. - 'ppp sl0 lcp listen' results in a passive open as it did prior to v2.16d; 'ppp sl0 lcp open' configures an active open. The default is still an active open as with v2.16d. * New commands - FTP client now supports delete, rm, rename and mv. - nntp retry [on|off] [max_retries [delay_between_kicks]] Automatic retries on 400 server busy responses. delay_between_kicks is in seconds (default = 0). Default: off - smtp server commit [on|off] When on, attempts to flush a SmartDrive[tm] v4.x compatible write back disk cache (if detected) before acknowledging successful receipt of each mail message. Default: off - smtp server receipt [on|off] Controls the generation of responses to the Return-Receipt-To: header. Default: on - smtp server relay [on|off] Turns off the ability for the SMTP server to accept non-local mail. With mail forwarding, I'd advise using VRFY and EXPN to check that it still behaves correctly before going online. Default: on - sdps nodename password [smtp] Ultra-lite version only, POP3 long finger listing. Including 'smtp' as the third argument does a 'start smtp' at the end of a successful listing. password is dialup or POP3 password when connecting from your Demon account, POP3 password when connecting from another account. Server hard coded to pop3.demon.co.uk since it uses Demon's proprietary *ENV extension. * NNTP client changes A 'NEWNEWS *' since 1970 is not done in the event of adding a new server with no entry in nntp.dat. 'nntp dropserver' bug and other NULL ptr derefs fixed. News killing is optimized to reduce the amount of header match tests needed - instead of using one internal list for kill and one for keep, there are 26 lists each - indexed by the first letter of the header. This has the disadvantage of not allowing any wildcards at the start of a rule (except for '*' to kill all bodies, this is now handled more optimally). Any rules which are ignored are notified to screen. Reported message-id count is only updated in stages beyond certain limits (performance killer with slow video card, IMHO). Added duplicate detection for ids appearing multiple times in one NEWNEWS response, reported as NewNews duplicates. Much better logging and handling of unexpected responses, full handling of '430 unavailable' and '502 no permission' responses for headers, bodies and articles. Disconnections and state machine errors should be logged with message-id and full server response where possible. Finally the bytes/sec calcs were off as it wasn't allowing for the \r\n -> \n translation and long lines so reported rates should be up anyway ;-) * SMTP client changes Fixes for 400 and 500 response handling; this required some changes to the batching code - mail sending with 'smtp batch on' is NOT fully tested. Better disk space checks, less chance of deleting messages which can't be sent (as a last resort, bounce messages or receipts that somehow fail to be sent for fatal reasons are sent to Postmaster with an explanation). 'While talking to' bounce is fixed to show both mail domain and actual mailhost name and IP address. 'smtp list' fixed; only displays up to 3 recipients for each msg. When memory gets tight, the recipient list for messages to more than 3 recipients is not loaded into memory, it's read from disk as required during the SMTP transaction. * SMTP server changes There's a fix in place to unmangle MMDF's habit of quoting domain literals so any mailkill entries like *@"\[127.0.0.1\]" need to be adjusted to *@\[127.0.0.1\] My reason for fixing it is that when trying to forward any mail with such an envelope, most other MTAs will (correctly) reject the quoting as invalid syntax. EXPN and VRFY now use the same rewrite and alias expansion rules that incoming mail uses, so they're much better for checking correct alias setup. The alias expansion is substantially rewritten so it behaves as described in DISPC.TXT. As such, you might want to use EXPN and VRFY offline to ensure any complex alias expansions still work as expected. Mail to postmaster@ cannot be rejected (mail AUP) except by mis-configuration of the rewrite file. Mailkill now logs the matched rule against killed addresses (bit messy at present - 2 entries: one with the rule, one with the to address). More system friendly, doesn't hog CPU with long kill files. Mailkill returns errors in response to RCPT TO not MAIL FROM in line with RFC, allows logging of to: address. Received: header now includes IP address of peer, contents of the to envelope before rewrite/alias and an improved timestamp format for security and traceability. * Wildcard matching The wildcard matching routines, used for mailkill, news kill and rewrite, now accepts ']' and '-' within [] ']' must be first in set, '-' may be first or last. Bug fix and optimizations to the wildmat() routine should also make it more efficient for complex patterns. Known/unresolved problems ------------------------- 'SMTP Connect failed: ...' log entry is useless; missing IP address. SMTP sending console display is messy. At 14.4k, the TCP send window is sometimes reported as 65392 (122*MSS) rather than the usual 9112 for news connections over some of the slower Ascends. Not sure where the problem lies, something to do with only adding part of the TCP window probing fixes? Occasional delivery to the wrong mailbox still a problem? - I don't believe that this was caused by the global-not-per-session variable problem; in the both cases I know of, no 'default' line was in use. [Thanks to Shakib, I'm now in possession of a set of logs and headers showing the problem - looks like a interaction problem with multiple SMTP sessions and alias expansion but I still don't think it's the known mailkill problem]. Bursts of TCP checksum errors on news and mail connections (tcpInErrs on 'tcp status') - disappears if VJ is not negotiated and not seen on TNT lines - Ascend VJ bug?? Not sure all possible responses from SMTP EXPN/VRFY meet RFCs and current drafts. PPP PAP is broken if PAP is negotiated as the authentication type but no username/passwd is configured (prompts for input from console doesn't work). Received PPP Terminate Requests don't result in link being closed down from some states? Mail received beep is now buffered - I don't like that. News kill file doesn't support matching continuation lines nor header lines longer that 511 chars. 'sm se' is smtp separator, not smtp server ... Todo ---- More bits and pieces to hopefully fix and add in the near future: TCP fixes from PK's latest version to bring it in to line with RFC1122. Experiment with BSD style window updates from Linux - claimed to double throughput against BSD and Solaris. SMTP client logging of 250 response (including id) sent by remote server on accepting mail (had this in an earlier version but it's not in this release). SmartDrive[tm] flush code can be reduced to an Int 21h/AH=0Dh call according to a MS Knowledge Base article. The additional commit call is probably unnecessary immediately prior to a close. !keep format for mailkill; mailkill logging needs fixing. NNTP kill lists for continuation lines and wildcards Assembly source tweaks to allow building of 32bit 386 version. PPP and interface MRU/MTU - I'm not convinced the logic behind the way the negotiated parameters are used is correct. PPP IPCP type 3 to type 1 fallback to fix. Anyone got a desperate need for PPP/CHAP?