Index: ChangeLog
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/ChangeLog,v
retrieving revision 1.488
retrieving revision 1.521
diff -u -r1.488 -r1.521
--- ChangeLog   2000/09/19 11:46:04     1.488
+++ ChangeLog   2000/11/12 17:04:17     1.521
@@ -1,3 +1,341 @@
+2000-11-12  Matti Aarnio  <[email protected]>
+
+       * lib/selfaddrs.c:
+           Learned something about the SIOCGIFFLAGS/SIOCGLIFFLAGS
+           ioctl parameters, and what is necessary for initializing
+           its call.
+
+       * transports/smtp/smtp.c:
+           Some oddball moments don't fail properly after response
+           timeout during certain critical periods -- mainly of DATA/RSET.
+           Doing   smtpclose()  where we used to RSET  right after
+           DATA has been sent, and response to it has been waited
+           for way too long..
+
+2000-11-02  Matti Aarnio  <[email protected]>
+
+       * smtpserver/smtpserver.h, smtpserver/smtpserver.c:
+           Turn the listening sockets into NON-BLOCKING mode,
+           and once connection is accept(2)ed, turn the communication
+           socket into blocking mode.
+
+       * transports/smtp/getmxrr.c:
+           Randomish bounces seen at  vger.kernel.org  for domains
+           which have non-functional DNS servers (likely due to
+           network failure, or some such.)  Symptom seems to
+           indicate NXDOMAIN DNS query reply status, but the
+           darn thing happens *rarely*...
+           ... I am not sure this change is a smart thing to do,
+           ... and latter on I removed this change.
+           It looks like getting NXDOMAIN is trouble at whatever
+           system happens to be the DNS server, and we are better
+           of when we don't trouble ourselves too much with
+           circumventations at the resolver code for it.
+
+2000-10-31  Matti Aarnio  <[email protected]>
+
+       * transports/smtp/smtp.c:
+           Move the  notarystatsave()  function call up so that it will
+           always be called for all collected replies.  Formelly there
+           were cases where it didn't get called, which caused somewhat
+           weird looking results when the TA program switched to alternate
+           destination domain.
+
+       * libc/getaddrinfo.c:
+           Disable entirely the AF_LOCAL support.
+           The code in question used tmpnam() which created some complaints
+           from the recent linker/libc at RH 6.2/7.0 hybride system.
+
+       * configure.in, proto/smtpserver.conf(.in):
+           Turns out that "make install" when working in "adjacent
+           directory" setup doesn't pick correctly the smtpserver.conf
+           for the installation.  Returning to generated smtpserver.conf
+           file, although strictly speaking that is not needed.
+
+       * proto/db/dbases.conf, utils/policy-builder.sh.in,
+         proto/newdbprocessor.in:
+           Spotted a few mistakes at the perl scripts of newdbprocessor.
+           With a hindsight -- me stupid...
+           Spotted also missing "-d pathalias" at "routesdb" specification.
+           And some awk cleanups at policy-builder as well, of course.
+
+       * packaging/solaris/README:
+           Some additional comments on usage of this tool subset.
+
+2000-10-24  Matti Aarnio  <[email protected]>
+
+       * proto/cf/rrouter.cf, proto/cf/canon.cf:
+           Support magic trick:
+               @[CHANNELNAME]:user@domain
+           in such a manner as to produce
+               (((CHANNELNAME domain user@domain ATTRIBUTES)))
+           routing result
+
+2000-10-23  Matti Aarnio  <[email protected]>
+
+       * transports/smtp/smtp.c, utils/mxerify/mxverify-cgi.c:
+           For IPv4 addresses, verify that our connect(2)
+           destination is of valid IPv4 network (first octect
+           is in range of 1..223), at mxverify exclude loopback.
+
+       * transports/smtp/Makefile.in:
+           Add into "make install" installation of $MAILBIN/getmxrr-test
+           so that it will be available at all installations...
+
+       * utils/mxverify/mxverify-cgi.c:
+           Small text changes.
+
+       * transports/smtp/smtp.c:
+           Noticed a few places where we need to reset the
+           "SS->rcptstates" variable.
+
+2000-10-20  Matti Aarnio  <[email protected]>
+
+       * proto/Makefile.in, packaging/Makefile.in:
+           'make install' will install also 'doc/guides/*' files
+           into $MAILSHARE/guides/  -- there seems to be call for
+           those files from some users...  In other environs,
+           like Linux distributions, there could be some sort
+           of  /usr/share/doc/zmailer-NNN/guides/ for them.
+
+       * doc/guides/smtp-policy, utils/policy-builder.sh.in:
+           Defined ".manual" versions for ".mx", and ".relay"
+           of  smtp-policy driver files.  This enables more
+           wide-spread automated data fill-in, plus local
+           ".manual overrides".
+
+2000-10-17  Matti Aarnio  <[email protected]>
+
+       * transports/libta/ctlopen.c:
+           Return NULL, not 'void' in certain silence case.
+
+       * transports/libta/diagnostic.c:
+           Try not to do so verbose diagnostic report over
+           syslog as via TA->scheduler channel.
+
+       * smtpserver/smtpdata.c:
+           Parse possible "contentpolicy" analysis report, and present
+           it (in several cases) to the user.
+
+       * smtpserver/smtphelp.c:
+           Small fixes for help presentation, and parameter recognition.
+
+2000-10-16  Matti Aarnio  <[email protected]>
+
+       * smtpserver/smtpdata.c, smtpserver/smtphelp.c, smtpserver/smtptls.c,
+         smtpserver/smtpserver.c:
+           Rethought of things, killed the Z_printf() abomination.
+           Also fixed inadverent NULL referral which Eugene Crosser
+           found as well.  (It blocked my incoming email :-( )
+
+       * man/smtpserver.8, smtpserver/contentfilter.c, smtpserver/smtpdata.c:
+           Improved documentation of the CONTENTFILTER INTERFACE
+           ( = wrote it ), and modified a bit of the interface itself.
+
+       * configure.in, proto/smtpserver.conf, smtpserver/cfgread.c,
+         man/smtpserver.8, proto/Makefile.in,
+           Allow $ZENV expansions in smtpserver's configuration.
+           Thus allow simpler moving of the thing to other location
+           without needing to edit anything but  zmailer.conf  file..
+           Also removed  smtpserver.conf  from autoconfigured protofiles.
+
+       * scheduler/readconfig.c, smtpserver/cfgread.c, transports/sm/sm.c,
+         transports/mailbox/mailbox.c, transports/smtp/smtptls.c,
+           Changed all instances of macro-in-macro style CPP things
+           of 'SKIPWHILE(testfunction,varname)' to be appropriate
+           'SKIPSPACE(varname)' and 'SKIPTEXT(varname)'.
+           (RedHat 7.0 gcc version does not work correctly with those..)
+
+       * smtpserver/policytest.c, smtpserver/rfc821scn.c,
+         smtpserver/smtpcmds.c, smtpserver/smtpdata.c, smtpserver/smtpetrn.c,
+         smtpserver/smtpserver.c, smtpserver/smtpserver.h,
+         smtpserver/smtphelp.c, smtpserver/mxverify.c:
+           Aimed for some coherence at debug mode printouts/flushes
+           in some cases.  Mainly the problem is that at the policytest.c,
+           and at the mxverify.c the debug output goes to stdout via
+           printf(), while elsewere it goes via type() to SFIO attached
+           to the connection.    TO BE ACCURATE, AS THINGS ARE NOW IS
+           NOT SUITABLE FOR DEBUGGING E.G. SSL WRAPPED SESSIONS!
+
+       * smtpserver/smtpserver.h, smtpserver/smtpserver.c,
+         smtpserver/cfgread.c, smtpserver/smtptls.c:
+           - Have new runtime flag (-t) telling that this is a session
+             running immediately under TLS (port tcp/465, "ssmtp"), which
+             feature predates STARTTLS facility.
+           - Have parallel listen socket for two different services;
+             namely plain 'smtp', and 'ssl/smtp')
+
+       * scheduler/mq2auth.c, scheduler/msgerror.c, scheduler/readconfig.c,
+         include/libz.h, lib/cfgets.c, smtpserver/cfgread.c,
+         transports/errormail/errormail.c, transports/mailbox/mailbox.c,
+         transports/sm/sm.c, transports/smtp/appendlet.c:
+           Renamed that function to be   csfgets()  -- after I myself
+           got confused about its calling convention...
+           (That is: FILE * or Sfio_t * thing..)
+
+2000-10-13  Matti Aarnio  <[email protected]>
+
+       * sfio/src/lib/sfio/makefile.in, sfio/src/lib/sfio/Stdio_b/Makefile.in:
+           Noticed an omission in cross-directory compilations.
+           Sometimes 'iffe' would fail when directory 'FEATURES' didn't
+           exist at the running position.  Oops.
+
+2000-10-12  Matti Aarnio  <[email protected]>
+
+       * utils/makedb/dbdump.c:
+           New option:  -policydump   which decodes the policy
+           binary set into a text.
+
+       * smtpserver/smtpserver.h, smtpserver/smtpserver.c, man/smtpserver.8,
+         smtpserver/cfgread.c, smtpserver/smtphelp.c, smtpserver/smtpcmds.c,
+         smtpserver/smtpdata.c:
+           Implemented experimental LMTP (RFC 2033) support, this is *not*
+           for real LMTP use, merely for debugging LMTP clients.
+
+       * transports/smtp/smtp.c, transports/smtp/smtp.h,
+         proto/scheduler.conf.in:
+           Completed the LMTP (-M) mode, tested it quite a bit with
+           and without remote speaking PIPELINING. Can support even
+           remotes announcing STARTTLS capability in the LMTP port.
+           Removed duplicate remote response analysis code from
+           synchronous (non pipelined) code path, now using only
+           the  smtp_sync()  to collect replies.
+
+           Supplied sample "smtp-lmtp/*" configuration for use.
+
+       * proto/zmailer.sh.in:
+           Do cd to $POSTOFFICE  when starting smtpserver.
+           Dropping cores to system root is not polite..
+
+       * man/sendmail.8, man/zmsh.1:
+           Changed <[email protected]> to <[email protected]>
+
+       * man/smtp.8:
+           Mention RFC 2033 and LMTP at the RFC list in the end.
+
+       * man/scheduler.8, scheduler/mq2auth.c, proto/scheduler.auth.in:
+           Allow multiple instances of same userid by scanning the address
+           ACLs at each UID.  Thus nobody@localhost can get different
+           level of access from nobody@elsewere.
+
+2000-10-10  Ambrose Li <[email protected]>
+
+       * utils/vacation/vacation.c:
+           Removed some duplicate code, and detect autoreplies whose
+           source address is:  <>
+
+2000-10-10  Matti Aarnio  <[email protected]>
+
+       * lib/Makefile.in:
+           "make install" did put zmailer.h into  $prefix/$prefix/include/,
+           which is "somewhat" wrong...
+
+       * man/smtp.8, transports/smtp/smtp.c, transports/smtp/smtp.h:
+           Implemented LMTP (RCF 2033) at the smtp TA program.
+           To enable LMTP, use option '-M'.
+
+       * scheduler/mq2.c:
+           When reporting "unknown" command, do tell things differently:
+             "Unknown command, or refused by access control;" ...
+
+       * smtpserver/mxverify.c:
+           Fix the IPv6 nybble-reverse code to do proper in6 type reverser,
+           although an alternate (binary labels) is defined these days...
+
+       * transports/libta/ctlopen.c:
+           See if the message to be opened is an ETRN request -- if yes,
+           just return with failure...  (manual-expirer triggers this.)
+
+       * transports/libta/mimeheaders.c:
+           While parsing for Content-Type: parameters, allow LWSP in same
+           lines.  Full specification really calls for RFC 822 tokens along
+           with CWSP and commend handling.
+
+       * transports/mailbox/mailbox.c:
+           Separates "From MAILER-DAEMON " from "Return-Path: <>".
+           Produces "X-Envelope-To: <...>" header.
+
+       * ChangeLog, INSTALL, Overview, README.TCP-WRAPPER,
+         README.UPGRADING, compat/sendmail/sendmail.c, doc/guides/configure,
+         doc/guides/smtp-etrn, include/zmsignal.h, lib/hashtest.c,
+         man/smtpserver.8, proto/smtpserver.conf.in, proto/cf/aliases-new.cf,
+         proto/cf/aliases.cf, proto/cf/rrouter.cf, proto/cf/standard.cf,
+         router/prototypes.h, router/rfc822walk.c, scheduler/msgerror.c,
+         scheduler/scheduler.c, smtpserver/rfc821scn.c, transports/sm/sm.c,
+         smtpserver/smtprouter.c, transports/libta/diagnostic.c,
+         transports/mailbox/mailbox.c, transports/smtp/smtp.c,
+         utils/smtpserver-log-parser.pl.in, utils/pop-proxy/pop-proxy.c:
+           A great speller-bee of "propab*" -> "probab*".
+
+2000-09-26  Matti Aarnio  <[email protected]>
+
+       * man/sm.8, transports/sm/sm.c:
+           Updated (with a radical hand) the manual page to list
+           what sendmail 8.11 does with flag characters, and what
+           the ``sm'' does with same characters (and some more).
+
+2000-09-25  Matti Aarnio  <[email protected]>
+
+       * transports/hold/hold.c:
+           This was left out from the commit 4 days ago.
+
+       * libresolv/sys/bitypes.h, sfio/src/lib/sfio/sfhdr.h,
+         ssl/ssl.c:
+           Experimental changes to support compilation at AIX 4.1.
+
+       * proto/db/dbases.conf:
+           The 'thishost' relations used to carry '-d pathalias'
+           driver option on original systems, now it was missing..
+
+2000-09-22  Matti Aarnio  <[email protected]>
+
+       * proto/Makefile.in:
+           An adjacent directory install failed when system
+           does not have suitable binary 'install' program, and
+           'install.sh' is needed.  Rearranged things.
+
+2000-09-21  Matti Aarnio  <[email protected]>
+
+       * scheduler/mq2auth.c, scheduler/scheduler.c:
+           File leakage at authuser(), which caused opendir() to fail,
+           and its resulting NULL was used unprotected -> SEGV.
+           (Ran out of free file descriptors.)
+
+       * router/functions.c, transports/hold/hold.c, proto/cf/aliases.cf:
+           "hold" handling for the $(homedirectory ...) function.
+
+2000-09-20  Matti Aarnio  <[email protected]>
+
+       * proto/cf/rrouter.cf, proto/db/routes:
+           Generalizing on various smtp* mechanisms.
+
+       * proto/scheduler.conf.in:
+           Channel prototypes for  smtp77/*, smtp77x/*, and others.
+           Some reordering, and log option rearrangements.
+
+       * transports/smtp/smtp.c, man/smtp.8:
+           ESMTP disabler feature. ( -77 option )
+
+       * packaging/solaris/Makefile.in, packaging/solaris/README,
+           More work at package manufacturing, now it likely works
+           and produces suitable Solaris PKG files.
+
+       * Makefile.in:
+           Copy current compilation time valid  config.status  and
+           ChangeLog files into $MAILSHARE  directory.  Those give
+           a very good idea of HOW the package was made.
+
+       * packaging/solaris/*:
+           Reworked a bit with Solaris pkgmk wizard..
+
+       * proto/cf/aliases.cf:
+           A nuisance (unlikely a security problem) with *-group
+           expansion.  One pair of double-quotes missing.
+
+       * scheduler/mq2.c:
+           mq2_discard() function did completely bogus chain traverse.
+           Oops..
+
2000-09-19  Matti Aarnio  <[email protected]>

       * Makefile.in:
@@ -227,7 +565,7 @@
           Picked lattest versions out from  GLIBC 2.1.92 source,
           and cleaned it up to be simple single-threaded thing
           without locks, and without IPv6 support.
-           STILL PROPABLY LEAKS MEMORY!
+           STILL PROBABLY LEAKS MEMORY!

2000-08-01  Matti Aarnio  <[email protected]>

@@ -2205,7 +2543,7 @@

       * proto/smtpserver.conf.in:
           Place 'ESMTP' at both lines of the 220 message (sigh,
-           PostFix MTA violates RFC 1869 part 4, and propably isn't
+           PostFix MTA violates RFC 1869 part 4, and probably isn't
           the only one...)

       * smtpserver/smtpserver.c, smtpserver/smtptls.c:
@@ -2661,7 +2999,7 @@
           - About all Makefile.in template files did need changes
             so that ZMailer's own include paths preceed ALL other
           - Changed all include instances of "malloc.h" to "zmalloc.h",
-             although that propably is unnecessary... (and renamed
+             although that probably is unnecessary... (and renamed
             the file, although CVS will show deletion and adding..)
           - Manage to autodetect OpenSSL shared objects, although does
             not do full blown shared-library runtime load path define,
@@ -3582,7 +3920,7 @@

       * transports/sm/sm.c, transports/smtp/smtp.c,
         utils/pop-proxy/pop-proxy.c, scheduler/scheduler.c:
-           Moving arount the  setvbuf()  calls a bit, propably mostly
+           Moving arount the  setvbuf()  calls a bit, probably mostly
           safe without this, but better be absolutely sure..

       * libc/md5c.c:
@@ -4517,7 +4855,7 @@

       * router/libdb/header.c:
           Alter the syntax of "Reply-To:" header match that of
-           RFC-822.  Oops since 2.2.1 (and propably before!)
+           RFC-822.  Oops since 2.2.1 (and probably before!)

       * router/libdb/bind.c:
           Just nice for debugging -- report DNS lookup error codes
@@ -7375,7 +7713,7 @@

       * hostenv/Linux:
           Added a warning about mmap() being broken in 1.2.x -kernels
-           (well, propably broken...)
+           (well, probably broken...)

       * hostenv/OSF1v3.2-Alpha:
           Added "STDC_HEADERS=" -- for ANSI-C-headers
@@ -9060,7 +9398,7 @@
         transports/sm/sm.c, transports/smtp/smtp.c,
         router/functions.c, compat/sendmail/Makefile.in
           Several changes by Byron Rakitzis to suit BSDI
-           (and propably most of the current BSD 4.4)
+           (and probably most of the current BSD 4.4)

           Added also new variable for the  Config:
               SENDMAILLIB=/usr/lib
@@ -9094,7 +9432,7 @@
           Added there "-1"

       * transports/mailbox/mailbox.c:
-           Created   propably_x400()  -function, and altered error
+           Created   probably_x400()  -function, and altered error
           reports on anonymous delivery to a file ("/...") to reflect
           possible X.400 addresses, when such is likely.
           ("/X=XXXX/Y=YYYY/...")
Index: INSTALL
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/INSTALL,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- INSTALL     2000/08/23 12:11:38     1.21
+++ INSTALL     2000/10/10 21:00:54     1.22
@@ -29,7 +29,7 @@

2.     If you are on an Ultrix system, replace the mkdep and mklibdep
       scripts in the bin directory with the versions provided in bin/Ultrix.
-       (although you propably will not do dependency generation)
+       (although you probably will not do dependency generation)

3.     This system uses several preferrably separate partitions for
       different things:
@@ -533,7 +533,7 @@

13.    At the start the scheduler reads  $MAILSHARE/scheduler.conf  file
       for the instructions about how to handle router produced files with
-       recipient addresses.   Propably the default boiler-plate file is
+       recipient addresses.   Probably the default boiler-plate file is
       sufficient for you, but have a look at it anyway.
       You will need to tinker with it for example when you want to
       use 'Cyrus' server for local message store.
Index: Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/Makefile.in,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- Makefile.in 2000/09/19 10:23:27     1.54
+++ Makefile.in 2000/09/20 17:53:39     1.55
@@ -85,6 +85,8 @@
       else                                            \
               cp $(ZCONF) $(prefix)$$ZCONFIG; chmod 644 $(prefix)$$ZCONFIG; \
       fi
+       @. $(ZCONF) ; cp $(srcdir)/ChangeLog $(prefix)$$MAILSHARE/ChangeLog ; chmod 644 $(prefix)$$MAILSHARE/ChangeLog
+       @. $(ZCONF) ; cp ./config.status $(prefix)$$MAILSHARE/config.status ; chmod 644 $(prefix)$$MAILSHARE/config.status
       cd proto ;      $(MAKE) $(MFLAGS) install-bin  PZCONFIG="../$(ZCONF)"
       cd compat ;     $(MAKE) $(MFLAGS) install
       cd router ;     $(MAKE) $(MFLAGS) install
@@ -109,6 +111,8 @@
install:       dirs # all
       @. $(ZCONF) ; zdir=`echo $$ZCONFIG|sed -e 's!\(.*\)/\([^/]*\)!\1/!'`; $(MKDIR) $(prefix)$$zdir
       @. $(ZCONF) ; cp $(ZCONF) $(prefix)$$ZCONFIG ; chmod 644 $(prefix)$$ZCONFIG
+       @. $(ZCONF) ; cp $(srcdir)/ChangeLog $(prefix)$$MAILSHARE/ChangeLog ; chmod 644 $(prefix)$$MAILSHARE/ChangeLog
+       @. $(ZCONF) ; cp ./config.status $(prefix)$$MAILSHARE/config.status ; chmod 644 $(prefix)$$MAILSHARE/config.status
       @cd proto ;      $(MAKE) $(MFLAGS) install  PZCONFIG="../$(ZCONF)"
       @cd compat ;     $(MAKE) $(MFLAGS) install
       @cd router ;     $(MAKE) $(MFLAGS) install
Index: Overview
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/Overview,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Overview    1998/02/10 21:01:44     1.1.1.1
+++ Overview    2000/10/10 21:00:54     1.2
@@ -35,7 +35,7 @@
    when available.)
  + Fast binary-transparent SMTP server and client.
    [ It is still binary transparent, but MIME support has slowed
-      it slightly.  Most propably it will still be able to flood
+      it slightly.  Most probably it will still be able to flood
      your Ethernet with a 10 MB SMTP transfer, so beware ;-) ]


@@ -239,6 +239,7 @@
                       <[email protected]>
  or preferrably use <[email protected]> and send there a request:
               subscribe zmailer Your Name
+  (With naturally substituting "Your Name" with your own name.)


- How do I install this?
Index: README.TCP-WRAPPER
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/README.TCP-WRAPPER,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README.TCP-WRAPPER  1999/08/17 07:47:49     1.1
+++ README.TCP-WRAPPER  2000/10/10 21:00:54     1.2
@@ -32,7 +32,7 @@

Make sure these entries are before any wild-card "reject all" entries.

-In the long run I will propably remove the wrapper test at SMTPSERVER,
+In the long run I will probably remove the wrapper test at SMTPSERVER,
because that program has other more powerfull machinery in place for
access control.

Index: README.UPGRADING
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/README.UPGRADING,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- README.UPGRADING    2000/08/01 16:02:34     1.22
+++ README.UPGRADING    2000/10/10 21:00:54     1.23
@@ -15,7 +15,7 @@
       ZMailer-2.99.53+ (just after release cut)
               Changes at BSD/SleepyCat DB interface codes may again have
               altered default DB binary formats so that regeneration of
-               the binary databases is propably in order.
+               the binary databases is probably in order.
               (This is due to possible movement from DB 1.x to 2.x and
                possibly even to 3.x with different binary db formats.)

Index: TODO
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/TODO,v
retrieving revision 1.151
retrieving revision 1.157
diff -u -r1.151 -r1.157
--- TODO        2000/09/18 23:18:43     1.151
+++ TODO        2000/10/20 17:07:28     1.157
@@ -1,5 +1,16 @@
Known/suspected bugs/Missing Features on current ZMailer sources

+Wanted done for 3.0:
+  - router  aliases.cf  to have similar 'protocols' feature as
+    domain routing has currently
+  - WEB-based configuration/administration interface
+  - scheduler to kill message/thread online without a need to
+    run  "manual-expirer"
+  - A work-over of the documentation
+
+
+- Everywhere:  Spell-check  (propably -> probably, among others)
+
- "Overview" -- revise at least the list subscription instructions;
               verify also other document files

@@ -11,7 +22,7 @@
- BUG(security sensitivity):
  - "zmailer newdb" script will run "newdb" database compilations
    without becoming same uid+gid as the source file is (and with
-    matching umask) -- perhaps the current SH script must be turned
+    matching umask) -- perhaps the current PERL script must be turned
    into e.g. C program ?
- FEATURE:
  - Also, how about enabling non-privileged users to execute "zmailer newdb"
@@ -52,6 +63,7 @@
               getpwnam() from somewhere WITHOUT checking at the
               possible errno telling that there is e.g. temporary
               access error with backend database...
+          Fixed(?) on 21-Sep-2000 with HOLD/DEFER code.

       Error address pickup  ( router/rfc822.c: erraddress() )
       picks *bad* choices sometimes; e.g. it might consider
@@ -67,6 +79,11 @@


transports/smtp:
+
+   VERIFY:
+       That failed connection to site A won't lead to recipient
+       diagnostic() calls before all possible MXes/addresses have been
+       gone thru for connection attempts.

   BUGLET:
       Right now we make eminently sensible commentary diagnostics carrying
Index: configure
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/configure,v
retrieving revision 1.96
retrieving revision 1.98
diff -u -r1.96 -r1.98
--- configure   2000/09/05 18:36:21     1.96
+++ configure   2000/10/31 17:49:48     1.98
@@ -10054,14 +10054,13 @@
       proto/newdb                     proto/newdbprocessor            \
       proto/scheduler.conf            proto/scheduler.auth            \
       proto/mailrm.sh                 proto/db/Makefile               \
-       proto/smtpserver.conf           proto/cf/TELE-FI.cf             \
+       proto/cf/TELE-FI.cf             proto/smtpserver.conf           \
       proto/cf/SMTP+UUCP.cf           proto/cf/UTdefault.cf           \
       proto/cf/SMTP.cf                proto/smtp-tls.conf             \
       proto/db/aliases                proto/sm.conf                   \
       bin/mkdep                       bin/mklibdep                    \
       proto/post-install.sh           utils/mxverify/Makefile         \
-       packaging/Makefile              \
-       packaging/solaris/Makefile      \
+       packaging/Makefile              packaging/solaris/Makefile      \
       SiteConfig       config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -10245,14 +10244,13 @@
       proto/newdb                     proto/newdbprocessor            \
       proto/scheduler.conf            proto/scheduler.auth            \
       proto/mailrm.sh                 proto/db/Makefile               \
-       proto/smtpserver.conf           proto/cf/TELE-FI.cf             \
+       proto/cf/TELE-FI.cf             proto/smtpserver.conf           \
       proto/cf/SMTP+UUCP.cf           proto/cf/UTdefault.cf           \
       proto/cf/SMTP.cf                proto/smtp-tls.conf             \
       proto/db/aliases                proto/sm.conf                   \
       bin/mkdep                       bin/mklibdep                    \
       proto/post-install.sh           utils/mxverify/Makefile         \
-       packaging/Makefile              \
-       packaging/solaris/Makefile      \
+       packaging/Makefile              packaging/solaris/Makefile      \
       SiteConfig      "}
EOF
cat >> $CONFIG_STATUS <<\EOF
Index: configure.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/configure.in,v
retrieving revision 1.95
retrieving revision 1.97
diff -u -r1.95 -r1.97
--- configure.in        2000/09/05 18:36:21     1.95
+++ configure.in        2000/10/31 17:49:48     1.97
@@ -1919,14 +1919,13 @@
       proto/newdb                     proto/newdbprocessor            \
       proto/scheduler.conf            proto/scheduler.auth            \
       proto/mailrm.sh                 proto/db/Makefile               \
-       proto/smtpserver.conf           proto/cf/TELE-FI.cf             \
+       proto/cf/TELE-FI.cf             proto/smtpserver.conf           \
       proto/cf/SMTP+UUCP.cf           proto/cf/UTdefault.cf           \
       proto/cf/SMTP.cf                proto/smtp-tls.conf             \
       proto/db/aliases                proto/sm.conf                   \
       bin/mkdep                       bin/mklibdep                    \
       proto/post-install.sh           utils/mxverify/Makefile         \
-       packaging/Makefile              \
-       packaging/solaris/Makefile      \
+       packaging/Makefile              packaging/solaris/Makefile      \
       SiteConfig      ,
[chmod 755 bin/*
 echo > stamp-h])dnl
Index: compat/sendmail/sendmail.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/compat/sendmail/sendmail.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- compat/sendmail/sendmail.c  2000/08/30 11:57:49     1.12
+++ compat/sendmail/sendmail.c  2000/10/10 21:00:57     1.13
@@ -604,7 +604,7 @@
               fprintf(mfp,"env-end\n");

               if (fflush(mfp) == EOF
-/* #ifdef NFSFSYNC */  /* This is propably ALWAYS a good idea.. */
+/* #ifdef NFSFSYNC */  /* This is probably ALWAYS a good idea.. */
                   || fsync(fileno(mfp)) < 0
/* #endif */   /* NFSFSYNC */
                   || ferror(mfp)) {
Index: doc/guides/configure
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/doc/guides/configure,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- doc/guides/configure        2000/08/21 07:32:28     1.4
+++ doc/guides/configure        2000/10/10 21:00:57     1.5
@@ -152,7 +152,7 @@
               your system performance by about 20% -- with dangers..
               On the other hand, recently a system disk(?) fault which
               hang mailer at spool directory access did cause severe
-               damage all over, and propably use of this option would
+               damage all over, and probably use of this option would
               not have made any difference..  fsck was mighty unhappy..)

       --with-bundled-libresolv
Index: doc/guides/smtp-etrn
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/doc/guides/smtp-etrn,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- doc/guides/smtp-etrn        1999/09/30 19:53:44     1.4
+++ doc/guides/smtp-etrn        2000/10/10 21:00:57     1.5
@@ -95,7 +95,7 @@
       .client.dom     error!database
       .               smtp-etrn!mail.isp.dom

-Also at the client's  router.cf  you propably want the protocols
+Also at the client's  router.cf  you probably want the protocols
setting to be purely:
       protocols='routes'
specifically *no* 'smtp' in there!
@@ -114,7 +114,7 @@
       ETRN mail.isp.dom

Furthermore, in case your client is a dial-on-demand system, you
-propably want to disable dynamic DNS lookups that the client side
+probably want to disable dynamic DNS lookups that the client side
does, and only use static "/etc/hosts" file,
so that when the system starts and it does a bunch of DNS lookups
to figure out some parameters about itself, all those can be
Index: doc/guides/smtp-policy
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/doc/guides/smtp-policy,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- doc/guides/smtp-policy      2000/03/23 15:05:46     1.9
+++ doc/guides/smtp-policy      2000/10/20 14:25:52     1.10
@@ -7,11 +7,13 @@
       things before policy filter is ready for use:

               DB/smtp-policy.src              The boilerplate
-               DB/localnames              ('= _local_names')
-               DB/smtp-policy.relay       ('= _full_rights')
-               DB/smtp-policy.mx          ('= _relaytarget')
-               DB/smtp-policy.spam        ('= _bulk_mail')
-               DB/smtp-policy.spam.manual ('= _bulk_mail')
+               DB/localnames               ('= _local_names')
+               DB/smtp-policy.relay.manual ('= _full_rights')
+               DB/smtp-policy.relay        ('= _full_rights')
+               DB/smtp-policy.mx.manual    ('= _relaytarget')
+               DB/smtp-policy.mx           ('= _relaytarget')
+               DB/smtp-policy.spam.manual  ('= _bulk_mail')
+               DB/smtp-policy.spam         ('= _bulk_mail')

       IF YOU WANT, YOU CAN MODIFY YOUR BOILER PLATE AS WELL AS YOUR
       INSTALLED POLICY-BUILDER.SH SCRIPT.  (Doing 'make install' will
@@ -19,12 +21,18 @@


       Basically these various source files (when existing) are used to
-       combine knowledge of valid users around us:
+       combine knowledge of valid users around us.  Some datasets have
+       TWO input source files,  smtp-policy.NN  and  smtp-policy.NN.manual,
+       the ".manual" is intended to be overrider of of possibly auto-
+       generated data at the "plain" version of files:

+
+
       - localnames    Who we are -- ok for receiving; does not
                       grant outgoing relay capability.


+       - smtp-policy.relay.manual
       - smtp-policy.relay
                       Who can use us as outbound relay.

@@ -52,8 +60,11 @@

                       We can set the "always_accept" flag at the
                       source IP test, and never after.
+
+       - smtp-policy.mx.manual
+       - smtp-policy.mx
+                       Who really are our MX clients.

-       - smtp-policy.mx        Who really are our MX clients.
                       Use this when you really know them, and don't
                       want just to trust that if recipient has MX
                       to you, it would be ok...
@@ -72,9 +83,11 @@
                       these are magic addresses that email is accepted
                       to, even when everything else is blocked.

-       - smtp-policy.spam      Those users & domains that are
-                       absolutely no-no for senders, or recipients
-                       no matter what earlier analysis has shown.
+       - smtp-policy.spam.manual
+       - smtp-policy.spam
+                       Those users & domains that are  absolutely no-no
+                       for the senders, or the recipients, no matter what
+                       earlier analysis has shown.
                       (Except for those that we absolutely trust..)


@@ -141,7 +154,7 @@

       Method is as follows:

-       Pick your choice of databases to the second variant ``_RBL0'' label
+       Pick your choice of databases to the second variant ``_rbl0'' label
       by joining your selection from various things exemplified here below
       by using ``:'' character as glue in between:

@@ -159,8 +172,8 @@
       An example for the resulting attribute pair: (RBL+DUL+RSS)

         #| Second RBL variant: Early block with RBL+DUL+RSS
-         _RBL0   test-dns-rbl  +:dul.maps.vix.com:relays.mail-abuse.org
-         _RBL1   # Nothing
+         _rbl0   test-dns-rbl  +:dul.maps.vix.com:relays.mail-abuse.org
+         _rbl1   # Nothing

2.2 Delayed rejection by RBL

@@ -168,8 +181,8 @@
       ``Third RBL variant'':

         #| Third RBL variant: Late block with RBL+DUL+RSS
-         _RBL0   rcpt-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
-         _RBL1   test-rcpt-dns-rbl +
+         _rbl0   rcpt-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
+         _rbl1   test-rcpt-dns-rbl +

       The sample boilerplace will use these as defaults unless you choose
       to explicitely have ``test-rcpt-dns-rbl -'' at some of the recipient
@@ -412,8 +425,8 @@
#|    address for existence of the DNS MX and/or A/AAAA data -- e.g. validity.
#|    If RBL parameters are set below, will use them.
#
-# .                    relaycustomer - relaytarget - senderokwithdns + = _RBL1
-# [0.0.0.0]/0          relaycustomer - relaytarget - senderokwithdns + = _RBL0
+# .                    relaycustomer - relaytarget - senderokwithdns + = _rbl1
+# [0.0.0.0]/0          relaycustomer - relaytarget - senderokwithdns + = _rbl0
#
#| -- 3rd alternate: MX relay trust, DNS existence verify
#|    For the people who are in deep s*...  That is, those who for some
@@ -424,8 +437,8 @@
#|    service abuse.
#|    If RBL parameters are set below, will use them.

-.                      relaycustomer - acceptifmx - senderokwithdns + = _RBL1
-[0.0.0.0]/0            relaycustomer - acceptifmx - senderokwithdns + = _RBL0
+.                      relaycustomer - acceptifmx - senderokwithdns + = _rbl1
+[0.0.0.0]/0            relaycustomer - acceptifmx - senderokwithdns + = _rbl0

#| -- 4th alternate: Sender & recipient DNS existence verify
#|    This is more of an example for the symmetry's sake, verifies that
@@ -441,16 +454,16 @@
#| RBL type test rules:

#| First RBL variant: NONE OF THE RBL TESTS
-_RBL0           # Nothing at early phase
-_RBL1           # Nothing at late phase
+_rbl0           # Nothing at early phase
+_rbl1           # Nothing at late phase

#| Second RBL variant: Early block with RBL+DUL+RSS
-#_RBL0          test-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
-#_RBL1          # Nothing at late phase
+#_rbl0          test-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
+#_rbl1          # Nothing at late phase

#| Third RBL variant: Late block with RBL+DUL+RSS
-#_RBL0          rcpt-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
-#_RBL1          test-rcpt-dns-rbl +
+#_rbl0          rcpt-dns-rbl      +:dul.maps.vix.com:relays.mail-abuse.org
+#_rbl1          test-rcpt-dns-rbl +

#|  (The "+" at the DNS zone defines is treated as shorthand to
#|   "rbl.maps.vix.com")
@@ -501,9 +514,9 @@
#|    Boilerplate macroes for various things.
#|    If RBL parameters are set above, will use them.

-_full_rights   rejectnet - relaycustnet + relaytarget +               = _RBL1
-_localnames    rejectnet - relaycustnet - localdomain + relaytarget + = _RBL1
-_relaytarget   relaytarget +                                          = _RBL1
+_full_rights   rejectnet - relaycustnet + relaytarget +               = _rbl1
+_localnames    rejectnet - relaycustnet - localdomain + relaytarget + = _rbl1
+_relaytarget   relaytarget +                                          = _rbl1

#
#sztaki.hu             = _full_rights
Index: doc/manual/SGML/admin.sgml
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/doc/manual/SGML/admin.sgml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- doc/manual/SGML/admin.sgml  1998/03/23 12:36:07     1.1
+++ doc/manual/SGML/admin.sgml  2000/10/10 21:00:57     1.2
@@ -388,7 +388,7 @@

<tscreen><verb>
#PARAM maxsize              10000000   # Same as -M -option
-#PARAM max-error-recipients        3   # More than this is propably SPAM!
+#PARAM max-error-recipients        3   # More than this is probably SPAM!
#PARAM MaxSameIpSource           10    # Max simultaneous connections from
#                                      # any IP source address
#PARAM ListenQueueSize            5    # The  listen(2)  parameter
Index: doc/manual/SGML/app_scripts.sgml
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/doc/manual/SGML/app_scripts.sgml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- doc/manual/SGML/app_scripts.sgml    1998/03/23 12:36:08     1.1
+++ doc/manual/SGML/app_scripts.sgml    2000/10/10 21:00:57     1.2
@@ -657,7 +657,7 @@
                       domain="@\2"
                       plustail=""
               fi ;;
-       <@>.(.+)        # This plustail is propably wrong...
+       <@>.(.+)        # This plustail is probably wrong...
               return $(rrouter "\1$plustail" "$origaddr" $A "" "$domain") ;;  # try after route strip
       (.+)<@>
               if [ -z "$domain" ]; then
Index: include/libz.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/include/libz.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- include/libz.h      2000/08/02 18:22:59     1.17
+++ include/libz.h      2000/10/16 11:32:39     1.18
@@ -35,7 +35,7 @@

/* cfgets.c */
#ifdef _SFIO_H
-extern int cfgets __((char *, int, Sfio_t *));
+extern int csfgets __((char *, int, Sfio_t *));
#endif

/* cleanenv.c */
Index: include/zmsignal.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/include/zmsignal.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- include/zmsignal.h  1998/08/02 22:01:58     1.3
+++ include/zmsignal.h  2000/10/10 21:00:57     1.4
@@ -10,7 +10,7 @@
#include <signal.h>

#ifndef RETSIGTYPE
-#define RETSIGTYPE void        /* Propably not globally portable.. */
+#define RETSIGTYPE void        /* Probably not globally portable.. */
#endif

#if defined(SV_INTERRUPT) && !defined(HAVE_SIGPROCMASK)        /* BSDism */
Index: lib/cfgets.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/lib/cfgets.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lib/cfgets.c        1999/12/04 01:17:28     1.2
+++ lib/cfgets.c        2000/10/16 11:32:39     1.3
@@ -19,7 +19,7 @@
#include "libz.h"


-int cfgets(s, n, stream)
+int csfgets(s, n, stream)
       char *s;
       int n;
       Sfio_t *stream;
Index: lib/hashtest.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/lib/hashtest.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lib/hashtest.c      1999/09/09 16:29:18     1.1
+++ lib/hashtest.c      2000/10/10 21:00:58     1.2
@@ -23,7 +23,7 @@
 *     -XX:  0.592 sec user space
 *     -DD:  0.443 sec user space
 *
- *  from which we can propably safely say that  crc32() and pjwhash32()
+ *  from which we can probably safely say that  crc32() and pjwhash32()
 *  are absolutely equal in execution time, and likely present only
 *  0.150 seconds of the test runtime.  ( Or 790 nanoseconds per user
 *  name -- yeah, Alpha rules ;) Guestimate says each hash took some
Index: lib/selfaddrs.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/lib/selfaddrs.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- lib/selfaddrs.c     2000/09/04 16:23:05     1.29
+++ lib/selfaddrs.c     2000/11/12 17:04:19     1.30
@@ -258,7 +258,8 @@

#ifdef SIOCGLIFFLAGS

-           memset(&lifrf, 0, sizeof(struct lifreq));
+           /* memset(&lifrf, 0, sizeof(struct lifreq)); */
+           lifrf.lifr_ifindex = 0;
           strncpy(lifrf.lifr_name, lifr->lifr_name, sizeof(lifrf.lifr_name));

           if (ioctl(s, SIOCGLIFFLAGS, (char *) &lifrf) < 0)
@@ -400,7 +401,8 @@

#ifdef SIOCGIFFLAGS

-           memset(&ifrf, 0, sizeof(struct ifreq));
+           /* memset(&ifrf, 0, sizeof(struct ifreq)); */
+           ifrf.ifr_ifindex = 0;
           strncpy(ifrf.ifr_name, ifr->ifr_name, sizeof(ifrf.ifr_name));

           if (ioctl(s, SIOCGIFFLAGS, (char *) &ifrf) < 0)
Index: lib/zgetifaddress.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/lib/zgetifaddress.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- lib/zgetifaddress.c 2000/07/14 11:46:09     1.2
+++ lib/zgetifaddress.c 2000/11/12 17:04:19     1.3
@@ -11,7 +11,7 @@
    smtp connection open!

    Original copyright SunSoft/Berkeley/Almann, modifications
-    by Matti Aarnio <[email protected]> 1997
+    by Matti Aarnio <[email protected]> 1997,2000
*/

#include "hostenv.h"
Index: libc/Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/libc/Makefile.in,v
retrieving revision 1.15
retrieving revision 1.17
diff -u -r1.15 -r1.17
--- libc/Makefile.in    2000/09/04 11:22:18     1.15
+++ libc/Makefile.in    2000/10/12 14:54:58     1.17
@@ -15,11 +15,11 @@
DEFS=          @DEFS@
RANLIB=                @RANLIB@
AR=            @AR@
-prefix=         @prefix@
+prefix=
#exec_prefix=   @exec_prefix@
LIBC_INCL=     @GENINCL@ @INCLRESOLV@
-INCLUDEDIR=    ${prefix}@includedir@
-LIBRARYDIR=    ${prefix}@libdir@
+INCLUDEDIR=    ${prefix}/usr/include
+LIBRARYDIR=    ${prefix}/usr/lib
INSTALL=       @INSTALL@
MKDIR=         @MKDIR@
#
@@ -76,10 +76,10 @@

install:  $(TOPDIR)/libs/libzmailer.a
       -if [ ! -d $(LIBRARYDIR) ] ; then       \
-               $(MKDIR) $(LIBRARYDIR); \
+               $(MKDIR) -p $(LIBRARYDIR);      \
        fi
       -if [ ! -d $(INCLUDEDIR) ] ; then       \
-               $(MKDIR) $(INCLUDEDIR); \
+               $(MKDIR) -p $(INCLUDEDIR);      \
        fi
       -$(INSTALL) -m 644 $(TOPDIR)/libs/libzmailer.a $(LIBRARYDIR)/libzmailer.a
       -$(RANLIB) $(LIBRARYDIR)/libzmailer.a
Index: libc/getaddrinfo.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/libc/getaddrinfo.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- libc/getaddrinfo.c  2000/09/19 11:32:56     1.20
+++ libc/getaddrinfo.c  2000/10/31 17:49:50     1.21
@@ -179,6 +179,8 @@
       { 0, PF_UNSPEC, 0, 0, 0, NULL, NULL, NULL };


+#if 0 /* NO SUPPORT FOR "LOCAL" ADDRESS SPACE ENTITIES! */
+
static int gaih_local __((const char *name, const struct gaih_service *service,
                         const struct addrinfo *req, struct addrinfo **pai,
                         FILE *vlog));
@@ -281,6 +283,7 @@
      (*pai)->ai_canonname = NULL;
    return 0;
}
+#endif /* GAIH_LOCAL() KILLED... */


static int
@@ -808,7 +811,7 @@
  { PF_INET6, gaih_inet, "INET6" },
#endif
  { PF_INET,  gaih_inet, "INET"  },
-  { PF_LOCAL, gaih_local, "LOCAL" },
+  /*  { PF_LOCAL, gaih_local, "LOCAL" }, */
  { PF_UNSPEC, NULL }
};

Index: libresolv/sys/bitypes.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/libresolv/sys/bitypes.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- libresolv/sys/bitypes.h     1999/12/03 11:30:49     1.2
+++ libresolv/sys/bitypes.h     2000/09/25 11:30:32     1.3
@@ -1,5 +1,5 @@
/*
- * $Id: bitypes.h,v 1.2 1999/12/03 11:30:49 mea Exp $
+ * $Id: bitypes.h,v 1.3 2000/09/25 11:30:32 mea Exp $
 */

/*
@@ -59,7 +59,8 @@

#ifndef __BIT_TYPES_DEFINED__
# if (defined(BSD) && (BSD >= 199306)) || \
-     (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199312))
+     (defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199312)) \
+       || defined(_AIX) /* AIX 4.1.* very least ? */
#  define __BIT_TYPES_DEFINED__
# endif
#endif
Index: man/scheduler.8
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/scheduler.8,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- man/scheduler.8     2000/07/30 15:30:12     1.18
+++ man/scheduler.8     2000/10/12 20:00:48     1.19
@@ -1,6 +1,6 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/scheduler.8,v 1.18 2000/07/30 15:30:12 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/scheduler.8,v 1.19 2000/10/12 20:00:48 mea Exp $
.ds ]W ZMailer 2.99
-.TH SCHEDULER 8 "30 Jul 2000"
+.TH SCHEDULER 8 "12 Oct 2000"
.SH NAME
scheduler \- zmailer transport queue scheduler daemon
.SH SYNOPSIS
@@ -1073,7 +1073,10 @@
#   - Enabled attributes (tokens, space separated)
#   - IP ACLs
#
-# Default-account for 'mailq' is 'nobody' with password 'nobody'.
+# Same userid CAN appear multiple times, parsing will pick the first
+# instance of it which has matching IP address set
+#
+# The default-account for 'mailq' is 'nobody' with password 'nobody'.
# Third field is at the moment a WORK IN PROGRESS!
#
# SECURITY NOTE:
@@ -1087,10 +1090,14 @@
#      TT      "SHOW QUEUE THREADS", "SHOW THREAD channel host"
#      ETRN    "ETRN etrn_string"
#      KILL    "KILL THREAD channel host", "KILL MSG spoolid"
+#
+# -- "nobody" via loopback gets different treatment from
+#    "nobody" from anywhere else.
#
-nobody:nobody:SNMP ETRN:[0.0.0.0]/0
-#watcher:zzzzz:SNMP QQ TT ETRN:[127.0.0.1]/32
-#root:zzzzzzz:ALL:[127.0.0.1]/32
+nobody:nobody:SNMP QQ TT ETRN:  [127.0.0.0]/8 [ipv6.0::1]/128
+nobody:nobody:SNMP ETRN:        [0.0.0.0]/0   [ipv6.0::0]/0
+#watcher:zzzzz:SNMP QQ TT ETRN: [127.0.0.0]/8 [192.168.0.1]/32
+#root:zzzzzzz:ALL:              [127.0.0.0]/8 [192.168.0.2]/32
.fi
.sp
.PP
Index: man/scheduler.8.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/scheduler.8.ps,v
retrieving revision 1.26
retrieving revision 1.28
diff -u -r1.26 -r1.28
--- man/scheduler.8.ps  2000/09/04 12:54:22     1.26
+++ man/scheduler.8.ps  2000/10/16 11:32:39     1.28
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:35 2000
+%%CreationDate: Fri Oct 13 17:53:37 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -310,8 +310,8 @@
.15 G(ashing",)-3.174 E(tw)144 729.6 Q 4.476(o`)-.1 G(HH')-4.476 E 4.476
(sm)-.55 G 1.976(ean "dual le)-4.476 F -.15(ve)-.25 G 4.476(lh).15 G
4.476(ashing". `)-4.476 F(`Hash')-.74 E 4.476('i)-.74 G 4.476(sd)-4.476
-G 1.977(irectory which name is single upper case)-4.476 F(30 Jul 2000)
-282.665 768 Q(1)205.665 E EP
+G 1.977(irectory which name is single upper case)-4.476 F(12 Oct 2000)
+281.28 768 Q(1)204.28 E EP
%%Page: 2 2
%%BeginPageSetup
BP
@@ -392,7 +392,7 @@
(piry=3h).15 E 2.5(#w)180 700.8 S
(ant 20 channel slots in case of blockage on one)-2.6 E(maxchannel=20)
180 712.8 Q 2.5(#w)180 724.8 S(ant 20 thread-ring slots)-2.6 E
-(30 Jul 2000)282.665 768 Q(2)205.665 E EP
+(12 Oct 2000)281.28 768 Q(2)204.28 E EP
%%Page: 3 3
%%BeginPageSetup
BP
@@ -484,7 +484,7 @@
(tinue to)144 693.6 Q -.1(wa)-.25 G(rds the end.).1 E(This allo)5 E
(ws v)-.25 E(arious retry strate)-.25 E(gies to be speci\214ed easily:)
-.15 E(brute force \(or "jackhammer"\):)144 710.4 Q(retries=0)180 722.4
-Q(30 Jul 2000)282.665 768 Q(3)205.665 E EP
+Q(12 Oct 2000)281.28 768 Q(3)204.28 E EP
%%Page: 4 4
%%BeginPageSetup
BP
@@ -551,8 +551,8 @@
llel transport agents within each thread; that is, using higher v)144
708 R(alue)-.25 E(than def)144 720 Q(ault `)-.1 E(`1')-.74 E 2.5('w)-.74
G(ill allo)-2.5 E 2.5(wr)-.25 G(unning more than one T)-2.5 E 2.5(Af)
--.93 G(or the jobs at the thread.)-2.5 E(30 Jul 2000)282.665 768 Q(4)
-205.665 E EP
+-.93 G(or the jobs at the thread.)-2.5 E(12 Oct 2000)281.28 768 Q(4)
+204.28 E EP
%%Page: 5 5
%%BeginPageSetup
BP
@@ -616,7 +616,7 @@
(oilerplate parameters for local deli)-2.5 E -.15(ve)-.25 G
(ry and service channels).15 E(local/*)144 698.4 Q(interv)180 710.4 Q
(al=10s e)-.25 E(xpiry=3h maxchannel=2 command=mailbox)-.15 E(error)144
-722.4 Q(30 Jul 2000)282.665 768 Q(5)205.665 E EP
+722.4 Q(12 Oct 2000)281.28 768 Q(5)204.28 E EP
%%Page: 6 6
%%BeginPageSetup
BP
@@ -684,8 +684,8 @@
1.897(transport agents.)108 724.8 R 1.897
(It is a terse presentation of the)6.897 F F3 -.45(ro)4.397 G(uter).45 E
F0 2.997 -.55('s d).73 H 1.898
-(ecisions, along with some useful reference).55 F(30 Jul 2000)282.665
-768 Q(6)205.665 E EP
+(ecisions, along with some useful reference).55 F(12 Oct 2000)281.28 768
+Q(6)204.28 E EP
%%Page: 7 7
%%BeginPageSetup
BP
@@ -746,7 +746,7 @@
y a message id\) of an obsoleted message.)144 696 R .348
(The scheduler will)5.348 F(pur)144 708 Q(ge an)-.18 E 2.5(ys)-.15 G
(uch identi\214ed message after running sanity checks.)-2.5 E
-(30 Jul 2000)282.665 768 Q(7)205.665 E EP
+(12 Oct 2000)281.28 768 Q(7)204.28 E EP
%%Page: 8 8
%%BeginPageSetup
BP
@@ -807,7 +807,7 @@
re appended to the message)108 715.2 R(control \214le.)108 727.2 Q
(This is done by the)5 E F2(sc)2.5 E(heduler)-.15 E F0(as it recei)2.5 E
-.15(ve)-.25 G 2.5(se).15 G(rror reports from transport agents.)-2.5 E
-(30 Jul 2000)282.665 768 Q(8)205.665 E EP
+(12 Oct 2000)281.28 768 Q(8)204.28 E EP
%%Page: 9 9
%%BeginPageSetup
BP
@@ -867,7 +867,7 @@
(ork\)).05 E -.5(T:)144 688.8 S F3(#hungry)3 E F0(S:)144 700.8 Q F1
(#idle)2.5 E F0 -.5(T:)144 712.8 S F3(#hungry)3 E F0(\(the scheduler mo)
144 724.8 Q -.15(ve)-.15 G 2.5(dt).15 G(he T)-2.5 E 2.5(Ai)-.93 G
-(nto IDLE pool\))-2.5 E(30 Jul 2000)282.665 768 Q(9)205.665 E EP
+(nto IDLE pool\))-2.5 E(12 Oct 2000)281.28 768 Q(9)204.28 E EP
%%Page: 10 10
%%BeginPageSetup
BP
@@ -920,7 +920,7 @@
(xt \(one line, no e.g. CRs enbedded\).)-.15 E(WTT)108 705.6 Q(-Host)
-.92 E -.15(Fo)144 717.6 S 2.5(rS).15 G
(MTP systems to produce "Remote-MT)-2.5 E(A:" header contents.)-.93 E
-(30 Jul 2000)282.665 768 Q(10)200.665 E EP
+(12 Oct 2000)281.28 768 Q(10)199.28 E EP
%%Page: 11 11
%%BeginPageSetup
BP
@@ -982,8 +982,8 @@
(>\)*)A F2(\\t)A F0(>[)A F2(#)A F0(<)A F3(te)A(xt)-.2 E F0(>])A F2(\\n)A
F0(\)*)A(\()144 705.6 Q F2(Channels:\\n)A F0(\(<)144 717.6 Q F3(wor)A(d)
-.37 E F0(>)A F2(:\\t)A F0(>\()A F2(>)A F0(<)A F3 -.1(ke)C(y)-.2 E F0
-(>\)+)A F2(\\n)A F0(\)+)A F2(Hosts:\\n)144 729.6 Q F0(30 Jul 2000)
-282.665 768 Q(11)200.665 E EP
+(>\)+)A F2(\\n)A F0(\)+)A F2(Hosts:\\n)144 729.6 Q F0(12 Oct 2000)281.28
+768 Q(11)199.28 E EP
%%Page: 12 12
%%BeginPageSetup
BP
@@ -1038,7 +1038,7 @@
(wline)-.25 E 1.157(character\), and the user')144 696 R 3.657(sp)-.55 G
(assw)-3.657 E 3.658(ord. This)-.1 F 1.158
(algorithm is essentially the same what APOP scheme)3.658 F(uses.)144
-708 Q(30 Jul 2000)282.665 768 Q(12)200.665 E EP
+708 Q(12 Oct 2000)281.28 768 Q(12)199.28 E EP
%%Page: 13 13
%%BeginPageSetup
BP
@@ -1087,7 +1087,7 @@
(uthentication control \214le for the ZMailer scheduler)-2.5 E(.)-.55 E
(#)108 705.6 Q 2.5(#F)108 717.6 S
(ields are double-colon \(':'\) separated, and are:)-2.5 E 7.5(#-)108
-729.6 S(Username)-5 E(30 Jul 2000)282.665 768 Q(13)200.665 E EP
+729.6 S(Username)-5 E(12 Oct 2000)281.28 768 Q(13)199.28 E EP
%%Page: 14 14
%%BeginPageSetup
BP
@@ -1096,96 +1096,104 @@
(#-)108 84 S(PLAINTEXT P)-5 E(ASSW)-.92 E(ORD \(which must not ha)-.1 E
.3 -.15(ve d)-.2 H(ouble-colon in it!\)).15 E 7.5(#-)108 96 S
(Enabled attrib)-5 E(utes \(tok)-.2 E(ens, space separated\))-.1 E 7.5
-(#-)108 108 S(IP A)-5 E(CLs)-.4 E(#)108 120 Q 2.5(#D)108 132 S(ef)-2.5 E
+(#-)108 108 S(IP A)-5 E(CLs)-.4 E(#)108 120 Q 2.5(#S)108 132 S
+(ame userid CAN appear multiple times, parsing will pick the \214rst)
+-2.5 E 2.5(#i)108 144 S(nstance of it which has matching IP address set)
+-2.5 E(#)108 156 Q 2.5(#T)108 168 S(he def)-2.5 E
(ault-account for 'mailq' is 'nobody' with passw)-.1 E(ord 'nobody'.)-.1
-E 2.5(#T)108 144 S(hird \214eld is at the moment a W)-2.5 E(ORK IN PR)
--.1 E(OGRESS!)-.4 E(#)108 156 Q 2.5(#S)108 168 S(ECURITY NO)-2.5 E(TE:)
--.4 E 7.5(#O)108 180 S 17.91(WNER: root)-7.85 F 7.5(#P)108 192 S -.4
-(ROT)-7.5 G(ECTION: 0600).4 E(#)108 204 Q 2.5(#A)108 216 S(ttrib)-2.5 E
-(ute tok)-.2 E(ens:)-.1 E 31(#A)108 228 S 14.06(LL well,)-31 F 2.5(aw)
+E 2.5(#T)108 180 S(hird \214eld is at the moment a W)-2.5 E(ORK IN PR)
+-.1 E(OGRESS!)-.4 E(#)108 192 Q 2.5(#S)108 204 S(ECURITY NO)-2.5 E(TE:)
+-.4 E 7.5(#O)108 216 S 17.91(WNER: root)-7.85 F 7.5(#P)108 228 S -.4
+(ROT)-7.5 G(ECTION: 0600).4 E(#)108 240 Q 2.5(#A)108 252 S(ttrib)-2.5 E
+(ute tok)-.2 E(ens:)-.1 E 31(#A)108 264 S 14.06(LL well,)-31 F 2.5(aw)
2.5 G(ild-card enabling e)-2.5 E -.15(ve)-.25 G(rything).15 E 31(#S)108
-240 S 6.27(NMP "SHO)-31 F 2.5(WS)-.35 G(NMP")-2.5 E 31(#Q)108 252 S
+276 S 6.27(NMP "SHO)-31 F 2.5(WS)-.35 G(NMP")-2.5 E 31(#Q)108 288 S
21.56(Q")-31 G(SHO)-21.56 E 2.5(WQ)-.35 G(UEUE SHOR)-2.6 E(T")-.6 E 31
-(#T)108 264 S 23.78(T")-31 G(SHO)-23.78 E 2.5(WQ)-.35 G
+(#T)108 300 S 23.78(T")-31 G(SHO)-23.78 E 2.5(WQ)-.35 G
(UEUE THREADS", "SHO)-2.6 E 2.5(WT)-.35 G(HREAD channel host")-2.5 E 31
-(#E)108 276 S 7.39(TRN "ETRN)-31 F(etrn_string")2.5 E 31(#K)108 288 S
+(#E)108 312 S 7.39(TRN "ETRN)-31 F(etrn_string")2.5 E 31(#K)108 324 S
10.73(ILL "KILL)-31 F(THREAD channel host", "KILL MSG spoolid")2.5 E(#)
-108 300 Q(nobody:nobody:SNMP ETRN:[0.0.0.0]/0)108 312 Q(#w)108 324 Q
-(atcher:zzzzz:SNMP QQ TT ETRN:[127.0.0.1]/32)-.1 E
-(#root:zzzzzzz:ALL:[127.0.0.1]/32)108 336 Q/F1 10.95/Times-Bold@0 SF
-(Z-ENVIR)72 369.6 Q(ONMENT V)-.329 E(ARIABLES)-1.478 E F0(LOGDIR)108
-381.6 Q(de\214nes location of log \214les. Example:)144 393.6 Q/F2 10
-/Times-Bold@0 SF(LOGDIR=/v)2.5 E(ar/log/mail)-.1 E F0(MAILBIN)108 410.4
-Q(De\214nes where e)144 422.4 Q -.15(xe)-.15 G
+108 336 Q 2.5(#-)108 348 S 2.5(-")-2.5 G(nobody" via loopback gets dif)
+-2.5 E(ferent treatment from)-.25 E 10(#")108 360 S(nobody" from an)-10
+E(ywhere else.)-.15 E(#)108 372 Q(nobody:nobody:SNMP QQ TT ETRN:)108 384
+Q([127.0.0.0]/8 [ipv6.0::1]/128)5 E(nobody:nobody:SNMP ETRN:)108 396 Q 5
+([0.0.0.0]/0 [ipv6.0::0]/0)20 F(#w)108 408 Q
+(atcher:zzzzz:SNMP QQ TT ETRN: [127.0.0.0]/8 [192.168.0.1]/32)-.1 E 32.5
+(#root:zzzzzzz:ALL: [127.0.0.0]/8)108 420 R([192.168.0.2]/32)2.5 E/F1
+10.95/Times-Bold@0 SF(Z-ENVIR)72 453.6 Q(ONMENT V)-.329 E(ARIABLES)
+-1.478 E F0(LOGDIR)108 465.6 Q
+(de\214nes location of log \214les. Example:)144 477.6 Q/F2 10
+/Times-Bold@0 SF(LOGDIR=/v)2.5 E(ar/log/mail)-.1 E F0(MAILBIN)108 494.4
+Q(De\214nes where e)144 506.4 Q -.15(xe)-.15 G
(cutable transport-agent binaries e).15 E(xist under $)-.15 E F2
-(MAILBIN)A F0(/ta/ directory)A(.)-.65 E(MAILSHARE)108 439.2 Q
-(Location of scheduler con\214guration \214les)144 451.2 Q -.92(PA)108
-468 S 9.42(TH What)-.19 F -.92(PA)2.5 G(TH en)-.19 E(vironment v)-.4 E
+(MAILBIN)A F0(/ta/ directory)A(.)-.65 E(MAILSHARE)108 523.2 Q
+(Location of scheduler con\214guration \214les)144 535.2 Q -.92(PA)108
+552 S 9.42(TH What)-.19 F -.92(PA)2.5 G(TH en)-.19 E(vironment v)-.4 E
(ariable to gi)-.25 E .3 -.15(ve t)-.25 H 2.5(ot).15 G
-(ransport-agent subprograms.)-2.5 E(POST)108 484.8 Q(OFFICE)-.18 E
-(de\214nes directory where all POST)144 496.8 Q
-(OFFICE functions are under)-.18 E(.)-.55 E(Example:)144 508.8 Q F2
+(ransport-agent subprograms.)-2.5 E(POST)108 568.8 Q(OFFICE)-.18 E
+(de\214nes directory where all POST)144 580.8 Q
+(OFFICE functions are under)-.18 E(.)-.55 E(Example:)144 592.8 Q F2
(POST)2.5 E(OFFICE=/v)-.18 E(ar/spool/postof\214ce)-.1 E F0
-(SCHEDULERDIRHASH)108 525.6 Q .49(Carries a numeric v)144 537.6 R .49
+(SCHEDULERDIRHASH)108 609.6 Q .49(Carries a numeric v)144 621.6 R .49
(alue of `)-.25 F(`1')-.74 E 2.99('o)-.74 G 2.99(r`)-2.99 G(`2')-3.73 E
2.989('\()-.74 G .489(if de\214ned at all\), which will then o)-2.989 F
-.15(ve)-.15 G .489(rride possible `).15 F(`-H')-.74 E(')-.74 E(option.)
-144 549.6 Q(SYSLOGFLG)108 566.4 Q .815(Existence of `)144 578.4 R(`c')
+144 633.6 Q(SYSLOGFLG)108 650.4 Q .815(Existence of `)144 662.4 R(`c')
-.74 E 3.315('o)-.74 G 3.315(r`)-3.315 G(`C')-4.055 E 3.315('c)-.74 G
.815(haracter in v)-3.315 F .815
(alue string enables syslogging of some e)-.25 F -.15(ve)-.25 G .815
-(nts as seen by).15 F(the scheduler)144 590.4 Q(.)-.55 E(ZCONFIG)108
-607.2 Q(Gi)144 619.2 Q -.15(ve)-.25 G 2.5(sl).15 G(ocation of)-2.5 E/F3
+(nts as seen by).15 F(the scheduler)144 674.4 Q(.)-.55 E(ZCONFIG)108
+691.2 Q(Gi)144 703.2 Q -.15(ve)-.25 G 2.5(sl).15 G(ocation of)-2.5 E/F3
10/Times-Italic@0 SF(zmailer)2.5 E(.conf)-1.11 E F0 .254
-(\214le \(and \214lename\).)146.5 631.2 R .254(Actually this one v)5.254
+(\214le \(and \214lename\).)146.5 715.2 R .254(Actually this one v)5.254
F .254(ariable does)-.25 F F2(not)2.754 E F0 -.15(ove)2.753 G .253
(rride compiled-in location of this con-).15 F(\214guration \214le.)144
-643.2 Q F1(SIGN)72 660 Q(ALS)-.219 E F2(SIGHUP)108 672 Q F0(:)A
-(close and reopen the stdout/stderr log \214le.)144 684 Q F2(SIGTERM)108
-700.8 Q F0(:)A -.15(ex)144 712.8 S(it cleanly).15 E(.)-.65 E
-(30 Jul 2000)282.665 768 Q(14)200.665 E EP
+727.2 Q(12 Oct 2000)281.28 768 Q(14)199.28 E EP
%%Page: 15 15
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF 324.4(SCHEDULER\(8\) SCHEDULER\(8\))72 48 R/F1
-10/Times-Bold@0 SF(SIGQ)108 84 Q(UIT)-.1 E F0(:)A -.15(ex)144 96 S
+10.95/Times-Bold@0 SF(SIGN)72 84 Q(ALS)-.219 E/F2 10/Times-Bold@0 SF
+(SIGHUP)108 96 Q F0(:)A(close and reopen the stdout/stderr log \214le.)
+144 108 Q F2(SIGTERM)108 124.8 Q F0(:)A -.15(ex)144 136.8 S(it cleanly)
+.15 E(.)-.65 E F2(SIGQ)108 153.6 Q(UIT)-.1 E F0(:)A -.15(ex)144 165.6 S
(it cleanly).15 E 2.5(,b)-.65 G
(ut at \214rst order transporter childs to shut do)-2.7 E
-(wn, and collect their status reports.)-.25 E F1(SIGALRM)108 112.8 Q F0
-(:)A(check pending w)144 124.8 Q(ork.)-.1 E F1(SIGUSR1)108 141.6 Q F0(:)
-A(reread the)144 153.6 Q/F2 10/Times-Italic@0 SF(sc)2.5 E(heduler)-.15 E
-F0(con\214guration \214le.)2.5 E F1(SIGUSR2)108 170.4 Q F0(:)A
-(dump state information to the)144 182.4 Q F2 -.37(re)2.5 G(ndezvous).37
-E F0(\214le.)2.5 E/F3 10.95/Times-Bold@0 SF(FILES)72 199.2 Q F2
-(/etc/zmailer)108 211.2 Q(.conf)-1.11 E(/var/spool/postof)108 223.2 Q
-(\214ce/.pid.sc)-.18 E(heduler \(POST)-.15 E(OFFICE/.pid.sc)-.18 E
-(heduler\))-.15 E(/var/spool/postof)108 235.2 Q(\214ce/sc)-.18 E
-(heduler \(POST)-.15 E(OFFICE/sc)-.18 E(heduler\))-.15 E
-(/var/spool/postof)108 247.2 Q(\214ce/tr)-.18 E(ansport \(POST)-.15 E
-(OFFICE/tr)-.18 E(ansport\))-.15 E(/var/spool/postof)108 259.2 Q
-(\214ce/queue \(POST)-.18 E(OFFICE/queue\))-.18 E F3(SEE ALSO)72 276 Q
-F0(router\(8\), mailq\(1\))108 288 Q(RFC 822)108 304.8 Q
+(wn, and collect their status reports.)-.25 E F2(SIGALRM)108 182.4 Q F0
+(:)A(check pending w)144 194.4 Q(ork.)-.1 E F2(SIGUSR1)108 211.2 Q F0(:)
+A(reread the)144 223.2 Q/F3 10/Times-Italic@0 SF(sc)2.5 E(heduler)-.15 E
+F0(con\214guration \214le.)2.5 E F2(SIGUSR2)108 240 Q F0(:)A
+(dump state information to the)144 252 Q F3 -.37(re)2.5 G(ndezvous).37 E
+F0(\214le.)2.5 E F1(FILES)72 268.8 Q F3(/etc/zmailer)108 280.8 Q(.conf)
+-1.11 E(/var/spool/postof)108 292.8 Q(\214ce/.pid.sc)-.18 E
+(heduler \(POST)-.15 E(OFFICE/.pid.sc)-.18 E(heduler\))-.15 E
+(/var/spool/postof)108 304.8 Q(\214ce/sc)-.18 E(heduler \(POST)-.15 E
+(OFFICE/sc)-.18 E(heduler\))-.15 E(/var/spool/postof)108 316.8 Q
+(\214ce/tr)-.18 E(ansport \(POST)-.15 E(OFFICE/tr)-.18 E(ansport\))-.15
+E(/var/spool/postof)108 328.8 Q(\214ce/queue \(POST)-.18 E
+(OFFICE/queue\))-.18 E F1(SEE ALSO)72 345.6 Q F0
+(router\(8\), mailq\(1\))108 357.6 Q(RFC 822)108 374.4 Q
(The basic Internet email format speci\214cation)146.1 E(RFC 1123)108
-316.8 Q -1.11(Va)141.1 G(rious 822 parameter clari\214cations)1.11 E(Se)
-108 340.8 Q -.15(ve)-.25 G(ral e).15 E(xtended SMTP f)-.15 E
-(acilities are implemented:)-.1 E(RFC 1341/1521/2045)108 364.8 Q
+386.4 Q -1.11(Va)141.1 G(rious 822 parameter clari\214cations)1.11 E(Se)
+108 410.4 Q -.15(ve)-.25 G(ral e).15 E(xtended SMTP f)-.15 E
+(acilities are implemented:)-.1 E(RFC 1341/1521/2045)108 434.4 Q
(MIME speci\214cation \(body)95.54 E 2.5(,f)-.65 G(ormats\))-2.5 E
-(RFC 1342/1522/2047)108 376.8 Q(MIME speci\214cation \(headers\))95.54 E
-(RFC 1425/1651/1869)108 388.8 Q(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G
-(rk).1 E(RFC 1428)108 400.8 Q(Basic MIME con)141.1 E -.15(ve)-.4 G
-(rsion rules).15 E(RFC 1891)108 412.8 Q(ESMTP DSN)141.1 E(RFC 1892)108
-424.8 Q(The Multipart/Report Content T)141.1 E(ype)-.8 E(RFC 1893)108
-436.8 Q(Enhanced Mail System Status Codes)141.1 E(RFC 1894)108 448.8 Q
-(Extensible Message format for DSNs)141.1 E(RFC 1985)108 460.8 Q
-(ESMTP ETRN)141.1 E(RFC 2034)108 472.8 Q(ESMTP ENHANCEDST)141.1 E -1.11
-(AT)-.93 G(USCODES)1.11 E(RFC 2852)108 484.8 Q(ESMTP DELIVERBY)141.1 E
-F3 -.548(AU)72 501.6 S(THOR).548 E F0(This program authored and cop)108
-513.6 Q(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108
-525.6 Q 2.5(Ap)108 537.6 S(lenty of changes and se)-2.5 E -.15(ve)-.25 G
+(RFC 1342/1522/2047)108 446.4 Q(MIME speci\214cation \(headers\))95.54 E
+(RFC 1425/1651/1869)108 458.4 Q(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G
+(rk).1 E(RFC 1428)108 470.4 Q(Basic MIME con)141.1 E -.15(ve)-.4 G
+(rsion rules).15 E(RFC 1891)108 482.4 Q(ESMTP DSN)141.1 E(RFC 1892)108
+494.4 Q(The Multipart/Report Content T)141.1 E(ype)-.8 E(RFC 1893)108
+506.4 Q(Enhanced Mail System Status Codes)141.1 E(RFC 1894)108 518.4 Q
+(Extensible Message format for DSNs)141.1 E(RFC 1985)108 530.4 Q
+(ESMTP ETRN)141.1 E(RFC 2034)108 542.4 Q(ESMTP ENHANCEDST)141.1 E -1.11
+(AT)-.93 G(USCODES)1.11 E(RFC 2852)108 554.4 Q(ESMTP DELIVERBY)141.1 E
+F1 -.548(AU)72 571.2 S(THOR).548 E F0(This program authored and cop)108
+583.2 Q(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108
+595.2 Q 2.5(Ap)108 607.2 S(lenty of changes and se)-2.5 E -.15(ve)-.25 G
(ral real b).15 E(ug\214x)-.2 E(es by:)-.15 E
-(Matti Aarnio <[email protected].\214>)108 549.6 Q(30 Jul 2000)282.665 768 Q
-(15)200.665 E EP
+(Matti Aarnio <[email protected].\214>)108 619.2 Q(12 Oct 2000)281.28 768 Q
+(15)199.28 E EP
%%Trailer
end
%%EOF
Index: man/sendmail.8
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/sendmail.8,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- man/sendmail.8      1998/02/10 21:01:48     1.1.1.1
+++ man/sendmail.8      2000/10/12 20:00:48     1.2
@@ -1,6 +1,6 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/sendmail.8,v 1.1.1.1 1998/02/10 21:01:48 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/sendmail.8,v 1.2 2000/10/12 20:00:48 mea Exp $
.ds ]W ZMailer 2.99
-.TH SENDMAIL 8 "26 Oct 1996"
+.TH SENDMAIL 8 "12 Oct 2000"
.SH NAME
sendmail \- zmailer sendmail emulation and mail submission interface
.SH SYNOPSIS
@@ -188,4 +188,4 @@
.br
Continued maintance by:
.br
-Matti Aarnio <[email protected]>
+Matti Aarnio <[email protected]>
Index: man/sendmail.8.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/sendmail.8.ps,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- man/sendmail.8.ps   2000/09/04 12:54:22     1.7
+++ man/sendmail.8.ps   2000/10/16 11:32:39     1.9
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:35 2000
+%%CreationDate: Fri Oct 13 17:53:37 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -297,7 +297,7 @@
.429(This is def)5.429 F .429(ault beha)-.1 F(viour)-.2 E 2.929(,s)-.4 G
2.929(ot)-2.929 G(his)-2.929 E(option has no ef)144 676.8 Q(fect.)-.25 E
20.08(\255oi is)108 693.6 R(lik)2.5 E 2.5<65ad>-.1 G(i.)-2.5 E
-(26 Oct 1996)281.28 768 Q(1)204.28 E EP
+(12 Oct 2000)281.28 768 Q(1)204.28 E EP
%%Page: 2 2
%%BeginPageSetup
BP
@@ -339,8 +339,8 @@
-.1(wa)-.25 G(liases\(8\), zmailer\(3\)).1 E(RFC822)108 427.2 Q F3 -.548
(AU)72 444 S(THOR).548 E F0(This program authored and cop)108 456 Q
(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108 468 Q
-(Continued maintance by:)108 480 Q(Matti Aarnio <mea@utu.\214>)108 492 Q
-(26 Oct 1996)281.28 768 Q(2)204.28 E EP
+(Continued maintance by:)108 480 Q(Matti Aarnio <[email protected].\214>)108
+492 Q(12 Oct 2000)281.28 768 Q(2)204.28 E EP
%%Trailer
end
%%EOF
Index: man/sm.8
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/sm.8,v
retrieving revision 1.4
retrieving revision 1.6
diff -u -r1.4 -r1.6
--- man/sm.8    1998/09/02 09:18:15     1.4
+++ man/sm.8    2000/09/26 21:04:25     1.6
@@ -1,6 +1,6 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/sm.8,v 1.4 1998/09/02 09:18:15 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/sm.8,v 1.6 2000/09/26 21:04:25 mea Exp $
.ds ]W ZMailer 2.99
-.TH SM 8 "2 Sep 1998"
+.TH SM 8 "26 Sep 2000"
.SH NAME
sm \- zmailer Sendmail compatible transport agent
.SH SYNOPSIS
@@ -102,14 +102,117 @@
field contains a concatenation of one-letter flags.  If no flags are desired,
a ``-'' character should be used to indicate presense of the field.  All normal
Sendmail flags are recognized, but the ones that do not make sense in the
-context of ZMailer will produce an error.  The flags that change the behaviour
-of
+context of ZMailer will produce an error.
+
+The flags that change the behaviour of
.I sm
+and their comparisons against
+.I sendmail-8.11
are:
+
+.IP \-
+.I sendmail: Not defined/used
+
+.I sm:
+Special ``no flags defined'' dummy entry
+
+.IP ":, |, /, %, @"
+.I sendmail:
+various sendmail-specific things that are handled mostly by the
+.I router
+subsystem at ZMailer.
+
+.I sm: Not used
+
+.IP 0
+.I sendmail:
+Equivalent of ZMailer's
+.I smtp
+transport agents
+.I \-x
+option.  (Don't use MX data, only addresses)
+
+.I sm: Not used
+
+.IP "1, 2"
+.I sendmail, sm: Not defined/used
+
+.IP 3
+.I sendmail:
+Extend the list of characters converted to =XX notation when converting to
+Quoted-Printable to include those that don't map cleanly between ASCII
+and EBCDIC.  Usefull if you have IBM mainframes on site.
+
+.I sm: Not implemented/used
+
+.IP 4
+.I sendmail, sm: Not defined/used
+
+.IP 5
+.I sendmail:
+Local delivery alternate resolution ruleset (R5) in case no aliases
+are found for currently processed address.
+(Meaningless in ZMailer; router's task)
+
+.I sm:  Not used
+
+.IP 6
+.I sendmail:
+Strip RFC 822 headers to 7 bits.
+
+.I sm: Not implemented/used
+
+.IP 7
+.I sendmail:
+Will strip (set to 0) the 8th bit of every character in the message.
+
+.I sm:
+Will strip the 8th bit of every character of the message body, does
+not touch message headers.
+.I (Not stripping message header is sort of BUG.)
+
+.IP 8
+.I sendmail, sm:
+Tells that the recipient system is 8-bit capable and that no
+8->7 downgrading is needed.
+
+.IP 9
+.I sendmail, sm:
+If set, do
+.I limited
+7->8 bit MIME conversions.  These conversions are limited to text/plain data.
+
+.IP a
+.I sendmail:
+Run ESMTP protocol on the SMTP connection
+
+.I sm: not implemented/used
+(See ``B'')
+.RI ( SMTP
+transport agent's task)
+
+.IP A
+.I sendmail:
+Look up the user part of the address in the alias database
+
+.I sm: not used
+(Router's task)
+
.IP b
+.I sendmail:
+Force a blank line on the end of a message.
+(Not needed in
+.I sm's
+usage environment.)
+
+.I sm:
will activate BSMTP-type wrapping with ``hidden-dot'' algorithm; e.g.
quite ordinary SMTP stream, but in "batch mode".
+
.IP B
+.I sendmail: not defined/used
+
+.I sm:
The first ``\fIB\fR'' turns on similar BSMTP wrapping as ``\fIb\fR'', but
adds SIZE and, if the
.I sm
@@ -118,23 +221,206 @@
also 8BITMIME options.
The second ``\fIB\fR'' adds there also DSN (Delivery Status Notification)
parameters.
+
+.IP c
+.I sendmail:
+Do not include comments in RFC 822 header addresses.
+
+.I sm: not implemented/used
+
+.IP C
+.I sendmail:
+Header address canonicalization
+
+.I sm: not used (router's task)
+
+.IP d
+.I sendmail:
+Do not include angle brackets around route-address syntax addresses.
+(this is broken security trick for some shell script usages, nor recommented!)
+
+.I sm: not implemented/used
+
+.IP D
+.I sendmail:
+``Date:'' header wanted
+
+.I sm: not used (router's task)
+
+.IP e
+.I sendmail:
+This mailer is expensive to connect, connections only from queuerun.
+(Meaningless in sm)
+
+.I sm: Throw in a collection of ``X-Envelope-*:'' headers.
+
+.IP E
+.I sendmail, sm:
+Will prepend ``>'' to any message body line starting with ``From '' (From space).
+
+.IP f
+.I sendmail, sm:
+adds ``\-f\ \fIsender\fR'' arguments to the delivery program.
+
+.IP F
+.I sendmail: This mailer wants ``From:'' header line.
+
+.I sm: not used
+(Router's task)
+
+.IP g
+.I sendmail: Affects on what to use as error source envelope address
+
+.I sm: not used
+(Scheduler's task)
+
+.IP G
+.I sendmail, sm: Not used
+
+.IP h
+.I sendmail, sm: Not used
+
.IP H
+.I sendmail: not used
+
+.I sm:
Adds ``HELO'' or ``EHLO'' into front of the BSMTP stream.
Normally the BSMTP streams
.B do not
have ``HELO/EHLO'' in front of them to avoid problems with
catenation of BSMTP messages for streamed UUCP transfers, for example.
-.IP E
-will prepend ``>'' to any message body line starting with ``From '' (From space).
-.IP f
-adds "-f \fIsender\fR" arguments to the delivery program.
+
+.IP i
+.I sendmail:
+Do User Database rewriting on envelope sender address
+
+.I sm: not used (router's task)
+
+.IP I
+.I sendmail:
+The remote system is another sendmail, use special protocol  features
+
+.I sm: Not used
+
+.IP j
+.I sendmail:
+Do User Database rewriting on envelope recipients as well as senders.
+
+.I sm: not implemented/used (router's task)
+
+.IP J
+.I sendmail, sm: Not used
+
+.IP k
+.I sendmail:
+Allow network connection to myself (for very unusual usage cases,
+likely sendmail running at another port)
+
+.I sm: not used
+(See ZMailer
+.I smtp
+TA.)
+
+.IP K
+.I sendmail:
+Currently unimplemented, reserved for CHUNKING.
+
+.I sm: not used
+
+.IP l
+.I sendmail:
+This mailer is local (i.e., final delivery will be performed)
+
+.I sm: Not used (semi meaningless)
+
+.IP L
+.I sendmail:
+Limit the line lengths as specified in RFC 821. (This is deprecated option.)
+
+.I sm: Not used
+
+.IP m
+.I sendmail, sm:
+This mailer can hangle multiple recipients; Existence of
+.B $u
+macro in
+.I argv
+part of the mailer definition will be expanded with recipients.
+
+.IP M
+.I sendmail:
+``Message-ID:'' header wanted
+
+.I sm: Not used
+(Router's task)
+
.IP n
-will
+.I sendmail, sm:
+Do
.B not
prepend a From-space line (normal mailbox separator line) to the message.
+
+.IP o
+.I sendmail
+Always run as the owner of the recipient mailbox
+
+.I sm: meaningless/not used
+(ZMailer's
+.I sm
+is not really for doing local delivery - but see how
+.I procmail
+is driven.)
+
+.IP O
+.I sendmail, sm: Not used
+
+.IP p
+.I sendmail:
+Use route-addr style reverse-path in the SMTP ``MAIL FROM:'' command
+rather than just the return address.
+
+.I sm:
+Meaningless, not used.
+.RI ( smtp
+transport agent's task.)
+
+.IP P
+.I sendmail, sm:
+Header ``Return-Path:'' is wanted to be added to the message.
+
+.IP q
+.I sendmail:
+Some SMTP VRFY related thing, not applicable to ZMailer
+
+.I sm: Not used.
+
+.IP Q
+.I sendmail, sm: not used.
+
.IP r
-adds "-r \fIsender\fR" arguments to the delivery program.
+.I sendmail, rm:
+adds ``\-r\ \fIsender\fR'' arguments to the delivery program.
+
+.IP R
+.I sendmail:
+Open SMTP connections from a ``secure'' port.
+(Meaningless in ZMailer, but see
+.I smtp
+transport agent.)
+
+.I sm:
+Use CRLF sequence as end-of-line sequence.
+Without it, will use LF-only end-of-line sequence.
+
+.IP s
+.I sendmail:
+Strip quote characters (" and \\) off of the addresses before calling
+the actual mailer.
+
+.I sm: Not implemented/used.
+
.IP S
+.I sendmail, sm:
will run the delivery program with the same real and effective uid as the
.I sm
process.  If this flag is not set, the delivery program will be run with
@@ -143,26 +429,62 @@
process.  This may be useful if
.I sm
is setuid.
-.IP m
-informs
-.I sm
-that each instance of the delivery program can deliver to many destinations.
-This affects $u expansion in the argument list, see below.
-.IP P
-prepends a Return-Path: header to the message.
+
+.IP "t, T"
+.I sendmail, sm: Not used
+
+.IP u
+.I sendmail:
+Upper case should be preserved in user names for this mailer.
+Standards require preservation of cae in the local part of addresses,
+except for those addresses for which your system accepts responsibility.
+
+.I sm: Not used
+
.IP U
+.I sendmail, sm:
will prepend a From-space line, with a "remote from \fImyuucpname\fR" at the
end, to the message.  This is what is expected by remote
.IR rmail (1)
programs for incoming UUCP mail.
-.IP R
-use CRLF sequence as end-of-line sequence. Without it, will use LF-only
-end-of-line sequence.
+
+.IP "v, V"
+.I sendmail, sm: Not used
+
+.IP w
+.I sendmail:
+The user must have a valid account on this machine, i.e., getpwnam()
+must succeed.  If not, the mail is bounced.  (Local delivery stuff.)
+
+.I sm: Not used
+
+.IP W
+.I sendmail, sm: Not used
+
+.IP x
+.I sendmail:
+A ``Full-Name:'' header is wanted.
+
+.I sm: Not implemented/used
+
.IP X
+.I sendmail, sm:
does SMTP-like 'hidden-dot' algorithm of doubling all dots that are at
the start of the line.
-.IP 7
-will strip (set to 0) the 8th bit of every character in the message.
+
+.IP "y, Y"
+.I sendmail, sm: Not used
+
+.IP z
+.I sendmail:
+Run Local Mail Transfer protocol (LMTP) between sendmail and the local mailer.
+See RFC 2033.
+
+.I sm: Not implemented/used.
+
+.IP Z
+.I sendmail, sm: Not used
+
.PP
The
.I path
Index: man/sm.8.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/sm.8.ps,v
retrieving revision 1.13
retrieving revision 1.16
diff -u -r1.13 -r1.16
--- man/sm.8.ps 2000/09/04 12:54:22     1.13
+++ man/sm.8.ps 2000/10/10 21:00:58     1.16
@@ -1,11 +1,11 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:35 2000
+%%CreationDate: Thu Oct  5 19:17:35 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%DocumentSuppliedResources: procset grops 1.16 0
-%%Pages: 3
+%%Pages: 7
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
@@ -292,7 +292,7 @@
(It is used simply as a k)5.74 F -.15(ey)-.1 G(inde)108 729.6 Q 2.5(xt)
-.15 G 2.5(ot)-2.5 G(he con\214guration \214le contents.)-2.5 E
(Whitespace is used as the \214eld separator for all the \214elds.)5 E
-2.5(2S)283.5 768 S(ep 1998)-2.5 E(1)206.5 E EP
+(26 Sep 2000)281 768 Q(1)204 E EP
%%Page: 2 2
%%BeginPageSetup
BP
@@ -305,97 +305,269 @@
(be used to indicate presense of the \214eld.)108 96 R .119
(All normal Sendmail \215ags are recognized, b)5.119 F .119
(ut the ones that do not)-.2 F(mak)108 108 Q 2.5(es)-.1 G
-(ense in the conte)-2.5 E(xt of ZMailer will produce an error)-.15 E 5
-(.T)-.55 G(he \215ags that change the beha)-5 E(viour of)-.2 E F1(sm)2.5
-E F0(are:)2.5 E 31(bw)108 124.8 S 2.217(ill acti)-31 F -.25(va)-.25 G
-2.217(te BSMTP-type wrapping with `).25 F(`hidden-dot')-.74 E 4.717('a)
--.74 G 2.217(lgorithm; e.g.)-4.717 F 2.217(quite ordinary SMTP)7.217 F
-(stream, b)144 136.8 Q(ut in "batch mode".)-.2 E 29.33(BT)108 153.6 S
-.789(he \214rst `)-29.33 F(`)-.74 E F1(B)A F0 2.269 -.74('' t)D .789
+(ense in the conte)-2.5 E(xt of ZMailer will produce an error)-.15 E(.)
+-.55 E(The \215ags that change the beha)108 132 Q(viour of)-.2 E F1(sm)
+2.5 E F0(and their comparisons ag)2.5 E(ainst)-.05 E F1(sendmail-8.11)
+2.5 E F0(are:)2.5 E<ad>108 160.8 Q F1(sendmail: Not de\214ned/used)30.36
+E(sm:)144 184.8 Q F0(Special `)2.5 E(`no \215ags de\214ned')-.74 E 2.5
+('d)-.74 G(ummy entry)-2.5 E(:, |, /, %, @)108 213.6 Q F1(sendmail:)144
+225.6 Q F0 -.25(va)4.264 G 1.764
+(rious sendmail-speci\214c things that are handled mostly by the).25 F
+F1 -.45(ro)4.264 G(uter).45 E F0 1.765(subsystem at)4.265 F(ZMailer)144
+237.6 Q(.)-.55 E F1(sm: Not used)144 261.6 Q F0(0)108 290.4 Q F1
+(sendmail:)31 E F0(Equi)3.951 E -.25(va)-.25 G 1.451(lent of ZMailer')
+.25 F(s)-.55 E F1(smtp)3.951 E F0 1.451(transport agents)3.951 F F1
+<ad78>3.951 E F0 3.951(option. \(Don')3.951 F 3.951(tu)-.18 G 1.45
+(se MX data, only)-3.951 F(addresses\))144 302.4 Q F1(sm: Not used)144
+326.4 Q F0(1, 2)108 355.2 Q F1(sendmail, sm: Not de\214ned/used)21 E F0
+(3)108 384 Q F1(sendmail:)31 E F0 1.421
+(Extend the list of characters con)3.92 F -.15(ve)-.4 G 1.421
+(rted to =XX notation when con).15 F -.15(ve)-.4 G 1.421
+(rting to Quoted-).15 F 1.317(Printable to include those that don')144
+396 R 3.817(tm)-.18 G 1.317(ap cleanly between ASCII and EBCDIC.)-3.817
+F 1.317(Usefull if you)6.317 F(ha)144 408 Q .3 -.15(ve I)-.2 H
+(BM mainframes on site.).15 E F1(sm: Not implemented/used)144 432 Q F0
+(4)108 460.8 Q F1(sendmail, sm: Not de\214ned/used)31 E F0(5)108 489.6 Q
+F1(sendmail:)31 E F0 .146(Local deli)2.646 F -.15(ve)-.25 G .146(ry alt\
+ernate resolution ruleset \(R5\) in case no aliases are found for curre\
+ntly).15 F(processed address.)144 501.6 Q
+(\(Meaningless in ZMailer; router')5 E 2.5(st)-.55 G(ask\))-2.5 E F1
+(sm: Not used)144 525.6 Q F0(6)108 554.4 Q F1(sendmail:)31 E F0
+(Strip RFC 822 headers to 7 bits.)2.5 E F1(sm: Not implemented/used)144
+578.4 Q F0(7)108 607.2 Q F1(sendmail:)31 E F0 -.4(Wi)2.5 G
+(ll strip \(set to 0\) the 8th bit of e).4 E -.15(ve)-.25 G
+(ry character in the message.).15 E F1(sm:)144 631.2 Q F0 -.4(Wi)2.796 G
+.296(ll strip the 8th bit of e).4 F -.15(ve)-.25 G .296
+(ry character of the message body).15 F 2.796(,d)-.65 G .296
+(oes not touch message headers.)-2.796 F F1(\(Not stripping messa)144
+643.2 Q .2 -.1(ge h)-.1 H(eader is sort of B).1 E(UG.\))-.1 E F0(8)108
+672 Q F1 1.497(sendmail, sm:)31 F F0 -.7(Te)3.997 G 1.497
+(lls that the recipient system is 8-bit capable and that no 8->7 do).7 F
+1.498(wngrading is)-.25 F(needed.)144 684 Q(9)108 712.8 Q F1 1.536
+(sendmail, sm:)31 F F0 1.536(If set, do)4.036 F F1(limited)4.036 E F0
+1.536(7->8 bit MIME con)4.036 F -.15(ve)-.4 G 4.036(rsions. These).15 F
+(con)4.035 E -.15(ve)-.4 G 1.535(rsions are limited to).15 F(te)144
+724.8 Q(xt/plain data.)-.15 E(26 Sep 2000)281 768 Q(2)204 E EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 413.28(SM\(8\) SM\(8\))72 48 R(a)108 84 Q/F1 10
+/Times-Italic@0 SF(sendmail:)31.56 E F0
+(Run ESMTP protocol on the SMTP connection)2.5 E F1
+(sm: not implemented/used)144 108 Q F0(\(See `)2.5 E(`B')-.74 E('\) \()
+-.74 E F1(SMTP).33 E F0(transport agent')2.5 E 2.5(st)-.55 G(ask\))-2.5
+E(A)108 136.8 Q F1(sendmail:)28.78 E F0
+(Look up the user part of the address in the alias database)2.5 E F1
+(sm: not used)144 160.8 Q F0(\(Router')2.5 E 2.5(st)-.55 G(ask\))-2.5 E
+(b)108 189.6 Q F1(sendmail:)31 E F0 -.15(Fo)2.5 G
+(rce a blank line on the end of a message.).15 E(\(Not needed in)5 E F1
+(sm')2.5 E(s)-.4 E F0(usage en)2.5 E(vironment.\))-.4 E F1(sm:)144 213.6
+Q F0 .475(will acti)2.975 F -.25(va)-.25 G .475
+(te BSMTP-type wrapping with `).25 F(`hidden-dot')-.74 E 2.976('a)-.74 G
+.476(lgorithm; e.g.)-2.976 F .476(quite ordinary SMTP)5.476 F(stream, b)
+144 225.6 Q(ut in "batch mode".)-.2 E(B)108 254.4 Q F1
+(sendmail: not de\214ned/used)29.33 E(sm:)144 278.4 Q F0 1.468
+(The \214rst `)3.968 F(`)-.74 E F1(B)A F0 2.948 -.74('' t)D 1.468
(urns on similar BSMTP wrapping as `).74 F(`)-.74 E F1(b)A F0 -.74('')C
-3.289(,b).74 G .789(ut adds SIZE and, if the)-3.489 F F1(sm)3.289 E F0
-.788(is started)3.288 F .205(with option `)144 165.6 R(`)-.74 E F1<ad38>
--.36 E F0 -.74('').43 G 2.705(,a).74 G .205(lso 8BITMIME options.)-2.705
-F .206(The second `)5.206 F(`)-.74 E F1(B)A F0 1.686 -.74('' a)D .206
-(dds there also DSN \(Deli).74 F -.15(ve)-.25 G .206(ry Sta-).15 F
-(tus Noti\214cation\) parameters.)144 177.6 Q 28.78(HA)108 194.4 S .723
-(dds `)-28.78 F(`HELO')-.74 E 3.223('o)-.74 G 3.222(r`)-3.223 G(`EHLO')
--3.962 E 3.222('i)-.74 G .722(nto front of the BSMTP stream.)-3.222 F
-.722(Normally the BSMTP streams)5.722 F/F2 10/Times-Bold@0 SF(do)3.222 E
-(not)144 206.4 Q F0(ha)2.535 E .335 -.15(ve `)-.2 H(`HELO/EHLO')-.59 E
-2.535('i)-.74 G 2.535(nf)-2.535 G .036(ront of them to a)-2.535 F -.2
-(vo)-.2 G .036(id problems with catenation of BSMTP messages).2 F
-(for streamed UUCP transfers, for e)144 218.4 Q(xample.)-.15 E 29.89(Ew)
-108 235.2 S(ill prepend `)-29.89 E(`>')-.74 E 2.5('t)-.74 G 2.5(oa)-2.5
-G .3 -.15(ny m)-2.5 H(essage body line starting with `).15 E(`From ')
--.74 E 2.5('\()-.74 G(From space\).)-2.5 E 32.67(fa)108 252 S(dds "-f)
--32.67 E F1(sender)2.5 E F0 2.5("a)C -.18(rg)-2.5 G(uments to the deli)
-.18 E -.15(ve)-.25 G(ry program.).15 E 31(nw)108 268.8 S(ill)-31 E F2
-(not)2.5 E F0(prepend a From-space line \(normal mailbox separator line\
-\) to the message.)2.5 E 32.67(ra)108 285.6 S(dds "-r)-32.67 E F1
-(sender)2.5 E F0 2.5("a)C -.18(rg)-2.5 G(uments to the deli).18 E -.15
-(ve)-.25 G(ry program.).15 E 30.44(Sw)108 302.4 S .244(ill run the deli)
--30.44 F -.15(ve)-.25 G .243(ry program with the same real and ef).15 F
-(fecti)-.25 E .543 -.15(ve u)-.25 H .243(id as the).15 F F1(sm)2.743 E
-F0 2.743(process. If)2.743 F .243(this \215ag is)2.743 F .17
-(not set, the deli)144 314.4 R -.15(ve)-.25 G .17
-(ry program will be run with the real uid of the).15 F F1(sm)2.67 E F0
-2.67(process. This)2.67 F .17(may be useful if)2.67 F F1(sm)144 326.4 Q
-F0(is setuid.)2.5 E 28.22(mi)108 343.2 S(nforms)-28.22 E F1(sm)4.231 E
-F0 1.731(that each instance of the deli)4.231 F -.15(ve)-.25 G 1.731
-(ry program can deli).15 F -.15(ve)-.25 G 4.23(rt).15 G 4.23(om)-4.23 G
-(an)-4.23 E 4.23(yd)-.15 G 4.23(estinations. This)-4.23 F(af)144 355.2 Q
-(fects $u e)-.25 E(xpansion in the ar)-.15 E(gument list, see belo)-.18
-E -.65(w.)-.25 G 30.44(Pp)108 372 S(repends a Return-P)-30.44 E
-(ath: header to the message.)-.15 E 28.78(Uw)108 388.8 S 1.231
-(ill prepend a From-space line, with a "remote from)-28.78 F F1
-(myuucpname)3.731 E F0 3.731("a)C 3.732(tt)-3.731 G 1.232
-(he end, to the message.)-3.732 F(This is what is e)144 400.8 Q
-(xpected by remote)-.15 E F1(rmail)2.5 E F0
-(\(1\) programs for incoming UUCP mail.).51 E 29.33(Ru)108 417.6 S
-(se CRLF sequence as end-of-line sequence. W)-29.33 E
-(ithout it, will use LF-only end-of-line sequence.)-.4 E 28.78(Xd)108
-434.4 S(oes SMTP-lik)-28.78 E 2.5(e')-.1 G(hidden-dot' algorithm of dou\
-bling all dots that are at the start of the line.)-2.5 E 31(7w)108 451.2
-S(ill strip \(set to 0\) the 8th bit of e)-31 E -.15(ve)-.25 G
-(ry character in the message.).15 E(The)108 468 Q F1(path)2.87 E F0 .37
+3.968(,b).74 G 1.468(ut adds SIZE and, if the)-4.168 F F1(sm)3.967 E F0
+(is)3.967 E .115(started with option `)144 290.4 R(`)-.74 E F1<ad38>-.36
+E F0 -.74('').43 G 2.615(,a).74 G .116(lso 8BITMIME options.)-2.615 F
+.116(The second `)5.116 F(`)-.74 E F1(B)A F0 1.596 -.74('' a)D .116
+(dds there also DSN \(Deli).74 F(v-)-.25 E
+(ery Status Noti\214cation\) parameters.)144 302.4 Q(c)108 331.2 Q F1
+(sendmail:)31.56 E F0
+(Do not include comments in RFC 822 header addresses.)2.5 E F1
+(sm: not implemented/used)144 355.2 Q F0(C)108 384 Q F1(sendmail:)29.33
+E F0(Header address canonicalization)2.5 E F1(sm: not used \(r)144 408 Q
+(outer')-.45 E 2.5(st)-.4 G(ask\))-2.5 E F0(d)108 436.8 Q F1(sendmail:)
+31 E F0 1.171(Do not include angle brack)3.671 F 1.171
+(ets around route-address syntax addresses.)-.1 F 1.17(\(this is brok)
+6.171 F(en)-.1 E
+(security trick for some shell script usages, nor recommented!\))144
+448.8 Q F1(sm: not implemented/used)144 472.8 Q F0(D)108 501.6 Q F1
+(sendmail:)28.78 E F0 -.74(``)2.5 G(Date:').74 E 2.5('h)-.74 G(eader w)
+-2.5 E(anted)-.1 E F1(sm: not used \(r)144 525.6 Q(outer')-.45 E 2.5(st)
+-.4 G(ask\))-2.5 E F0(e)108 554.4 Q F1(sendmail:)31.56 E F0 .573
+(This mailer is e)3.073 F(xpensi)-.15 E .873 -.15(ve t)-.25 H 3.073(oc)
+.15 G .573(onnect, connections only from queuerun.)-3.073 F .574
+(\(Meaningless in)5.574 F(sm\))144 566.4 Q F1(sm: Thr)144 590.4 Q
+(ow in a collection of `)-.45 E(`X-En)-1.11 E(velope-*:')-.4 E 2.5('h)
+-1.11 G(eader)-2.5 E(s.)-.1 E F0(E)108 619.2 Q F1(sendmail, sm:)29.89 E
+F0 -.4(Wi)2.5 G(ll prepend `).4 E(`>')-.74 E 2.5('t)-.74 G 2.5(oa)-2.5 G
+.3 -.15(ny m)-2.5 H(essage body line starting with `).15 E(`From ')-.74
+E 2.5('\()-.74 G(From space\).)-2.5 E(f)108 648 Q F1(sendmail, sm:)32.67
+E F0(adds `)2.5 E(`\255f)-.74 E F1(sender)2.5 E F0 1.48 -.74('' a)D -.18
+(rg).74 G(uments to the deli).18 E -.15(ve)-.25 G(ry program.).15 E(F)
+108 676.8 Q F1(sendmail: This mailer wants `)30.44 E(`F)-1.11 E -.45(ro)
+-.55 G(m:').45 E 2.5('h)-1.11 G(eader line)-2.5 E(.)-.15 E(sm: not used)
+144 700.8 Q F0(\(Router')2.5 E 2.5(st)-.55 G(ask\))-2.5 E(26 Sep 2000)
+281 768 Q(3)204 E EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 413.28(SM\(8\) SM\(8\))72 48 R(g)108 84 Q/F1 10
+/Times-Italic@0 SF(sendmail: Af)31 E(fects on what to use as err)-.18 E
+(or sour)-.45 E(ce en)-.37 E(velope addr)-.4 E(ess)-.37 E(sm: not used)
+144 108 Q F0(\(Scheduler')2.5 E 2.5(st)-.55 G(ask\))-2.5 E(G)108 136.8 Q
+F1(sendmail, sm: Not used)28.78 E F0(h)108 165.6 Q F1
+(sendmail, sm: Not used)31 E F0(H)108 194.4 Q F1(sendmail: not used)
+28.78 E(sm:)144 218.4 Q F0 .445(Adds `)2.945 F(`HELO')-.74 E 2.945('o)
+-.74 G 2.945(r`)-2.945 G(`EHLO')-3.685 E 2.945('i)-.74 G .445
+(nto front of the BSMTP stream.)-2.945 F .445
+(Normally the BSMTP streams)5.445 F/F2 10/Times-Bold@0 SF .384(do not)
+144 230.4 R F0(ha)2.884 E .684 -.15(ve `)-.2 H(`HELO/EHLO')-.59 E 2.884
+('i)-.74 G 2.884(nf)-2.884 G .385(ront of them to a)-2.884 F -.2(vo)-.2
+G .385(id problems with catenation of BSMTP mes-).2 F
+(sages for streamed UUCP transfers, for e)144 242.4 Q(xample.)-.15 E(i)
+108 271.2 Q F1(sendmail:)33.22 E F0(Do User Database re)2.5 E
+(writing on en)-.25 E -.15(ve)-.4 G(lope sender address).15 E F1
+(sm: not used \(r)144 295.2 Q(outer')-.45 E 2.5(st)-.4 G(ask\))-2.5 E F0
+(I)108 324 Q F1(sendmail:)32.67 E F0
+(The remote system is another sendmail, use special protocol)2.5 E
+(features)5 E F1(sm: Not used)144 348 Q F0(j)108 376.8 Q F1(sendmail:)
+33.22 E F0(Do User Database re)2.5 E(writing on en)-.25 E -.15(ve)-.4 G
+(lope recipients as well as senders.).15 E F1
+(sm: not implemented/used \(r)144 400.8 Q(outer')-.45 E 2.5(st)-.4 G
+(ask\))-2.5 E F0(J)108 429.6 Q F1(sendmail, sm: Not used)32.11 E F0(k)
+108 458.4 Q F1(sendmail:)31 E F0(Allo)2.671 E 2.671(wn)-.25 G(etw)-2.671
+E .171(ork connection to myself \(for v)-.1 F .171
+(ery unusual usage cases, lik)-.15 F .17(ely sendmail run-)-.1 F
+(ning at another port\))144 470.4 Q F1(sm: not used)144 494.4 Q F0
+(\(See ZMailer)2.5 E F1(smtp)2.5 E F0 -.93(TA)2.5 G(.\)).93 E(K)108
+523.2 Q F1(sendmail:)28.78 E F0(Currently unimplemented, reserv)2.5 E
+(ed for CHUNKING.)-.15 E F1(sm: not used)144 547.2 Q F0(l)108 576 Q F1
+(sendmail:)33.22 E F0(This mailer is local \(i.e., \214nal deli)2.5 E
+-.15(ve)-.25 G(ry will be performed\)).15 E F1
+(sm: Not used \(semi meaningless\))144 600 Q F0(L)108 628.8 Q F1
+(sendmail:)29.89 E F0(Limit the line lengths as speci\214ed in RFC 821.\
+ \(This is deprecated option.\))2.5 E F1(sm: Not used)144 652.8 Q F0(m)
+108 681.6 Q F1 .946(sendmail, sm:)28.22 F F0 .947
+(This mailer can hangle multiple recipients; Existence of)3.446 F F2($u)
+3.447 E F0 .947(macro in)3.447 F F1(ar)3.447 E(gv)-.37 E F0 .947
+(part of)3.447 F(the mailer de\214nition will be e)144 693.6 Q
+(xpanded with recipients.)-.15 E(26 Sep 2000)281 768 Q(4)204 E EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 413.28(SM\(8\) SM\(8\))72 48 R(M)108 84 Q/F1 10
+/Times-Italic@0 SF(sendmail:)27.11 E F0 -.74(``)2.5 G(Message-ID:').74 E
+2.5('h)-.74 G(eader w)-2.5 E(anted)-.1 E F1(sm: Not used)144 108 Q F0
+(\(Router')2.5 E 2.5(st)-.55 G(ask\))-2.5 E(n)108 136.8 Q F1
+(sendmail, sm:)31 E F0(Do)2.5 E/F2 10/Times-Bold@0 SF(not)2.5 E F0(prep\
+end a From-space line \(normal mailbox separator line\) to the message.)
+2.5 E(o)108 165.6 Q F1(sendmail)31 E F0(Al)2.5 E -.1(wa)-.1 G
+(ys run as the o).1 E(wner of the recipient mailbox)-.25 E F1 .564
+(sm: meaningless/not used)144 189.6 R F0(\(ZMailer')3.064 E(s)-.55 E F1
+(sm)3.064 E F0 .564(is not really for doing local deli)3.064 F -.15(ve)
+-.25 G .564(ry - b).15 F .563(ut see ho)-.2 F(w)-.25 E F1(pr)3.063 E
+(oc-)-.45 E(mail)144 201.6 Q F0(is dri)2.5 E -.15(ve)-.25 G(n.\)).15 E
+(O)108 230.4 Q F1(sendmail, sm: Not used)28.78 E F0(p)108 259.2 Q F1
+(sendmail:)31 E F0 .603(Use route-addr style re)3.103 F -.15(ve)-.25 G
+.603(rse-path in the SMTP `).15 F .604(`MAIL FR)-.74 F(OM:')-.4 E 3.104
+('c)-.74 G .604(ommand rather than)-3.104 F(just the return address.)144
+271.2 Q F1(sm:)144 295.2 Q F0(Meaningless, not used.)2.5 E(\()5 E F1
+(smtp).34 E F0(transport agent')2.5 E 2.5(st)-.55 G(ask.\))-2.5 E(P)108
+324 Q F1(sendmail, sm:)30.44 E F0(Header `)2.5 E(`Return-P)-.74 E(ath:')
+-.15 E 2.5('i)-.74 G 2.5(sw)-2.5 G(anted to be added to the message.)
+-2.6 E(q)108 352.8 Q F1(sendmail:)31 E F0
+(Some SMTP VRFY related thing, not applicable to ZMailer)2.5 E F1
+(sm: Not used.)144 376.8 Q F0(Q)108 405.6 Q F1(sendmail, sm: not used.)
+28.78 E F0(r)108 434.4 Q F1(sendmail, rm:)32.67 E F0(adds `)2.5 E
+(`\255r)-.74 E F1(sender)2.5 E F0 1.48 -.74('' a)D -.18(rg).74 G
+(uments to the deli).18 E -.15(ve)-.25 G(ry program.).15 E(R)108 463.2 Q
+F1(sendmail:)29.33 E F0 .413(Open SMTP connections from a `)2.914 F
+(`secure')-.74 E 2.913('p)-.74 G 2.913(ort. \(Meaningless)-2.913 F .413
+(in ZMailer)2.913 F 2.913(,b)-.4 G .413(ut see)-3.113 F F1(smtp)2.913 E
+F0(transport agent.\))144 475.2 Q F1(sm:)144 499.2 Q F0 2.783
+(Use CRLF sequence as end-of-line sequence.)5.283 F -.4(Wi)7.783 G 2.784
+(thout it, will use LF-only end-of-line).4 F(sequence.)144 511.2 Q(s)108
+540 Q F1(sendmail:)32.11 E F0(Strip quote characters \(" and \\\) of)2.5
+E 2.5(fo)-.25 G 2.5(ft)-2.5 G
+(he addresses before calling the actual mailer)-2.5 E(.)-.55 E F1
+(sm: Not implemented/used.)144 564 Q F0(S)108 592.8 Q F1 .109
+(sendmail, sm:)30.44 F F0 .109(will run the deli)2.609 F -.15(ve)-.25 G
+.109(ry program with the same real and ef).15 F(fecti)-.25 E .409 -.15
+(ve u)-.25 H .109(id as the).15 F F1(sm)2.608 E F0(process.)2.608 E .891
+(If this \215ag is not set, the deli)144 604.8 R -.15(ve)-.25 G .892
+(ry program will be run with the real uid of the).15 F F1(sm)3.392 E F0
+3.392(process. This)3.392 F(may be useful if)144 616.8 Q F1(sm)2.5 E F0
+(is setuid.)2.5 E(t, T)108 645.6 Q F1(sendmail, sm: Not used)22.11 E F0
+(u)108 674.4 Q F1(sendmail:)31 E F0 .222(Upper case should be preserv)
+2.723 F .222(ed in user names for this mailer)-.15 F 5.222(.S)-.55 G
+.222(tandards require preser)-5.222 F(-)-.2 E -.25(va)144 686.4 S 1.638
+(tion of cae in the local part of addresses, e).25 F 1.638
+(xcept for those addresses for which your system)-.15 F
+(accepts responsibility)144 698.4 Q(.)-.65 E F1(sm: Not used)144 722.4 Q
+F0(26 Sep 2000)281 768 Q(5)204 E EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 413.28(SM\(8\) SM\(8\))72 48 R(U)108 84 Q/F1 10
+/Times-Italic@0 SF .935(sendmail, sm:)28.78 F F0 .935
+(will prepend a From-space line, with a "remote from)3.435 F F1
+(myuucpname)3.434 E F0 3.434("a)C 3.434(tt)-3.434 G .934(he end, to)
+-3.434 F(the message.)144 96 Q(This is what is e)5 E(xpected by remote)
+-.15 E F1(rmail)2.5 E F0(\(1\) programs for incoming UUCP mail.).51 E
+1.3 -.65(v, V)108 124.8 T F1(sendmail, sm: Not used)20.08 E F0(w)108
+153.6 Q F1(sendmail:)28.78 E F0 .463(The user must ha)2.963 F .763 -.15
+(ve a v)-.2 H .463
+(alid account on this machine, i.e., getpwnam\(\) must succeed.)-.1 F
+(If)5.464 E(not, the mail is bounced.)144 165.6 Q(\(Local deli)5 E -.15
+(ve)-.25 G(ry stuf).15 E(f.\))-.25 E F1(sm: Not used)144 189.6 Q F0(W)
+108 218.4 Q F1(sendmail, sm: Not used)26.56 E F0(x)108 247.2 Q F1
+(sendmail:)31 E F0 2.5(A`)2.5 G(`Full-Name:')-3.24 E 2.5('h)-.74 G
+(eader is w)-2.5 E(anted.)-.1 E F1(sm: Not implemented/used)144 271.2 Q
+F0(X)108 300 Q F1 .742(sendmail, sm:)28.78 F F0 .742(does SMTP-lik)3.242
+F 3.242(e')-.1 G .742
+(hidden-dot' algorithm of doubling all dots that are at the start of)
+-3.242 F(the line.)144 312 Q 1.3 -.65(y, Y)108 340.8 T F1
+(sendmail, sm: Not used)20.08 E F0(z)108 369.6 Q F1(sendmail:)31.56 E F0
+.429(Run Local Mail T)2.929 F .429
+(ransfer protocol \(LMTP\) between sendmail and the local mailer)-.35 F
+5.43(.S)-.55 G(ee)-5.43 E(RFC 2033.)144 381.6 Q F1
+(sm: Not implemented/used.)144 405.6 Q F0(Z)108 434.4 Q F1
+(sendmail, sm: Not used)29.89 E F0(The)108 463.2 Q F1(path)2.87 E F0 .37
(\214eld speci\214es the location of the deli)2.87 F -.15(ve)-.25 G .37
(ry program.).15 F(Relati)5.37 E .67 -.15(ve p)-.25 H .37
-(athnames are allo).15 F .37(wed and are rela-)-.25 F(ti)108 480 Q .3
+(athnames are allo).15 F .37(wed and are rela-)-.25 F(ti)108 475.2 Q .3
-.15(ve t)-.25 H 2.5(ot).15 G(he)-2.5 E F1(MAILBIN)2.5 E F0(directory)
2.5 E 2.5(,b)-.65 G(ut also dollar)-2.7 E(-e)-.2 E
-(xpressions of type: ${ZENV)-.15 E(AR})-1.35 E(The)108 496.8 Q F1(ar)
-2.704 E(guments)-.37 E F0 .204(\214eld e)2.704 F .205
+(xpressions of type: ${ZENV)-.15 E(AR})-1.35 E(The)108 492 Q F1(ar)2.704
+E(guments)-.37 E F0 .204(\214eld e)2.704 F .205
(xtends to the end of the line.)-.15 F .205
(It contains whitespace-separated ar)5.205 F .205(gv parameters which)
--.18 F(may contain one of the follo)108 508.8 Q(wing sequences:)-.25 E
-23.5($g which)108 525.6 R(is replaced by the sender address.)2.5 E 23.5
-($h which)108 542.4 R(is replaced by the destination host.)2.5 E 23.5
-($u which)108 559.2 R .141(is replaced by the recipient address.)2.641 F
+-.18 F(may contain one of the follo)108 504 Q(wing sequences:)-.25 E
+23.5($g which)108 520.8 R(is replaced by the sender address.)2.5 E 23.5
+($h which)108 537.6 R(is replaced by the destination host.)2.5 E 23.5
+($u which)108 554.4 R .141(is replaced by the recipient address.)2.641 F
.14(If the \255m mailer \215ag is set and there are se)5.141 F -.15(ve)
-.25 G .14(ral recipi-).15 F 1.602(ents for this message, the ar)144
-571.2 R 1.603
+566.4 R 1.603
(gument containing the $u will be replicated as necessary for each)-.18
-F 2.5(recipient. \(Also)144 583.2 R(${ZENV)2.5 E(AR} e)-1.35 E
-(xpressions are allo)-.15 E(wed!\))-.25 E/F3 10.95/Times-Bold@0 SF
-(INTERF)72 600 Q -.602(AC)-.986 G(E).602 E F0 1.525
-(This program reads in processable \214le names relati)108 612 R 1.825
+F 2.5(recipient. \(Also)144 578.4 R(${ZENV)2.5 E(AR} e)-1.35 E
+(xpressions are allo)-.15 E(wed!\))-.25 E/F2 10.95/Times-Bold@0 SF
+(INTERF)72 595.2 Q -.602(AC)-.986 G(E).602 E F0 1.525
+(This program reads in processable \214le names relati)108 607.2 R 1.825
-.15(ve t)-.25 H 4.025(ot).15 G 1.525(he current w)-4.025 F 1.524
-(orking directory of the scheduler)-.1 F(\(namely:)108 624 Q F1
+(orking directory of the scheduler)-.1 F(\(namely:)108 619.2 Q F1
($POSTIOFFICE/tr)2.932 E(ansport/)-.15 E F0 2.932(\). Optionally)B .433
(on the same line the scheduler may tell which host is to)2.933 F
-(be look)108 636 Q(ed for from the recipients of the message.)-.1 E F1
--.37(re)180 660 S(lative-spool-path).37 E F0 2.5([<)2.5 G -.93(TA)-2.5 G
-(B>).93 E F1(hostname)2.5 E F0(])2.5 E
-(This program produces diagnostic output on the standard output.)108
-676.8 Q(Normal diagnostic output is of the form:)5 E F1(id)180 700.8 Q
-F0(/)A F1(of)A(fset)-.18 E F0(<T)A(AB>)-.93 E F1(notify-data)A F0(<T)A
-(AB>)-.93 E F1(status messa)A -.1(ge)-.1 G F0(where)108 724.8 Q F1(id)
-3.666 E F0 1.166(is the inode number of the message \214le,)3.666 F F1
-(of)3.666 E(fset)-.18 E F0 1.165(is a byte of)3.665 F 1.165
-(fset within its control \214le where the)-.25 F 2.5(2S)283.5 768 S
-(ep 1998)-2.5 E(2)206.5 E EP
-%%Page: 3 3
+(be look)108 631.2 Q(ed for from the recipients of the message.)-.1 E F1
+-.37(re)180 655.2 S(lative-spool-path).37 E F0 2.5([<)2.5 G -.93(TA)-2.5
+G(B>).93 E F1(hostname)2.5 E F0(])2.5 E
+(This program produces diagnostic output on the standard output.)108 672
+Q(Normal diagnostic output is of the form:)5 E F1(id)180 696 Q F0(/)A F1
+(of)A(fset)-.18 E F0(<T)A(AB>)-.93 E F1(notify-data)A F0(<T)A(AB>)-.93 E
+F1(status messa)A -.1(ge)-.1 G F0(where)108 720 Q F1(id)3.666 E F0 1.166
+(is the inode number of the message \214le,)3.666 F F1(of)3.666 E(fset)
+-.18 E F0 1.165(is a byte of)3.665 F 1.165
+(fset within its control \214le where the)-.25 F(26 Sep 2000)281 768 Q
+(6)204 E EP
+%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
@@ -418,8 +590,8 @@
(This program authored and cop)108 235.2 Q(yright by:)-.1 E
(Rayan Zachariassen <[email protected]>)108 247.2 Q(Se)108 259.2 Q
-.15(ve)-.25 G(ral e).15 E(xtensions by:)-.15 E
-(Matti Aarnio <[email protected].\214>)108 271.2 Q 2.5(2S)283.5 768 S
-(ep 1998)-2.5 E(3)206.5 E EP
+(Matti Aarnio <[email protected].\214>)108 271.2 Q(26 Sep 2000)281 768 Q(7)
+204 E EP
%%Trailer
end
%%EOF
Index: man/smtp.8
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/smtp.8,v
retrieving revision 1.11
retrieving revision 1.15
diff -u -r1.11 -r1.15
--- man/smtp.8  2000/07/30 15:30:12     1.11
+++ man/smtp.8  2000/10/12 20:00:48     1.15
@@ -1,13 +1,13 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/smtp.8,v 1.11 2000/07/30 15:30:12 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/smtp.8,v 1.15 2000/10/12 20:00:48 mea Exp $
.ds ]W ZMailer 2.99
-.TH SMTP 8 "20 Jun 2000"
+.TH SMTP 8 "13 Oct 2000"
.SH NAME
.B smtp
\- zmailer SMTP client transport agent
.SH SYNOPSIS
.B smtp
[
-.B \-678deEHrPsVxW
+.B \-678deEHMrPsVxW
]
[
.B \-c
@@ -65,6 +65,14 @@
.IP \-7
forces SMTP channel to be 7-bit, and thus forcing all 8-bit texts to be
MIME-QP-encoded for the transport.
+.IP \-77
+This does same as
+.I \-7
+but also blocks of all ESMTP extensions from use.
+
+This ``double-7'' option can be followed by ``\-8'' option to force the
+channel to be 8-bit transparent, and even to decode MIME-QP TEXT/PLAIN,
+but to do it without any ESMTP.
.IP \-8
forces SMTP channel to be 8-bit-clean, and as such, to decode the message
while transporting it (is it is MIME QP encoded).
@@ -119,6 +127,12 @@
copied.  Each line in the log will be prefixed with the process id of
the transport agent process, so the same log file can be used by all SMTP
clients.
+.IP \-M
+specifies that system shall run in RFC 2033 specified
+.I LMTP
+mode when contacting remote systems.
+Usage of this option requires also that destination port is defined,
+and is not the SMTP default of 25.
.IP \-r
asks to set up SMTP connections using a source TCP port number under 1024.
This is in the range of port numbers only available to a privileged process
@@ -288,6 +302,7 @@
RFC 1891        ESMTP DSN
RFC 1893/2034   ESMTP ENHANCEDSTATUSCODES
RFC 1985        ESMTP ETRN
+RFC 2033        LMTP client mode
RFC 2487        ESMTP STARTTLS
RFC 2554+M$ Exchange    ESMTP AUTH LOGIN
RFC 2554+NetScape       ESMTP AUTH=LOGIN
@@ -298,6 +313,6 @@
.br
Rayan Zachariassen <[email protected]>
.br
-MIME downconverting feature (RFC1428) by:
+Heaps of extended SMTP facilities by:
.br
-Matti Aarnio <[email protected]>
+Matti Aarnio <[email protected]>
Index: man/smtp.8.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/smtp.8.ps,v
retrieving revision 1.23
retrieving revision 1.29
diff -u -r1.23 -r1.29
--- man/smtp.8.ps       2000/09/04 12:54:22     1.23
+++ man/smtp.8.ps       2000/10/16 11:32:39     1.29
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:35 2000
+%%CreationDate: Fri Oct 13 17:53:37 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -207,16 +207,16 @@
/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R/F1 10.95
/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E/F2 10/Times-Bold@0 SF(smtp)
108 96 Q F0 2.5<ad7a>2.5 G(mailer SMTP client transport agent)-2.5 E F1
-(SYNOPSIS)72 112.8 Q F2(smtp)108 124.8 Q F0([)2.567 E F2
-(\255678deEHrPsVxW)2.567 E F0 2.567(][)2.567 G F2<ad63>A/F3 10
-/Times-Italic@0 SF -.15(ch)2.567 G(annel).15 E F0 2.567(][)2.567 G F2
-<ad68>A F3(heloname)2.567 E F0 2.567(][)2.567 G F2<ad6c>-.001 E F3(lo)
-2.566 E(g\214le)-.1 E F0 2.566(][)2.566 G F2<ad70>A F3 -.37(re)2.566 G
-(mote-port).37 E F0 2.566(][)2.566 G F2<ad54>A F3(timeouts)2.566 E F0(])
-2.566 E([)108 136.8 Q F2<ad53>2.5 E F3(/path/to/smtp-tls.conf)2.5 E F0
-2.5(][)2.5 G F2<ad46>A F3(for)2.5 E(cedest)-.37 E F0 2.5(][)2.5 G F2
-<ad4c>A F3(localidentity)2.5 E F0(])2.5 E F3(host)2.5 E F1(DESCRIPTION)
-72 153.6 Q F3(smtp)108 165.6 Q F0 .792
+(SYNOPSIS)72 112.8 Q F2(smtp)108 124.8 Q F0([)3.012 E F2
+(\255678deEHMrPsVxW)3.012 E F0 3.012(][)3.012 G F2<ad63>A/F3 10
+/Times-Italic@0 SF -.15(ch)3.012 G(annel).15 E F0 3.012(][)3.012 G F2
+<ad68>A F3(heloname)3.012 E F0 3.012(][)3.012 G F2<ad6c>A F3(lo)3.012 E
+(g\214le)-.1 E F0 3.012(][)3.012 G F2<ad70>A F3 -.37(re)3.012 G
+(mote-port).37 E F0 3.011(][)3.011 G F2<ad54>A F3(time-)3.011 E(outs)108
+136.8 Q F0 2.5(][)2.5 G F2<ad53>A F3(/path/to/smtp-tls.conf)2.5 E F0 2.5
+(][)2.5 G F2<ad46>A F3(for)2.5 E(cedest)-.37 E F0 2.5(][)2.5 G F2<ad4c>A
+F3(localidentity)2.5 E F0(])2.5 E F3(host)2.5 E F1(DESCRIPTION)72 153.6
+Q F3(smtp)108 165.6 Q F0 .792
(is a ZMailer transport agent which is usually only run by the)3.292 F
F3(sc)3.292 E(heduler)-.15 E F0 .793(\(8\) to transfer messages to a).73
F .317(remote Internet host using the SMTP protocol. The)108 177.6 R F3
@@ -236,224 +236,236 @@
E(et and addresses, if a)-.1 E -.25(va)-.2 G(ilable.).25 E 22.86
(\2557 forces)108 288 R .44
(SMTP channel to be 7-bit, and thus forcing all 8-bit te)2.94 F .44
-(xts to be MIME-QP-encoded for the)-.15 F(transport.)144 300 Q 22.86
-(\2558 forces)108 316.8 R .793(SMTP channel to be 8-bit-clean, and as s\
-uch, to decode the message while transporting it)3.293 F
-(\(is it is MIME QP encoded\).)144 328.8 Q<ad63>108 345.6 Q F3 -.15(ch)
-2.5 G(annel).15 E F0(speci\214es which channel name should be k)144
-357.6 Q -.15(ey)-.1 G(ed on.).15 E(The def)5 E(ault is)-.1 E F2(smtp)2.5
-E F0(.)A 22.86(\255d turns)108 374.4 R(on deb)2.5 E(ugging output.)-.2 E
-23.42(\255e asks)108 391.2 R .204(that for e)2.704 F -.15(ve)-.25 G .203
-(ry destination address speci\214cation with a matching channel name, a\
-n MX lookup).15 F .737(is done on the hostname to see whether the curre\
-ntly connected host can pro)144 403.2 R .737(vide service for that)-.15
-F 2.974(destination. The)144 415.2 R(def)2.974 E .474
-(ault is to just do a te)-.1 F .474
-(xtual name comparison with the destination hostname as)-.15 F(gi)144
-427.2 Q -.15(ve)-.25 G 2.5(no).15 G 2.5(nt)-2.5 G(he command line.)-2.5
-E 21.75(\255E use)108 444 R(the "EHLO"-greeting)2.5 E F2(only)2.5 E F0
-(if the remote serv)2.5 E(er initial banner reports "ESMTP" on it.)-.15
-E<ad68>108 460.8 Q F3(host)2.5 E F0 1.094
+(xts to be MIME-QP-encoded for the)-.15 F(transport.)144 300 Q 17.86
+(\25577 This)108 316.8 R(does same as)2.5 E F3<ad37>2.5 E F0 -.2(bu)2.5
+G 2.5(ta).2 G(lso blocks of all ESMTP e)-2.5 E(xtensions from use.)-.15
+E .345(This `)144 340.8 R(`double-7')-.74 E 2.845('o)-.74 G .345
+(ption can be follo)-2.845 F .345(wed by `)-.25 F(`\2558')-.74 E 2.845
+('o)-.74 G .345(ption to force the channel to be 8-bit transpar)-2.845 F
+(-)-.2 E(ent, and e)144 352.8 Q -.15(ve)-.25 G 2.5(nt).15 G 2.5(od)-2.5
+G(ecode MIME-QP TEXT/PLAIN, b)-2.5 E(ut to do it without an)-.2 E 2.5
+(yE)-.15 G(SMTP)-2.5 E(.)-1.11 E 22.86(\2558 forces)108 369.6 R .793(SM\
+TP channel to be 8-bit-clean, and as such, to decode the message while \
+transporting it)3.294 F(\(is it is MIME QP encoded\).)144 381.6 Q<ad63>
+108 398.4 Q F3 -.15(ch)2.5 G(annel).15 E F0
+(speci\214es which channel name should be k)144 410.4 Q -.15(ey)-.1 G
+(ed on.).15 E(The def)5 E(ault is)-.1 E F2(smtp)2.5 E F0(.)A 22.86
+(\255d turns)108 427.2 R(on deb)2.5 E(ugging output.)-.2 E 23.42
+(\255e asks)108 444 R .203(that for e)2.703 F -.15(ve)-.25 G .204(ry de\
+stination address speci\214cation with a matching channel name, an MX l\
+ookup).15 F .737(is done on the hostname to see whether the currently c\
+onnected host can pro)144 456 R .736(vide service for that)-.15 F 2.974
+(destination. The)144 468 R(def)2.974 E .474(ault is to just do a te)-.1
+F .474(xtual name comparison with the destination hostname as)-.15 F(gi)
+144 480 Q -.15(ve)-.25 G 2.5(no).15 G 2.5(nt)-2.5 G(he command line.)
+-2.5 E 21.75(\255E use)108 496.8 R(the "EHLO"-greeting)2.5 E F2(only)2.5
+E F0(if the remote serv)2.5 E(er initial banner reports "ESMTP" on it.)
+-.15 E<ad68>108 513.6 Q F3(host)2.5 E F0 1.094
(speci\214es the hostname for the SMTP)6.19 F F2(HELO)3.594 E F0 3.594
(greeting. The)3.594 F(def)3.594 E 1.094
(ault is the hostname of the local)-.1 F(system, as returned by)144
-472.8 Q F3 -.1(ge)2.5 G(thostname).1 E F0(\(2\) or).18 E F3(uname)2.5 E
-F0(\(2\).).18 E<ad46>108 489.6 Q F3(for)2.5 E(cedest)-.37 E F0 -.15(ove)
-144 501.6 S .612(rrides deli).15 F -.15(ve)-.25 G .612
+525.6 Q F3 -.1(ge)2.5 G(thostname).1 E F0(\(2\) or).18 E F3(uname)2.5 E
+F0(\(2\).).18 E<ad46>108 542.4 Q F3(for)2.5 E(cedest)-.37 E F0 -.15(ove)
+144 554.4 S .612(rrides deli).15 F -.15(ve)-.25 G .612
(ry destination by forceing).15 F F2(all)3.112 E F0 .612
(email to be sent to gi)3.112 F -.15(ve)-.25 G(n).15 E F3(for)3.112 E
(cedest)-.37 E F0 .612(hostname, or lit-)3.112 F(eral [IP-number].)144
-513.6 Q 20.64(\255H Disable)108 530.4 R(the per def)2.5 E(ault acti)-.1
+566.4 Q 20.64(\255H Disable)108 583.2 R(the per def)2.5 E(ault acti)-.1
E .3 -.15(ve f)-.25 H(orced 8-bit headers con).15 E -.15(ve)-.4 G
-(rsion into).15 E F3(MIME-2)2.5 E F0(-format.).02 E<ad4c>108 547.2 Q F3
+(rsion into).15 E F3(MIME-2)2.5 E F0(-format.).02 E<ad4c>108 600 Q F3
(localident)2.5 E F0 1.025
-(speci\214es \(for multi-homed machines\) that the)144 559.2 R 3.525(ys)
+(speci\214es \(for multi-homed machines\) that the)144 612 R 3.525(ys)
-.15 G 1.025(hould use speci\214ed identity when connecting to)-3.525 F
-.385(the destination.)144 571.2 R .385(Think of serv)5.385 F .385
-(er with multiple IP numbers due to virtual hosting, for e)-.15 F 2.884
-(xample. At)-.15 F .482(such systems there may be situation when virtua\
-l identity needs to be used for reaching the desti-)144 583.2 R
-(nation system.)144 595.2 Q(Understood formats for local identity are:)
-144 619.2 Q 2.5(-")144 643.2 S(if)-2.5 E(ace:eth0" -- \(eth0 de)-.1 E
-(vice in the system\))-.25 E 2.5(-")144 655.2 S
+.384(the destination.)144 624 R .384(Think of serv)5.384 F .385
+(er with multiple IP numbers due to virtual hosting, for e)-.15 F 2.885
+(xample. At)-.15 F .483(such systems there may be situation when virtua\
+l identity needs to be used for reaching the desti-)144 636 R
+(nation system.)144 648 Q(Understood formats for local identity are:)144
+672 Q 2.5(-")144 696 S(if)-2.5 E(ace:eth0" -- \(eth0 de)-.1 E
+(vice in the system\))-.25 E 2.5(-")144 708 S
([ipv6.1111:2222:3333:...]" -- Literal IPv6 address for IPv6 system)-2.5
-E 2.5(-")144 667.2 S
-([1.2.3.4]" -- Literal IPv4 address for non-IPv6 system)-2.5 E 2.5(-")
-144 679.2 S(some.host.name" -- DNS/hosts data re)-2.5 E(gistered name)
--.15 E(20 Jun 2000)281.555 768 Q(1)204.555 E EP
+E 2.5(-")144 720 S
+([1.2.3.4]" -- Literal IPv4 address for non-IPv6 system)-2.5 E
+(13 Oct 2000)281.28 768 Q(1)204.28 E EP
%%Page: 2 2
%%BeginPageSetup
BP
%%EndPageSetup
-/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R<ad6c>108 84 Q
-/F1 10/Times-Italic@0 SF(lo)2.5 E(g\214le)-.1 E F0 .792(speci\214es a l\
-og \214le where the complete SMTP command transaction will be copied.)
-144 96 R .792(Each line in)5.792 F .355(the log will be pre\214x)144 108
-R .356(ed with the process id of the transport agent process, so the sa\
-me log \214le can)-.15 F(be used by all SMTP clients.)144 120 Q 24.53
-(\255r asks)108 136.8 R 1.416
+/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R 2.5(-")144 84
+S(some.host.name" -- DNS/hosts data re)-2.5 E(gistered name)-.15 E<ad6c>
+108 112.8 Q/F1 10/Times-Italic@0 SF(lo)2.5 E(g\214le)-.1 E F0 .792(spec\
+i\214es a log \214le where the complete SMTP command transaction will b\
+e copied.)144 124.8 R .792(Each line in)5.792 F .356
+(the log will be pre\214x)144 136.8 R .356(ed with the process id of th\
+e transport agent process, so the same log \214le can)-.15 F
+(be used by all SMTP clients.)144 148.8 Q 18.97(\255M speci\214es)108
+165.6 R 1.025(that system shall run in RFC 2033 speci\214ed)3.525 F F1
+(LMTP)3.525 E F0 1.025(mode when contacting remote sys-)3.525 F 4.039
+(tems. Usage)144 177.6 R 1.539(of this option requires also that destin\
+ation port is de\214ned, and is not the SMTP)4.039 F(def)144 189.6 Q
+(ault of 25.)-.1 E 24.53(\255r asks)108 206.4 R 1.416
(to set up SMTP connections using a source TCP port number under 1024.)
-3.916 F 1.415(This is in the)6.416 F .905(range of port numbers only a)
-144 148.8 R -.25(va)-.2 G .905(ilable to a pri).25 F(vile)-.25 E .906
+3.915 F 1.416(This is in the)6.416 F .906(range of port numbers only a)
+144 218.4 R -.25(va)-.2 G .905(ilable to a pri).25 F(vile)-.25 E .905
(ged process on some UNIX systems, which has)-.15 F(led to some misguid\
-ed attempts at mail security based on this mechanism.)144 160.8 Q 23.97
-(\255s asks)108 177.6 R .634(to report the progress of the SMTP con)
-3.135 F -.15(ve)-.4 G .634
+ed attempts at mail security based on this mechanism.)144 230.4 Q 23.97
+(\255s asks)108 247.2 R .634(to report the progress of the SMTP con)
+3.134 F -.15(ve)-.4 G .634
(rsation and data transfer on the command line in a).15 F -.1(wa)144
-189.6 S 2.5(yt).1 G(hat will be visible to)-2.5 E F1(ps)2.5 E F0(\(1\).)
-.27 E 22.86(\255x turns)108 206.4 R(of)3.472 E 3.472(fM)-.25 G 3.472(Xl)
--3.472 G .972(ookups on deli)-3.472 F -.15(ve)-.25 G .972
+259.2 S 2.5(yt).1 G(hat will be visible to)-2.5 E F1(ps)2.5 E F0(\(1\).)
+.27 E 22.86(\255x turns)108 276 R(of)3.473 E 3.473(fM)-.25 G 3.472(Xl)
+-3.473 G .972(ookups on deli)-3.472 F -.15(ve)-.25 G .972
(ry connections.).15 F .972(This may be used ignore public MX kno)5.972
-F(wledge)-.25 E .448(and do e)144 218.4 R .448
+F(wledge)-.25 E .447(and do e)144 288 R .447
(xactly what the router says in cases where deli)-.15 F -.15(ve)-.25 G
-.447(ring to an e).15 F .447(xplicit IP address is inappro-)-.15 F
-(priate.)144 230.4 Q 22.3(\255P disable)108 247.2 R
+.448(ring to an e).15 F .448(xplicit IP address is inappro-)-.15 F
+(priate.)144 300 Q 22.3(\255P disable)108 316.8 R
(SMTP-PIPELINING usage \(ESMTP k)2.5 E -.15(ey)-.1 G -.1(wo).15 G
-(rd: PIPELINING\)).1 E<ad53>108 264 Q F1(/path/to/smtp-tls.conf)2.5 E F0
--.35(Tr)144 276 S(ansport-Layer).35 E 2.267
-(-Security \(a.k.a. Secure-Sock)-.2 F 2.267
-(et-Layer\) feature con\214guration \214le.)-.1 F 2.268(When this is)
-7.268 F .309(supplied, and system is compiled to possibly use it, and t\
-he remote system reports EHLO capabil-)144 288 R .15(ity of)144 300 R/F2
-10/Times-Bold@0 SF(ST)2.65 E(AR)-.9 E(TTLS)-.4 E F0 2.65(,t)C .151
-(his client attempts to turn on the encryption on the sock)-2.65 F 2.651
-(et. There)-.1 F -.15(ex)2.651 G .151(ists also a).15 F .202
-(posssibility of)144 312 R F1(demanding)2.702 E F0 .201
+(rd: PIPELINING\)).1 E<ad53>108 333.6 Q F1(/path/to/smtp-tls.conf)2.5 E
+F0 -.35(Tr)144 345.6 S(ansport-Layer).35 E 2.268
+(-Security \(a.k.a. Secure-Sock)-.2 F 2.268
+(et-Layer\) feature con\214guration \214le.)-.1 F 2.267(When this is)
+7.267 F .309(supplied, and system is compiled to possibly use it, and t\
+he remote system reports EHLO capabil-)144 357.6 R .151(ity of)144 369.6
+R/F2 10/Times-Bold@0 SF(ST)2.651 E(AR)-.9 E(TTLS)-.4 E F0 2.651(,t)C
+.151(his client attempts to turn on the encryption on the sock)-2.651 F
+2.65(et. There)-.1 F -.15(ex)2.65 G .15(ists also a).15 F .201
+(posssibility of)144 381.6 R F1(demanding)2.701 E F0 .201
(TLS mode of the connection - if so has been demand, b)2.701 F .201
(ut it is not a)-.2 F -.25(va)-.2 G(il-).25 E(able, email is not sent o)
-144 324 Q -.15(ve)-.15 G 2.5(rt).15 G(he connection.)-2.5 E(-T)108 340.8
-Q F1(timeouts)2.5 E F0(speci\214es the timeouts when w)144 352.8 Q
+144 393.6 Q -.15(ve)-.15 G 2.5(rt).15 G(he connection.)-2.5 E(-T)108
+410.4 Q F1(timeouts)2.5 E F0(speci\214es the timeouts when w)144 422.4 Q
(aiting for v)-.1 E(arious things.)-.25 E(Possible submodes are:)5 E
-(conn=)144 369.6 Q F1(3m)A F0 -.35(Ti)180 381.6 S(meout to w).35 E
+(conn=)144 439.2 Q F1(3m)A F0 -.35(Ti)180 451.2 S(meout to w).35 E
(ait for the TCP connection establishment.)-.1 E(The def)5 E
-(ault is 3 minutes.)-.1 E(tcpw=)144 398.4 Q F1(3m)A F0 -.35(Ti)180 410.4
-S 1.326(meout to w).35 F 1.326(ait at lo)-.1 F(wle)-.25 E -.15(ve)-.25 G
-3.826(lT).15 G 1.326(CP sock)-3.826 F 1.327
-(et write\(\) routines for the sock)-.1 F 1.327(et to accept some)-.1 F
-(more input.)180 422.4 Q(The def)5 E(ault is 5 minutes.)-.1 E(cmd=)144
-439.2 Q F1(5m)A F0(\(or plain v)2.5 E(alue\))-.25 E -.8(Wa)180 451.2 S
+(ault is 3 minutes.)-.1 E(tcpw=)144 468 Q F1(3m)A F0 -.35(Ti)180 480 S
+1.327(meout to w).35 F 1.327(ait at lo)-.1 F(wle)-.25 E -.15(ve)-.25 G
+3.827(lT).15 G 1.327(CP sock)-3.827 F 1.326
+(et write\(\) routines for the sock)-.1 F 1.326(et to accept some)-.1 F
+(more input.)180 492 Q(The def)5 E(ault is 5 minutes.)-.1 E(cmd=)144
+508.8 Q F1(5m)A F0(\(or plain v)2.5 E(alue\))-.25 E -.8(Wa)180 520.8 S
(iting for command replies \(e.g. MAIL FR).8 E(OM, et.al.\))-.4 E
-(The def)5 E(ault is 5 minutes.)-.1 E(data=)144 468 Q F1(2m)A F0
-(From "D)180 480 Q -1.21 -1.11(AT A)-.4 H 2.5("v)1.11 G
+(The def)5 E(ault is 5 minutes.)-.1 E(data=)144 537.6 Q F1(2m)A F0
+(From "D)180 549.6 Q -1.21 -1.11(AT A)-.4 H 2.5("v)1.11 G
(erb issuance until "354" responce.)-2.65 E(The def)5 E
-(ault is 2 minutes.)-.1 E(dot=)144 496.8 Q F1(10m)A F0 .077(From "D)180
-508.8 R -1.21 -1.11(AT A)-.4 H 2.577("p)1.11 G .076
+(ault is 2 minutes.)-.1 E(dot=)144 566.4 Q F1(10m)A F0 .076(From "D)180
+578.4 R -1.21 -1.11(AT A)-.4 H 2.576("p)1.11 G .076
(hase ending "." issuance until "250 OK" report reception \(this is)
--2.577 F F2(after)2.576 E F0(the)2.576 E .334
-(TCP write pipeline has completed\).)180 520.8 R .334(The def)5.334 F
-.334(ault is 20 minutes. \(RFC 1123 gi)-.1 F -.15(ve)-.25 G 2.835(s1).15
-G 2.835(0m)-2.835 G(in-)-2.835 E(utes.\))180 532.8 Q 20.64(\255V prints)
-108 549.6 R 2.5(av)2.5 G(ersion message and e)-2.65 E(xits.)-.15 E 18.42
-(\255W turns)108 566.4 R .391
-(on the DNS WKS checking, and if the remote system does not ha)2.892 F
-.691 -.15(ve S)-.2 H .391(MTP in its WKS-bits,).15 F(email deli)144
-578.4 Q -.15(ve)-.25 G
-(ry to such address is aborted with an error message.).15 E/F3 10.95
-/Times-Bold@0 SF(INTERF)72 595.2 Q -.602(AC)-.986 G(E).602 E F0 1.524
-(This program reads in processable \214le names relati)108 607.2 R 1.825
--.15(ve t)-.25 H 4.025(ot).15 G 1.525(he current w)-4.025 F 1.525
-(orking directory of the scheduler)-.1 F(\(namely:)108 619.2 Q F1
-($POSTIOFFICE/tr)2.933 E(ansport/)-.15 E F0 2.933(\). Optionally)B .433
+-2.576 F F2(after)2.577 E F0(the)2.577 E .335
+(TCP write pipeline has completed\).)180 590.4 R .334(The def)5.334 F
+.334(ault is 20 minutes. \(RFC 1123 gi)-.1 F -.15(ve)-.25 G 2.834(s1).15
+G 2.834(0m)-2.834 G(in-)-2.834 E(utes.\))180 602.4 Q 20.64(\255V prints)
+108 619.2 R 2.5(av)2.5 G(ersion message and e)-2.65 E(xits.)-.15 E 18.42
+(\255W turns)108 636 R .391
+(on the DNS WKS checking, and if the remote system does not ha)2.891 F
+.691 -.15(ve S)-.2 H .392(MTP in its WKS-bits,).15 F(email deli)144 648
+Q -.15(ve)-.25 G(ry to such address is aborted with an error message.)
+.15 E/F3 10.95/Times-Bold@0 SF(INTERF)72 664.8 Q -.602(AC)-.986 G(E).602
+E F0 1.525(This program reads in processable \214le names relati)108
+676.8 R 1.825 -.15(ve t)-.25 H 4.025(ot).15 G 1.525(he current w)-4.025
+F 1.524(orking directory of the scheduler)-.1 F(\(namely:)108 688.8 Q F1
+($POSTIOFFICE/tr)2.932 E(ansport/)-.15 E F0 2.932(\). Optionally)B .433
(on the same line the scheduler may tell which host is to)2.933 F
-(be look)108 631.2 Q(ed for from the recipients of the message.)-.1 E F1
--.37(re)144 648 S(lative-spool-path).37 E F0 2.5([<)2.5 G -.93(TA)-2.5 G
-(B>).93 E F1(hostname)2.5 E F0(])2.5 E
-(This program produces diagnostic output on the standard output.)108
-664.8 Q(Normal diagnostic output is of the form:)5 E F1(id)144 681.6 Q
-F0(/)A F1(of)A(fset)-.18 E F0(<T)A(AB>)-.93 E F1(notify-data)A F0(<T)A
-(AB>)-.93 E F1(status messa)A -.1(ge)-.1 G F0(where)108 698.4 Q F1(id)
-3.665 E F0 1.165(is the inode number of the message \214le,)3.665 F F1
-(of)3.665 E(fset)-.18 E F0 1.166(is a byte of)3.666 F 1.166
-(fset within its control \214le where the)-.25 F .915
-(address being reported on is k)108 710.4 R(ept,)-.1 E F1(status)3.415 E
-F0 .915(is one of)3.415 F F2(ok)3.415 E F0(,)A F2(err)3.415 E(or)-.18 E
-F0 3.415(,o)C(r)-3.415 E F2(deferr)3.415 E(ed)-.18 E F0 3.415(,a)C .915
-(nd the)-3.415 F F1(messa)3.415 E -.1(ge)-.1 G F0 .915(is descripti)
-3.515 F -.15(ve)-.25 G(te)108 722.4 Q 2.027
-(xt associated with the report.)-.15 F 2.027(The te)7.027 F 2.027
-(xt is terminated by a linefeed.)-.15 F(An)7.027 E 4.527(yo)-.15 G 2.027
-(ther format \(as might be)-4.527 F(20 Jun 2000)281.555 768 Q(2)204.555
-E EP
+(be look)108 700.8 Q(ed for from the recipients of the message.)-.1 E F1
+-.37(re)144 717.6 S(lative-spool-path).37 E F0 2.5([<)2.5 G -.93(TA)-2.5
+G(B>).93 E F1(hostname)2.5 E F0(])2.5 E(13 Oct 2000)281.28 768 Q(2)
+204.28 E EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
-/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R(produced by \
-subprocesses\) is passed to standard output for logging in the)108 84 Q
-/F1 10/Times-Bold@0 SF(scheduler)2.5 E F0(log.)2.5 E(The e)108 100.8 Q
-(xit status is a code from)-.15 E F1(<sysexits.h>)2.5 E F0(.)A/F2 10.95
-/Times-Bold@0 SF(EXTENDED SMTP)72 117.6 Q F0 1.339(When user sends out \
-8-bit mail with proper headers, this module can send it out to conformi\
-ng serv)108 129.6 R(ers)-.15 E 2.887(either in 8-bit transparent manner)
-108 141.6 R 5.387(,o)-.4 G 5.387(rd)-5.387 G -.25(ow)-5.387 G(n-con).25
-E -.15(ve)-.4 G(rting).15 E/F3 10/Times-Italic@0 SF(Content-T)5.387 E
--.15(ra)-.55 G(nsfer).15 E 2.887(-Encoding: 8BIT)-.2 F F0(to)5.387 E F3
-(Content-)5.387 E -1.55 -.55(Tr a)108 153.6 T(nsfer).55 E .506
-(-Encoding: 7BIT)-.2 F F0(or)3.006 E F3(Content-T)3.006 E -.15(ra)-.55 G
-(nsfer).15 E .506(-Encoding: Q)-.2 F(UO)-.1 E(TED-PRINT)-.4 E(ABLE)-.5 E
-F0 .505(depending on what is the)3.006 F(mail contents.)108 165.6 Q F1
-(This w)108 177.6 Q(orks only with)-.1 E F3(Content-T)2.5 E(ype: te)-.74
-E(xt/plain)-.2 E F1(thus no fancy multipart/alter)2.5 E
-(nate et.al. schemes..)-.15 E F0(When)108 189.6 Q F3(Content-T)3.962 E
--.15(ra)-.55 G(nsfer).15 E(-Encoding:)-.2 E F0 1.462(\255header is not \
-present in the headers, and recipient has not declared)3.962 F
-(8-bit SMTP capability)108 201.6 Q 2.5(,m)-.65 G
-(ail contents are treated with old 7-bit stripping method.)-2.5 E F2
-(SECURE SOCKET LA)72 218.4 Q(YER SUPPOR)-1.095 E(T)-.438 E F0 .98
-(If you are using a v)108 230.4 R .98
+/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R
+(This program produces diagnostic output on the standard output.)108 84
+Q(Normal diagnostic output is of the form:)5 E/F1 10/Times-Italic@0 SF
+(id)144 100.8 Q F0(/)A F1(of)A(fset)-.18 E F0(<T)A(AB>)-.93 E F1
+(notify-data)A F0(<T)A(AB>)-.93 E F1(status messa)A -.1(ge)-.1 G F0
+(where)108 117.6 Q F1(id)3.666 E F0 1.166
+(is the inode number of the message \214le,)3.666 F F1(of)3.666 E(fset)
+-.18 E F0 1.165(is a byte of)3.665 F 1.165
+(fset within its control \214le where the)-.25 F .915
+(address being reported on is k)108 129.6 R(ept,)-.1 E F1(status)3.415 E
+F0 .915(is one of)3.415 F/F2 10/Times-Bold@0 SF(ok)3.415 E F0(,)A F2
+(err)3.415 E(or)-.18 E F0 3.415(,o)C(r)-3.415 E F2(deferr)3.415 E(ed)
+-.18 E F0 3.415(,a)C .915(nd the)-3.415 F F1(messa)3.415 E -.1(ge)-.1 G
+F0 .915(is descripti)3.515 F -.15(ve)-.25 G(te)108 141.6 Q .85
+(xt associated with the report.)-.15 F .85(The te)5.85 F .85
+(xt is terminated by a linefeed.)-.15 F(An)5.85 E 3.35(yo)-.15 G .85
+(ther format \(as might be pro-)-3.35 F(duced by subprocesses\) is pass\
+ed to standard output for logging in the)108 153.6 Q F2(scheduler)2.5 E
+F0(log.)2.5 E(The e)108 170.4 Q(xit status is a code from)-.15 E F2
+(<sysexits.h>)2.5 E F0(.)A/F3 10.95/Times-Bold@0 SF(EXTENDED SMTP)72
+187.2 Q F0 1.339(When user sends out 8-bit mail with proper headers, th\
+is module can send it out to conforming serv)108 199.2 R(ers)-.15 E
+2.887(either in 8-bit transparent manner)108 211.2 R 5.387(,o)-.4 G
+5.387(rd)-5.387 G -.25(ow)-5.387 G(n-con).25 E -.15(ve)-.4 G(rting).15 E
+F1(Content-T)5.387 E -.15(ra)-.55 G(nsfer).15 E 2.887(-Encoding: 8BIT)
+-.2 F F0(to)5.387 E F1(Content-)5.387 E -1.55 -.55(Tr a)108 223.2 T
+(nsfer).55 E .505(-Encoding: 7BIT)-.2 F F0(or)3.005 E F1(Content-T)3.005
+E -.15(ra)-.55 G(nsfer).15 E .505(-Encoding: Q)-.2 F(UO)-.1 E(TED-PRINT)
+-.4 E(ABLE)-.5 E F0 .506(depending on what is the)3.006 F
+(mail contents.)108 235.2 Q F2(This w)108 247.2 Q(orks only with)-.1 E
+F1(Content-T)2.5 E(ype: te)-.74 E(xt/plain)-.2 E F2
+(thus no fancy multipart/alter)2.5 E(nate et.al. schemes..)-.15 E F0
+(When)108 259.2 Q F1(Content-T)3.963 E -.15(ra)-.55 G(nsfer).15 E
+(-Encoding:)-.2 E F0 1.462(\255header is not present in the headers, an\
+d recipient has not declared)3.963 F(8-bit SMTP capability)108 271.2 Q
+2.5(,m)-.65 G(ail contents are treated with old 7-bit stripping method.)
+-2.5 E F3(SECURE SOCKET LA)72 288 Q(YER SUPPOR)-1.095 E(T)-.438 E F0 .98
+(If you are using a v)108 300 R .98
(ersion which has been made to use OpenSSL 0.9.4, or latter v)-.15 F .98
(ersion, you are able to)-.15 F(encrypt the SMTP protocol session in ca\
-se the remote end supports RFC 2487 de\214ned)108 242.4 Q F3(ST)2.5 E
-(ARTTLS)-.5 E F0 -.1(fa)2.5 G(cility).1 E(.)-.65 E(Possible e)108 259.2
+se the remote end supports RFC 2487 de\214ned)108 312 Q F1(ST)2.5 E
+(ARTTLS)-.5 E F0 -.1(fa)2.5 G(cility).1 E(.)-.65 E(Possible e)108 328.8
Q(xample of the smtp\255tls.conf)-.15 E(\214le is gi)5 E -.15(ve)-.25 G
-2.5(nb).15 G(elo)-2.5 E(w:)-.25 E(#|)108 276 Q(#| This is e)108 288 Q
-(xample con\214guration \214le for TLS support at the SMTP T)-.15 E(A)
--.93 E(#| programs, e.g. SMTP Client.)108 300 Q(#|)108 312 Q 5
-(tls-cert-\214le @MAIL)108 336 R -1.35(VA)-1 G(R@/db/smtpserv)1.35 E(er)
--.15 E(-cert.pem)-.2 E(tls-k)108 348 Q -.15(ey)-.1 G 7.5(-\214le @MAIL)
-.15 F -1.35(VA)-1 G(R@/db/smtpserv)1.35 E(er)-.15 E(-k)-.2 E -.15(ey)-.1
-G(.pem)-.5 E 12.5(tls-CA\214le @MAIL)108 360 R -1.35(VA)-1 G
-(R@/db/smtpserv)1.35 E(er)-.15 E(-CAcert.pem)-.2 E
-(#tls-CApath /path/to/CAdir/)108 372 Q(#tls-logle)108 384 Q -.15(ve)-.25
-G 5(l0#).15 G -1.11(Va)-2.5 G(lue from 0 thru 4)1.11 E(#|)108 408 Q
-(#| If the TLS mode is MAND)108 420 Q -1.11(AT)-.4 G
+2.5(nb).15 G(elo)-2.5 E(w:)-.25 E(#|)108 345.6 Q(#| This is e)108 357.6
+Q(xample con\214guration \214le for TLS support at the SMTP T)-.15 E(A)
+-.93 E(#| programs, e.g. SMTP Client.)108 369.6 Q(#|)108 381.6 Q 5
+(tls-cert-\214le @MAIL)108 405.6 R -1.35(VA)-1 G(R@/db/smtpserv)1.35 E
+(er)-.15 E(-cert.pem)-.2 E(tls-k)108 417.6 Q -.15(ey)-.1 G 7.5
+(-\214le @MAIL).15 F -1.35(VA)-1 G(R@/db/smtpserv)1.35 E(er)-.15 E(-k)
+-.2 E -.15(ey)-.1 G(.pem)-.5 E 12.5(tls-CA\214le @MAIL)108 429.6 R -1.35
+(VA)-1 G(R@/db/smtpserv)1.35 E(er)-.15 E(-CAcert.pem)-.2 E
+(#tls-CApath /path/to/CAdir/)108 441.6 Q(#tls-logle)108 453.6 Q -.15(ve)
+-.25 G 5(l0#).15 G -1.11(Va)-2.5 G(lue from 0 thru 4)1.11 E(#|)108 477.6
+Q(#| If the TLS mode is MAND)108 489.6 Q -1.11(AT)-.4 G
(ED for a session, cop)1.11 E 2.5(yt)-.1 G(his \214le to)-2.5 E
-(#| e.g. "smtp-tls-mandatory)108 432 Q(.conf", uncomment follo)-.65 E
-(wing line, and)-.25 E(#| point those channels to use that ne)108 444 Q
-2.5<778c>-.25 G(le.)-2.5 E(#|)108 456 Q(#demand-tls-mode)108 468 Q F2
-(FILES)72 484.8 Q F3(/etc/zmailer)108 496.8 Q(.conf)-1.11 E
-(/var/spool/postof)108 508.8 Q(\214ce \(POST)-.18 E(OFFICE\))-.18 E F2
-(SEE ALSO)72 525.6 Q F0(scheduler\(8\))108 537.6 Q F2(SEE ALSO)72 554.4
-Q F0(router\(8\))108 566.4 Q(RFC 821)108 583.2 Q
-(The basic SMTP speci\214cation)146.1 E(RFC 822)108 595.2 Q
-(Mail header format)146.1 E(RFC 974)108 607.2 Q(MX routing)146.1 E
-(RFC 1123)108 619.2 Q -1.11(Va)141.1 G
-(rious 821 parameter clari\214cations)1.11 E(Se)108 643.2 Q -.15(ve)-.25
+(#| e.g. "smtp-tls-mandatory)108 501.6 Q(.conf", uncomment follo)-.65 E
+(wing line, and)-.25 E(#| point those channels to use that ne)108 513.6
+Q 2.5<778c>-.25 G(le.)-2.5 E(#|)108 525.6 Q(#demand-tls-mode)108 537.6 Q
+F3(FILES)72 554.4 Q F1(/etc/zmailer)108 566.4 Q(.conf)-1.11 E
+(/var/spool/postof)108 578.4 Q(\214ce \(POST)-.18 E(OFFICE\))-.18 E F3
+(SEE ALSO)72 595.2 Q F0(scheduler\(8\))108 607.2 Q F3(SEE ALSO)72 624 Q
+F0(router\(8\))108 636 Q(RFC 821)108 652.8 Q
+(The basic SMTP speci\214cation)146.1 E(RFC 822)108 664.8 Q
+(Mail header format)146.1 E(RFC 974)108 676.8 Q(MX routing)146.1 E
+(RFC 1123)108 688.8 Q -1.11(Va)141.1 G
+(rious 821 parameter clari\214cations)1.11 E(Se)108 712.8 Q -.15(ve)-.25
G(ral e).15 E(xtended SMTP f)-.15 E(acilities are implemented:)-.1 E
-(RFC 1341/1521/2045)108 667.2 Q(MIME speci\214cation \(body)95.54 E 2.5
-(,f)-.65 G(ormats\))-2.5 E(RFC 1342/1522/2047)108 679.2 Q
-(MIME speci\214cation \(headers\))95.54 E(RFC 1425/1651/1869)108 691.2 Q
-(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G(rk).1 E(RFC 1426/1652)108 703.2
-Q(ESMTP 8BITMIME)118.32 E(RFC 1427/1653/1870)108 715.2 Q(ESMTP SIZE)
-95.54 E(RFC 1428)108 727.2 Q(Basic MIME con)141.1 E -.15(ve)-.4 G
-(rsion rules).15 E(20 Jun 2000)281.555 768 Q(3)204.555 E EP
+(13 Oct 2000)281.28 768 Q(3)204.28 E EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
-/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R(RFC 1830)108
-84 Q(ESMTP CHUNKING)141.1 E(RFC 1854/2197)108 96 Q(ESMTP PIPELINING)
-118.32 E(RFC 1891)108 108 Q(ESMTP DSN)141.1 E(RFC 1893/2034)108 120 Q
-(ESMTP ENHANCEDST)118.32 E -1.11(AT)-.93 G(USCODES)1.11 E(RFC 1985)108
-132 Q(ESMTP ETRN)141.1 E(RFC 2487)108 144 Q(ESMTP ST)141.1 E(AR)-.93 E
-(TTLS)-.6 E(RFC 2554+M$ Exchange)108 156 Q(ESMTP A)79.64 E(UTH LOGIN)
--.55 E(RFC 2554+NetScape)108 168 Q(ESMTP A)97.14 E(UTH=LOGIN)-.55 E
-(RFC 2852)108 180 Q(ESMTP DELIVERBY)141.1 E/F1 10.95/Times-Bold@0 SF
--.548(AU)72 196.8 S(THOR).548 E F0(This program authored and cop)108
-208.8 Q(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108
-220.8 Q(MIME do)108 232.8 Q(wncon)-.25 E -.15(ve)-.4 G
-(rting feature \(RFC1428\) by:).15 E(Matti Aarnio <mea@utu.\214>)108
-244.8 Q(20 Jun 2000)281.555 768 Q(4)204.555 E EP
+/F0 10/Times-Roman@0 SF 389.94(SMTP\(8\) SMTP\(8\))72 48 R
+(RFC 1341/1521/2045)108 84 Q(MIME speci\214cation \(body)95.54 E 2.5(,f)
+-.65 G(ormats\))-2.5 E(RFC 1342/1522/2047)108 96 Q
+(MIME speci\214cation \(headers\))95.54 E(RFC 1425/1651/1869)108 108 Q
+(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G(rk).1 E(RFC 1426/1652)108 120 Q
+(ESMTP 8BITMIME)118.32 E(RFC 1427/1653/1870)108 132 Q(ESMTP SIZE)95.54 E
+(RFC 1428)108 144 Q(Basic MIME con)141.1 E -.15(ve)-.4 G(rsion rules).15
+E(RFC 1830)108 156 Q(ESMTP CHUNKING)141.1 E(RFC 1854/2197)108 168 Q
+(ESMTP PIPELINING)118.32 E(RFC 1891)108 180 Q(ESMTP DSN)141.1 E
+(RFC 1893/2034)108 192 Q(ESMTP ENHANCEDST)118.32 E -1.11(AT)-.93 G
+(USCODES)1.11 E(RFC 1985)108 204 Q(ESMTP ETRN)141.1 E(RFC 2033)108 216 Q
+(LMTP client mode)141.1 E(RFC 2487)108 228 Q(ESMTP ST)141.1 E(AR)-.93 E
+(TTLS)-.6 E(RFC 2554+M$ Exchange)108 240 Q(ESMTP A)79.64 E(UTH LOGIN)
+-.55 E(RFC 2554+NetScape)108 252 Q(ESMTP A)97.14 E(UTH=LOGIN)-.55 E
+(RFC 2852)108 264 Q(ESMTP DELIVERBY)141.1 E/F1 10.95/Times-Bold@0 SF
+-.548(AU)72 280.8 S(THOR).548 E F0(This program authored and cop)108
+292.8 Q(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108
+304.8 Q(Heaps of e)108 316.8 Q(xtended SMTP f)-.15 E(acilities by:)-.1 E
+(Matti Aarnio <[email protected].\214>)108 328.8 Q(13 Oct 2000)281.28 768 Q
+(4)204.28 E EP
%%Trailer
end
%%EOF
Index: man/smtpserver.8
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/smtpserver.8,v
retrieving revision 1.24
retrieving revision 1.28
diff -u -r1.24 -r1.28
--- man/smtpserver.8    2000/09/04 12:54:22     1.24
+++ man/smtpserver.8    2000/10/17 11:12:04     1.28
@@ -1,12 +1,12 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/smtpserver.8,v 1.24 2000/09/04 12:54:22 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/smtpserver.8,v 1.28 2000/10/17 11:12:04 mea Exp $
.ds ]W ZMailer 2.99
-.TH SMTPSERVER 8 "4 Sep 2000"
+.TH SMTPSERVER 8 "13 Oct 2000"
.SH NAME
smtpserver \- zmailer SMTP server
.SH SYNOPSIS
.B smtpserver
[
-.B \-46aignBVvw
+.B \-46aBigntVvw
]
[
.B \-p
@@ -180,6 +180,10 @@
.B must
be present, otherwise illegal syntax will be reported.
(Using RFC 821 address literal parser here.)
+.IP \-t
+Set when running smtpserver under e.g. inetd, and using service port
+number 465; a "well-known" deprecated one of SSL/SMTP; (From the era
+before ``STARTTLS'' protocol verb.)
.IP \-V
prints a version message and exits.
.SH CONFIGURATION
@@ -191,7 +195,10 @@
.nf
.I \-\ help-texts
.I \-\ acceptance/rejection\ database\ definitions
+.I \-\ various\ feature\ parametrizations
.fi
+On PARAM lines the system allows $-expansions of ZENV variables.
+(Special note: '$$' expands as '$', not shell-style process-id number!)
.IP The\ style\ (\fI\-s\fR)\ option
behaviour based on glob patterns matching the
.BR HELO / EHLO
@@ -363,13 +370,14 @@
file.


-.IP PARAM\ contentfilter\ @MAILBIN@/smtp-contentfilter
+.IP PARAM\ contentfilter\ $MAILBIN/smtp-contentfilter
An external program for received message content analysis.

-The interface to the program is simple, smtpserver writes relative
-filepath of the programs stdin, ending it with a newline.
-The reply begins with a signed integer, then if an additional message
-follows, a space separates the integer from the message.
+The interface to the program is simple synchronous half-duplex one,
+smtpserver writes relative filepath of the message into programs stdin,
+ending it with a newline.
+The filter programs reply must begin with a signed integer, then whatever
+text is desired to give to the user.

.IP PARAM\ tarpit\ n1\ n2
This defines a pre-reply slow-down factor, and next delay multiplier
@@ -396,6 +404,11 @@
.I This method requires that the scheduler runs its mailq service
.I in MAILQv2 mode!

+.IP PARAM\ lmtp\-mode
+When desiring to test LMTP (RFC 2033), this parameter can be turned on,
+.I however ZMailer is no real LMTP server, and this feature is
+.I only for debug purposes.
+
.IP Here\ is\ a\ possible\ configuration\ file:
.sp
.ta 0.0i 0.5i
@@ -407,8 +420,8 @@
#PARAM maxsize        10000000 # Same as -M -option
#PARAM min-availspace     5000 # Minimum free in POSTOFFICE after
#                              # message has arrived; in kBs.
-#PARAM max-error-recipients  3 # More than this is propably SPAM!
-#PARAM max-unknown-commands 10 # More than this is propably broken
+#PARAM max-error-recipients  3 # More than this is probably SPAM!
+#PARAM max-unknown-commands 10 # More than this is probably broken
#                              # client
#PARAM MaxSameIpSource      10 # Max simultaneous connections
#                              # from any IP source address
@@ -502,10 +515,10 @@
# The policy database:
# (NOTE: See `makedb' for its default suffixes!)
#
-PARAM  policydb   @DBTYPE@  @MAILVAR@/db/smtp-policy
+PARAM  policydb   $DBTYPE  $MAILVAR/db/smtp-policy
#
# External program for received message content analysis:
-#PARAM  contentfilter  @MAILBIN@/smtp-content-policy-analysis
+#PARAM  contentfilter  $MAILBIN/smtp-content-policy-analysis

#PARAM  tarpit 0 0   # No "tarpit" for 4XX/5XX reply codes
#PARAM  tarpit 20 2  # Initial delay: 20 secs, next = prev + (prev * 2)
@@ -518,9 +531,10 @@
# http://www.aet.tu-cottbus.de/personen/jaenicke/pfixtls/doc/setup.html
#
#PARAM  use-tls
-#PARAM  tls-CAfile      /opt/mail/db/smtpserver-CAcert.pem
-#PARAM  tls-cert-file   /opt/mail/db/smtpserver-cert.pem
-#PARAM  tls-key-file    /opt/mail/db/smtpserver-key.pem
+##PARAM listen-ssmtp    # A deprecated TCP/465 port listener for SSL/SMTP
+#PARAM  tls-CAfile      $MAILVAR/db/smtpserver-CAcert.pem
+#PARAM  tls-cert-file   $MAILVAR/db/smtpserver-cert.pem
+#PARAM  tls-key-file    $MAILVAR/db/smtpserver-key.pem
#  # Then some futher thoughs that may materialize some time..
#PARAM tls-loglevel     0
#PARAM tls-ccert-vd     0
@@ -566,6 +580,50 @@
*                   999 veR
.fi
.sp
+.SH CONTENTFILTER INTERFACE
+The
+.I contentfilter
+program is started without parameters running userid of
+.I daemon
+in directory $POSTOFFICE.
+.PP
+The program must silently wait for input, which is full path to
+the message spool file, analyze it, and reply with exactly one
+line matching rule of: "%i " -- begin with signed integer, then
+have one or more whitespace, then whatever filter writer liked.
+.PP
+General rule:
+.nf
+\fC
+ -1 negatives are condemned into rejection
+  0 zero is ok! gladly accepted
+  1 positives are sent into the freezer
+.fi
+.PP
+The program
+.I may
+produce also the numeric SMTP reply codes in its response text:
+.nf
+\fC
+ -1
+ -1 250 2.7.1 Glad to see some spam, immediately destroyed :)
+  0
+  0 250 2.6.0 Message OK!
+  1
+  1 550 5.7.1 That is spam, rejected!
+.fi
+.PP
+If the message has no text, some defaults are supplied.
+If the message text starts with numbers, it is presumed
+that it contains both the SMTP reply code, and ENHANCEDSTATUSCODE
+before the text.  (If no ENHANCEDSTATUSCODE part is present,
+then some possibly senseless default is supplied.)
+.PP
+Interface message text lines beginning with anything except signed integer
+are logged, and the communication channel from the smtpserver to the
+contentfilter program is closed.  Interface continues to scan things
+reported by the contentfilter program, and if no properly formatted line
+appears, default is to send the message into the freezer ("-1");
.SH PAM-SUPPORT FOR SMTP-AUTH
If the system has <security/pam_appl.h> file, following file will also
be needed for the system:
@@ -584,6 +642,8 @@
.I /var/spool/postoffice/.pid.smtpserver (POSTOFFICE/.pid.smtpserver)
.br
.I /local/share/mail/smtpserver.conf (MAILSHARE/smtpserver.conf)
+.br
+.I /etc/pam.d/smtpauth-login (if PAM mechanism is present and plain-password authentication is wanted)
.SH SEE ALSO
router(8)
.PP
@@ -604,6 +664,7 @@
RFC 1854/2197   ESMTP PIPELINING
RFC 1891        ESMTP DSN
RFC 1985        ESMTP ETRN
+RFC 2033        LMTP mode
RFC 2034        ESMTP ENHANCEDSTATUSCODES
RFC 2487        ESMTP STARTTLS
RFC 2554+M$ Exchange    ESMTP AUTH LOGIN
Index: man/smtpserver.8.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/smtpserver.8.ps,v
retrieving revision 1.35
retrieving revision 1.40
diff -u -r1.35 -r1.40
--- man/smtpserver.8.ps 2000/09/04 12:54:22     1.35
+++ man/smtpserver.8.ps 2000/10/17 11:12:04     1.40
@@ -1,12 +1,12 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:35 2000
+%%CreationDate: Tue Oct 17 14:11:14 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
%%+ font Courier
%%DocumentSuppliedResources: procset grops 1.16 0
-%%Pages: 9
+%%Pages: 10
%%PageOrder: Ascend
%%Orientation: Portrait
%%EndComments
@@ -210,18 +210,17 @@
(VER\(8\))-.8 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
(smtpserv)108 96 Q(er \255 zmailer SMTP serv)-.15 E(er)-.15 E F1
(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(smtpser)108 124.8 Q -.1(ve)
--.1 G(r).1 E F0([)2.557 E F2(\25546aignBVvw)2.557 E F0 2.557(][)2.557 G
-F2<ad70>-.001 E/F3 10/Times-Italic@0 SF(port)2.556 E F0 2.556(][)2.556 G
-F2<ad6c>A F3(SYSLOG)2.556 E F0 2.556(][)2.556 G F2<ad6c>A F3(lo)2.556 E
-(g\214le)-.1 E F0 2.556(][)2.556 G F2<ad73>A F0([)A F2(ftv)A(eR)-.1 E F0
-2.556(]][)C F2 .056(\255s strict)B F0 2.556(][)2.556 G F2<ad49>A F3
-(pid\214le)2.556 E F0(])2.556 E([)108 136.8 Q F2<ad4c>2.5 E F3
-(maxloadaver)2.5 E F0 2.5(][)2.5 G F2<ad4d>A F3(SMTPmaxsize)2.5 E F0 2.5
-(][)2.5 G F2<ad50>A F3(postof)2.5 E(\214ce)-.18 E F0 2.5(][)2.5 G F2
-<ad52>A F3 -.45(ro)2.5 G(uter).45 E F0 2.5(][)2.5 G F2<ad43>A F3
-(cfg\214le)2.5 E F0 2.5(][)2.5 G F2(\255T '[1.2.3.4]')A F0(])2.5 E F1
-(DESCRIPTION)72 153.6 Q F0 .481(This program implements the serv)108
-165.6 R .482
+-.1 G(r).1 E F0([)2.659 E F2(\25546aBigntVvw)2.659 E F0 2.659(][)2.659 G
+F2<ad70>A/F3 10/Times-Italic@0 SF(port)2.659 E F0 2.659(][)2.659 G F2
+<ad6c>A F3(SYSLOG)2.659 E F0 2.658(][)2.658 G F2<ad6c>A F3(lo)2.658 E
+(g\214le)-.1 E F0 2.658(][)2.658 G F2<ad73>A F0([)A F2(ftv)A(eR)-.1 E F0
+2.658(]][)C F2 .158(\255s strict)B F0 2.658(][)2.658 G F2<ad49>A F3
+(pid\214le)2.658 E F0 2.5(][)108 136.8 S F2<ad4c>A F3(maxloadaver)2.5 E
+F0 2.5(][)2.5 G F2<ad4d>A F3(SMTPmaxsize)2.5 E F0 2.5(][)2.5 G F2<ad50>A
+F3(postof)2.5 E(\214ce)-.18 E F0 2.5(][)2.5 G F2<ad52>A F3 -.45(ro)2.5 G
+(uter).45 E F0 2.5(][)2.5 G F2<ad43>A F3(cfg\214le)2.5 E F0 2.5(][)2.5 G
+F2(\255T '[1.2.3.4]')A F0(])2.5 E F1(DESCRIPTION)72 153.6 Q F0 .481
+(This program implements the serv)108 165.6 R .482
(er side of the SMTP protocol as described in RFC821, and kno)-.15 F
.482(ws about)-.25 F(the common e)108 177.6 Q
(xtensions to the protocol e)-.15 E
@@ -295,8 +294,8 @@
669.6 R(\(Def)6.477 E 1.477(ault: in\214nite\) \(This is)-.1 F
(local polic)144 681.6 Q 2.5(yi)-.15 G(ssue.\))-2.5 E<ad50>108 698.4 Q
F3(postof)2.5 E(\214ce)-.18 E F0(speci\214es an alternate)144 710.4 Q F2
-(POST)2.5 E(OFFICE)-.18 E F0(directory)2.5 E(.)-.65 E 2.5(4S)283.5 768 S
-(ep 2000)-2.5 E(1)206.5 E EP
+(POST)2.5 E(OFFICE)-.18 E F0(directory)2.5 E(.)-.65 E(13 Oct 2000)281.28
+768 Q(1)204.28 E EP
%%Page: 2 2
%%BeginPageSetup
BP
@@ -347,433 +346,498 @@
(in the supplied IP address)2.997 F F2(must)2.997 E F0 .496
(be present, otherwise ille)2.996 F -.05(ga)-.15 G 2.996(ls).05 G(yntax)
-2.996 E(will be reported.)144 540 Q
-(\(Using RFC 821 address literal parser here.\))5 E 20.64(\255V prints)
-108 556.8 R 2.5(av)2.5 G(ersion message and e)-2.65 E(xits.)-.15 E/F3
-10.95/Times-Bold@0 SF(CONFIGURA)72 573.6 Q(TION)-1.04 E F0(If the)108
-585.6 Q F1(MAILSHARE/)2.5 E F2(smtpser)A -.1(ve)-.1 G -1(r.).1 G(conf)1
-E F0 -.15(ex)2.5 G(ists it is read to con\214gure tw).15 E 2.5(ok)-.1 G
-(inds of things:)-2.5 E -.92(PA)108 614.4 S(RAM \255entries).92 E(allo)
-144 626.4 Q 2.5(ws)-.25 G(erv)-2.5 E
-(er start-time parametrization of se)-.15 E -.15(ve)-.25 G
-(ral things, including:).15 E F1 2.5<ad68>144 638.4 S(elp-te)-2.5 E(xts)
--.2 E 2.5<ad61>144 650.4 S(cceptance/r)-2.5 E
-(ejection database de\214nitions)-.37 E F0(The style \()108 667.2 Q F1
-<ad73>A F0 2.5(\)o)C(ption)-2.5 E(beha)144 679.2 Q 1.62
-(viour based on glob patterns matching the)-.2 F F2(HELO)4.121 E F0(/)A
-F2(EHLO)A F0 1.621(name gi)4.121 F -.15(ve)-.25 G 4.121(nb).15 G 4.121
-(yar)-4.121 G 1.621(emote client.)-4.121 F .638(Lines be)144 691.2 R
-.638(ginning with a)-.15 F F1(#)3.138 E F0 .637(or whitespace are ignor\
-ed in the \214le, and all other lines must consist of)3.137 F(tw)144
-703.2 Q 4.093(ot)-.1 G(ok)-4.093 E 1.593
-(ens: a shell-style \(glob\) pattern starting at the be)-.1 F 1.594
-(ginning of the line, whitespace, and a)-.15 F .749
-(sequence of style \215ags.)144 715.2 R .748
-(The \214rst matching line is used.)5.749 F .748
-(As a special case, the \215ags section may)5.748 F .853(start with a)
-144 727.2 R F1(!)3.353 E F0 .853
-(character in which case the remainder of the line is a f)5.853 F .854
-(ailure comment message to)-.1 F 2.5(4S)283.5 768 S(ep 2000)-2.5 E(2)
-206.5 E EP
+(\(Using RFC 821 address literal parser here.\))5 E 25.08(\255t Set)108
+556.8 R .215(when running smtpserv)2.715 F .216
+(er under e.g. inetd, and using service port number 465; a "well-kno)
+-.15 F(wn")-.25 E(deprecated one of SSL/SMTP; \(From the era before `)
+144 568.8 Q(`ST)-.74 E(AR)-.93 E(TTLS')-.6 E 2.5('p)-.74 G(rotocol v)
+-2.5 E(erb)-.15 E(.\))-.4 E 20.64(\255V prints)108 585.6 R 2.5(av)2.5 G
+(ersion message and e)-2.65 E(xits.)-.15 E/F3 10.95/Times-Bold@0 SF
+(CONFIGURA)72 602.4 Q(TION)-1.04 E F0(If the)108 614.4 Q F1(MAILSHARE/)
+2.5 E F2(smtpser)A -.1(ve)-.1 G -1(r.).1 G(conf)1 E F0 -.15(ex)2.5 G
+(ists it is read to con\214gure tw).15 E 2.5(ok)-.1 G(inds of things:)
+-2.5 E -.92(PA)108 643.2 S(RAM \255entries).92 E(allo)144 655.2 Q 2.5
+(ws)-.25 G(erv)-2.5 E(er start-time parametrization of se)-.15 E -.15
+(ve)-.25 G(ral things, including:).15 E F1 2.5<ad68>144 667.2 S(elp-te)
+-2.5 E(xts)-.2 E 2.5<ad61>144 679.2 S(cceptance/r)-2.5 E
+(ejection database de\214nitions)-.37 E 2.5<ad76>144 691.2 S
+(arious featur)-2.5 E 2.5(ep)-.37 G(ar)-2.5 E(ametrizations)-.15 E F0
+.107(On P)144 703.2 R .106(ARAM lines the system allo)-.92 F .106
+(ws $-e)-.25 F .106(xpansions of ZENV v)-.15 F 2.606
+(ariables. \(Special)-.25 F .106(note: '$$' e)2.606 F(xpands)-.15 E
+(as '$', not shell-style process-id number!\))144 715.2 Q(13 Oct 2000)
+281.28 768 Q(2)204.28 E EP
%%Page: 3 3
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E .182(print at the client.)144 84 R .181
-(This con\214guration capability is intended as a w)5.182 F .181
-(ay to control misbeha)-.1 F .181(ving client)-.2 F(softw)144 96 Q
-(are or mailers.)-.1 E -.92(PA)108 124.8 S(RAM maxsize).92 E
-(This is synon)144 136.8 Q(ym to start-time)-.15 E/F1 10/Times-Italic@0
-SF<ad4d>2.5 E F0(option.)2.5 E -.92(PA)108 165.6 S(RAM min\255a).92 E
--.25(va)-.2 G(ilspace 5000).25 E 1.804(This de\214nes, in)144 177.6 R/F2
-10/Times-Bold@0 SF(kilobytes)4.304 E F0 4.304(,t)C 1.804(he minimum a)
--4.304 F -.25(va)-.2 G 1.804(ilable space in).25 F F2(POST)4.304 E
-(OFFICE)-.18 E F0 1.805(directory after the)4.304 F
-(message has been accepted in.)144 189.6 Q -.92(PA)108 218.4 S
-(RAM max\255error\255recipients).92 E 3.558(This de\214nes ho)144 230.4
-R 6.057(wm)-.25 G(an)-6.057 E 6.057(yr)-.15 G 3.557
-(ecipients can be on a message whose source address is)-6.057 F F2(MAIL)
-6.057 E(FR)144 242.4 Q(OM:<>)-.3 E F0 5(.T)C
+(VER\(8\))-.8 E(The style \()108 84 Q/F1 10/Times-Italic@0 SF<ad73>A F0
+2.5(\)o)C(ption)-2.5 E(beha)144 96 Q 1.62
+(viour based on glob patterns matching the)-.2 F/F2 10/Times-Bold@0 SF
+(HELO)4.121 E F0(/)A F2(EHLO)A F0 1.621(name gi)4.121 F -.15(ve)-.25 G
+4.121(nb).15 G 4.121(yar)-4.121 G 1.621(emote client.)-4.121 F .638
+(Lines be)144 108 R .638(ginning with a)-.15 F F1(#)3.138 E F0 .637(or \
+whitespace are ignored in the \214le, and all other lines must consist \
+of)3.137 F(tw)144 120 Q 4.093(ot)-.1 G(ok)-4.093 E 1.593
+(ens: a shell-style \(glob\) pattern starting at the be)-.1 F 1.594
+(ginning of the line, whitespace, and a)-.15 F .749
+(sequence of style \215ags.)144 132 R .748
+(The \214rst matching line is used.)5.749 F .748
+(As a special case, the \215ags section may)5.748 F .853(start with a)
+144 144 R F1(!)3.353 E F0 .853
+(character in which case the remainder of the line is a f)5.853 F .854
+(ailure comment message to)-.1 F .182(print at the client.)144 156 R
+.181(This con\214guration capability is intended as a w)5.182 F .181
+(ay to control misbeha)-.1 F .181(ving client)-.2 F(softw)144 168 Q
+(are or mailers.)-.1 E -.92(PA)108 196.8 S(RAM maxsize).92 E
+(This is synon)144 208.8 Q(ym to start-time)-.15 E F1<ad4d>2.5 E F0
+(option.)2.5 E -.92(PA)108 237.6 S(RAM min\255a).92 E -.25(va)-.2 G
+(ilspace 5000).25 E 1.804(This de\214nes, in)144 249.6 R F2(kilobytes)
+4.304 E F0 4.304(,t)C 1.804(he minimum a)-4.304 F -.25(va)-.2 G 1.804
+(ilable space in).25 F F2(POST)4.304 E(OFFICE)-.18 E F0 1.805
+(directory after the)4.304 F(message has been accepted in.)144 261.6 Q
+-.92(PA)108 290.4 S(RAM max\255error\255recipients).92 E 3.558
+(This de\214nes ho)144 302.4 R 6.057(wm)-.25 G(an)-6.057 E 6.057(yr)-.15
+G 3.557(ecipients can be on a message whose source address is)-6.057 F
+F2(MAIL)6.057 E(FR)144 314.4 Q(OM:<>)-.3 E F0 5(.T)C
(hat is, is an error message.)-5 E(\(Sometimes SP)5 E
-(AMs are tried to inject in that form...\))-.92 E -.92(PA)108 271.2 S
+(AMs are tried to inject in that form...\))-.92 E -.92(PA)108 343.2 S
(RAM MaxSameIpSource).92 E(This sets the maximum number of acti)144
-283.2 Q .3 -.15(ve c)-.25 H(onnections from an).15 E 2.5(yg)-.15 G -2.15
+355.2 Q .3 -.15(ve c)-.25 H(onnections from an).15 E 2.5(yg)-.15 G -2.15
-.25(iv e)-2.5 H 2.5(ns).25 G(ingle IP address.)-2.5 E 1.037
-(When the limit is reached, system tells the remote end:)144 307.2 R F2
+(When the limit is reached, system tells the remote end:)144 379.2 R F2
-.63(``)3.537 G 1.037(450 T).63 F 1.038(oo many simultaneous connec-)
--.92 F(tions...)144 319.2 Q -.63('')-.55 G F0
+-.92 F(tions...)144 391.2 Q -.63('')-.55 G F0
(\(and then closes the connection.\))5.63 E .585(When the limit is e)144
-343.2 R .585(xceeded by f)-.15 F .585(actor of four)-.1 F 3.085(,t)-.4 G
+415.2 R .585(xceeded by f)-.15 F .585(actor of four)-.1 F 3.085(,t)-.4 G
.585(he serv)-3.085 F .585
-(er just closes the connection without telling)-.15 F(an)144 355.2 Q
-(ything.)-.15 E F2 .868(Do note that this w)144 379.2 R .868
+(er just closes the connection without telling)-.15 F(an)144 427.2 Q
+(ything.)-.15 E F2 .868(Do note that this w)144 451.2 R .868
(orks only when the smtpser)-.1 F -.1(ve)-.1 G 3.368(ri).1 G 3.368(sr)
-3.368 G .868(unning as its o)-3.368 F .869(wn daemon, not while)-.1 F
-(run fr)144 391.2 Q(om under inetd!)-.18 E F0 -.92(PA)108 420 S
-(RAM MaxP).92 E(arallelConnections)-.15 E 1.003(This limits ho)144 432 R
+(run fr)144 463.2 Q(om under inetd!)-.18 E F0 -.92(PA)108 492 S
+(RAM MaxP).92 E(arallelConnections)-.15 E 1.003(This limits ho)144 504 R
3.503(wm)-.25 G(an)-3.503 E 3.503(ys)-.15 G 1.003
(imultaneous connections the serv)-3.503 F 1.002
(er will accept in total -- e.g. ho)-.15 F 3.502(wm)-.25 G(an)-3.502 E
-(y)-.15 E(childs a master serv)144 444 Q(er can ha)-.15 E .3 -.15(ve r)
+(y)-.15 E(childs a master serv)144 516 Q(er can ha)-.15 E .3 -.15(ve r)
-.2 H 2.5(unning. Def).15 F(ault v)-.1 E(alue: 800.)-.25 E .819
-(Exceeding the limit by less than 100 will get a message)144 468 R F2
+(Exceeding the limit by less than 100 will get a message)144 540 R F2
-.63(``)3.32 G .82(450 T).63 F .82(oo many simultaneous connec-)-.92 F
-(tions...)144 480 Q -.63('')-.55 G F0 .492(printed to the connection.)
+(tions...)144 552 Q -.63('')-.55 G F0 .492(printed to the connection.)
6.122 F .491(In e)5.492 F -.15(ve)-.25 G .491
(ry case the connection is closed right after the possible).15 F
-(message.)144 492 Q F2 .868(Do note that this w)144 516 R .868
+(message.)144 564 Q F2 .868(Do note that this w)144 588 R .868
(orks only when the smtpser)-.1 F -.1(ve)-.1 G 3.368(ri).1 G 3.368(sr)
-3.368 G .868(unning as its o)-3.368 F .869(wn daemon, not while)-.1 F
-(run fr)144 528 Q(om under inetd!)-.18 E F0 -.92(PA)108 556.8 S
+(run fr)144 600 Q(om under inetd!)-.18 E F0 -.92(PA)108 628.8 S
(RAM ListenQueueSize).92 E
-(This sets the listen queue size parameter for)144 568.8 Q F1(listen)2.5
-E F0(\(2\) call at the serv).24 E(er)-.15 E(.)-.55 E -.92(PA)108 597.6 S
-(RAM TcpRcvBuf).92 E(ferSize)-.25 E(This sets)144 609.6 Q(setsock)5 E
+(This sets the listen queue size parameter for)144 640.8 Q F1(listen)2.5
+E F0(\(2\) call at the serv).24 E(er)-.15 E(.)-.55 E -.92(PA)108 669.6 S
+(RAM TcpRcvBuf).92 E(ferSize)-.25 E(This sets)144 681.6 Q(setsock)5 E
(opt\(SO_RCVB)-.1 E 2.5(UF\) v)-.1 F(alue, in case the system def)-.25 E
-(ault is not suitable.)-.1 E -.92(PA)108 638.4 S(RAM TcpXmitBuf).92 E
-(ferSize)-.25 E(This sets)144 650.4 Q(setsock)5 E(opt\(SO_SNDB)-.1 E 2.5
-(UF\) v)-.1 F(alue, in case the system def)-.25 E(ault is not suitable.)
--.1 E -.92(PA)108 679.2 S(RAM RcptLimitCount 10000).92 E .582(This sets\
- the maximum number of accepted recipients per one message transaction.)
-144 691.2 R(Def)5.582 E .582(ault \(and)-.1 F(minimum!\) v)144 703.2 Q
-(alue is 100, which is mandated by the RFC 821.)-.25 E 2.5(4S)283.5 768
-S(ep 2000)-2.5 E(3)206.5 E EP
+(ault is not suitable.)-.1 E(13 Oct 2000)281.28 768 Q(3)204.28 E EP
%%Page: 4 4
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E -.92(PA)108 84 S(RAM BindPort).92 E(25)7.5 E -.92(PA)108
-100.8 S(RAM BindAddress [0.0.0.0]).92 E -.92(PA)108 117.6 S
-(RAM BindAddress [IPv6.0::0]).92 E -.92(PA)108 134.4 S
-(RAM BindAddress if).92 E(ace:if)-.1 E(acename)-.1 E .899(Per def)144
-146.4 R .899(ault the serv)-.1 F .899(er mode SMTP-serv)-.15 F .899
+(VER\(8\))-.8 E -.92(PA)108 84 S(RAM TcpXmitBuf).92 E(ferSize)-.25 E
+(This sets)144 96 Q(setsock)5 E(opt\(SO_SNDB)-.1 E 2.5(UF\) v)-.1 F
+(alue, in case the system def)-.25 E(ault is not suitable.)-.1 E -.92
+(PA)108 124.8 S(RAM RcptLimitCount 10000).92 E .582(This sets the maxim\
+um number of accepted recipients per one message transaction.)144 136.8
+R(Def)5.582 E .582(ault \(and)-.1 F(minimum!\) v)144 148.8 Q
+(alue is 100, which is mandated by the RFC 821.)-.25 E -.92(PA)108 177.6
+S(RAM BindPort).92 E(25)7.5 E -.92(PA)108 194.4 S
+(RAM BindAddress [0.0.0.0]).92 E -.92(PA)108 211.2 S
+(RAM BindAddress [IPv6.0::0]).92 E -.92(PA)108 228 S(RAM BindAddress if)
+.92 E(ace:if)-.1 E(acename)-.1 E .899(Per def)144 240 R .899
+(ault the serv)-.1 F .899(er mode SMTP-serv)-.15 F .899
(er binds to port 25 and an)-.15 F 3.4(yl)-.15 G .9
(ocally accepted address, b)-3.4 F(ut)-.2 E .833
-(occasionally people seem to w)144 158.4 R .833(ant to ha)-.1 F 1.132
--.15(ve s)-.2 H .832(eparate serv).15 F .832(er instances with dif)-.15
-F .832(ferent con\214gurations,)-.25 F
-(and for those cases are these parameters.)144 170.4 Q -.92(PA)108 199.2
-S(RAM DEB).92 E(UGcmd)-.1 E -.92(PA)108 216 S(RAM EXPNcmd).92 E -.92(PA)
-108 232.8 S(RAM VRFYcmd).92 E 1.366(This trio \(DEB)144 244.8 R 1.367
-(UGcmd, EXPNcmd, VRFYcmd\) are enablers of lik)-.1 F 3.867(en)-.1 G
-1.367(amed SMTP v)-3.867 F 1.367(erbs which)-.15 F(ha)144 256.8 Q .3
--.15(ve s)-.2 H(ome uses in the deb).15 E(ug mode.)-.2 E(The)144 280.8 Q
+(occasionally people seem to w)144 252 R .833(ant to ha)-.1 F 1.132 -.15
+(ve s)-.2 H .832(eparate serv).15 F .832(er instances with dif)-.15 F
+.832(ferent con\214gurations,)-.25 F
+(and for those cases are these parameters.)144 264 Q -.92(PA)108 292.8 S
+(RAM DEB).92 E(UGcmd)-.1 E -.92(PA)108 309.6 S(RAM EXPNcmd).92 E -.92
+(PA)108 326.4 S(RAM VRFYcmd).92 E 1.366(This trio \(DEB)144 338.4 R
+1.367(UGcmd, EXPNcmd, VRFYcmd\) are enablers of lik)-.1 F 3.867(en)-.1 G
+1.367(amed SMTP v)-3.867 F 1.367(erbs which)-.15 F(ha)144 350.4 Q .3
+-.15(ve s)-.2 H(ome uses in the deb).15 E(ug mode.)-.2 E(The)144 374.4 Q
3.769(ya)-.15 G 1.269(re normally disabled, b)-3.769 F 1.269
(ut running them enabled does not allo)-.2 F 3.768(wd)-.25 G 1.268
-(irect attacks with them.)-3.768 F(\(That we kno)144 292.8 Q 2.5(wo)-.25
-G(f.\))-2.5 E -.92(PA)108 321.6 S(RAM enable\255router).92 E .005
-(This enables interacti)144 333.6 R .305 -.15(ve r)-.25 H .005
+(irect attacks with them.)-3.768 F(\(That we kno)144 386.4 Q 2.5(wo)-.25
+G(f.\))-2.5 E -.92(PA)108 415.2 S(RAM enable\255router).92 E .005
+(This enables interacti)144 427.2 R .305 -.15(ve r)-.25 H .005
(outer use where user inputs reach the router).15 F 5.005(.A)-.55 G
2.505(st)-5.005 G .005(hings turn out, while the)-2.505 F .076
-(canned scripts should be safe ag)144 345.6 R .075(ainst an)-.05 F 2.575
+(canned scripts should be safe ag)144 439.2 R .075(ainst an)-.05 F 2.575
(ya)-.15 G .075
(nd all inputs, a careless change in the router scripts may)-2.575 F
-(endanger this status.)144 357.6 Q(Per def)144 381.6 Q(ault this is)-.1
+(endanger this status.)144 451.2 Q(Per def)144 475.2 Q(ault this is)-.1
E/F1 10/Times-Bold@0 SF(disabled)2.5 E F0(to protect your system.)2.5 E
-1.892 -.8(To e)144 405.6 T .292(nable EXPN and VRFY).8 F 2.793(,t)-1.29
+1.892 -.8(To e)144 499.2 T .292(nable EXPN and VRFY).8 F 2.793(,t)-1.29
G .293(his must be enabled, b)-2.793 F .293(ut be)-.2 F F1 -.1(ve)2.793
G .293(ry car).1 F(efull)-.18 E F0 .293(when you do this.)2.793 F .293
-(This is)5.293 F(also required for interacti)144 417.6 Q .3 -.15(ve r)
+(This is)5.293 F(also required for interacti)144 511.2 Q .3 -.15(ve r)
-.25 H(outer processing of `).15 E(`MAIL FR)-.74 E(OM')-.4 E 2.5('a)-.74
G(nd `)-2.5 E(`RCPT T)-.74 E(O')-.18 E 2.5('a)-.74 G(ddresses.)-2.5 E
--.92(PA)108 446.4 S(RAM smtp\255auth).92 E .656(This enables 'SMTP A)144
-458.4 R .656(UTH' f)-.55 F .656(acility \(A)-.1 F .655(UTH v)-.55 F .655
+-.92(PA)108 540 S(RAM smtp\255auth).92 E .656(This enables 'SMTP A)144
+552 R .656(UTH' f)-.55 F .656(acility \(A)-.1 F .655(UTH v)-.55 F .655
(erb, plus optional parameter to MAIL v)-.15 F 3.155(erb\). W)-.15 F
-(ith)-.4 E .294(this the users who are able to ')144 470.4 R .295(login\
-' successfully to this host, are then able to relay the email thru)-.1 F
-(the serv)144 482.4 Q(er unlimited.)-.15 E -.92(PA)108 511.2 S(RAM A).92
-E(UTH\255LOGIN\255also\255without\255TLS)-.55 E 3.612
-(This enables 'SMTP A)144 523.2 R 3.612(UTH' f)-.55 F 3.612
+(ith)-.4 E .294(this the users who are able to ')144 564 R .295(login' \
+successfully to this host, are then able to relay the email thru)-.1 F
+(the serv)144 576 Q(er unlimited.)-.15 E -.92(PA)108 604.8 S(RAM A).92 E
+(UTH\255LOGIN\255also\255without\255TLS)-.55 E 3.612
+(This enables 'SMTP A)144 616.8 R 3.612(UTH' f)-.55 F 3.612
(acility usage also without running under SSL/TLS security)-.1 F(en)144
-535.2 Q -.15(ve)-.4 G(lope.).15 E -.92(PA)108 564 S(RAM MSA\255mode).92
-E .686(Enable Message Submission Agent mode, where smtpserv)144 576 R
-(er)-.15 E F1 -.18(re)3.186 G(quir).18 E(es)-.18 E F0 .686
+628.8 Q -.15(ve)-.4 G(lope.).15 E -.92(PA)108 657.6 S(RAM MSA\255mode)
+.92 E .686(Enable Message Submission Agent mode, where smtpserv)144
+669.6 R(er)-.15 E F1 -.18(re)3.186 G(quir).18 E(es)-.18 E F0 .686
(successful user authentica-)3.186 F 1.436
(tion during SMTP sessions initiated from outside of the trusted netw)
-144 588 R 1.435(orks or the netw)-.1 F 1.435(orks with)-.1 F .444
+144 681.6 R 1.435(orks or the netw)-.1 F 1.435(orks with)-.1 F .444
(relaying enabled \(see "fulltrustnet" and "relaycustnet" at the sample)
-144 600 R/F2 10/Times-Italic@0 SF(pr)2.944 E(oto/db/smtp-policy)-.45 E
-(.sr)-.55 E(c)-.37 E F0(\214le\).)2.944 E -.92(PA)108 628.8 S
-(RAM SMTP\255auth\255pipe /path/to/program).92 E 1.1
-(This is a path to the e)144 640.8 R 1.099(xternal authentication progr\
-am. The authenticator should read a username)-.15 F .538
-(from command line and a passw)144 652.8 R .539
-(ord from standard input. Exit status 0 means successful authenti-)-.1 F
-(cation.)144 664.8 Q F1 1.196(It is r)144 688.8 R(elati)-.18 E -.1(ve)
--.1 G 1.196(ly easy to mak).1 F 3.696(eam)-.1 G(istak)-3.696 E 3.696(ei)
--.1 G 3.696(ne)-3.696 G(xter)-3.696 E 1.196(nal authentication pr)-.15 F
-1.195(ogram that f)-.18 F(ollo)-.25 E 1.195(ws the)-.1 F
-(speci\214cation. Use this option only if y)144 700.8 Q(ou kno)-.25 E
-2.5(we)-.1 G(xactly what y)-2.5 E(ou do! BE CAREFULL!)-.25 E F0 2.5(4S)
-283.5 768 S(ep 2000)-2.5 E(4)206.5 E EP
+144 693.6 R/F2 10/Times-Italic@0 SF(pr)2.944 E(oto/db/smtp-policy)-.45 E
+(.sr)-.55 E(c)-.37 E F0(\214le\).)2.944 E(13 Oct 2000)281.28 768 Q(4)
+204.28 E EP
%%Page: 5 5
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E -.92(PA)108 84 S(RAM No8BITMIME).92 E -.92(PA)108 100.8
-S(RAM NoCHUNKING).92 E -.92(PA)108 117.6 S(RAM NoDSN).92 E -.92(PA)108
-134.4 S(RAM NoEHLO).92 E -.92(PA)108 151.2 S(RAM NoENCHANCEDST).92 E
--1.11(AT)-.93 G(US\(CODES\))1.11 E -.92(PA)108 168 S(RAM NoETRN).92 E
--.92(PA)108 184.8 S(RAM NoPIPELINING).92 E 1.163(This set are)144 196.8
-R/F1 10/Times-Bold@0 SF(disablers)3.663 E F0 1.163(of lik)3.663 F 3.663
-(en)-.1 G 1.164(amed Extended SMTP EHLO responses, plus EHLO v)-3.663 F
-1.164(erb itself,)-.15 F 2.289(e.g. using these will turn of)144 208.8 R
+(VER\(8\))-.8 E -.92(PA)108 84 S
+(RAM SMTP\255auth\255pipe /path/to/program).92 E 1.1
+(This is a path to the e)144 96 R 1.099(xternal authentication program.\
+ The authenticator should read a username)-.15 F .538
+(from command line and a passw)144 108 R .539
+(ord from standard input. Exit status 0 means successful authenti-)-.1 F
+(cation.)144 120 Q/F1 10/Times-Bold@0 SF 1.196(It is r)144 144 R(elati)
+-.18 E -.1(ve)-.1 G 1.196(ly easy to mak).1 F 3.696(eam)-.1 G(istak)
+-3.696 E 3.696(ei)-.1 G 3.696(ne)-3.696 G(xter)-3.696 E 1.196
+(nal authentication pr)-.15 F 1.195(ogram that f)-.18 F(ollo)-.25 E
+1.195(ws the)-.1 F(speci\214cation. Use this option only if y)144 156 Q
+(ou kno)-.25 E 2.5(we)-.1 G(xactly what y)-2.5 E(ou do! BE CAREFULL!)
+-.25 E F0 -.92(PA)108 184.8 S(RAM No8BITMIME).92 E -.92(PA)108 201.6 S
+(RAM NoCHUNKING).92 E -.92(PA)108 218.4 S(RAM NoDSN).92 E -.92(PA)108
+235.2 S(RAM NoEHLO).92 E -.92(PA)108 252 S(RAM NoENCHANCEDST).92 E -1.11
+(AT)-.93 G(US\(CODES\))1.11 E -.92(PA)108 268.8 S(RAM NoETRN).92 E -.92
+(PA)108 285.6 S(RAM NoPIPELINING).92 E 1.163(This set are)144 297.6 R F1
+(disablers)3.663 E F0 1.163(of lik)3.663 F 3.663(en)-.1 G 1.164
+(amed Extended SMTP EHLO responses, plus EHLO v)-3.663 F 1.164
+(erb itself,)-.15 F 2.289(e.g. using these will turn of)144 309.6 R
4.789(fg)-.25 G -2.15 -.25(iv e)-4.789 H 4.788(n\().25 G 2.288(for e)
-4.788 F 2.288(xample `)-.15 F(`PIPELINING')-.74 E 2.288
('\) response from the EHLO)-.74 F .879(replies, and then a client poss\
ibly capable to feed PIPELINING will not do it -- unless it breaks)144
-220.8 R(rules, and does it e)144 232.8 Q -.15(ve)-.25 G 2.5(nw).15 G
+321.6 R(rules, and does it e)144 333.6 Q -.15(ve)-.25 G 2.5(nw).15 G
(hen the serv)-2.5 E(er does not report f)-.15 E(acility being a)-.1 E
--.25(va)-.2 G(ilable.).25 E .68(If you w)144 256.8 R .68
+-.25(va)-.2 G(ilable.).25 E .68(If you w)144 357.6 R .68
(ant to disable an)-.1 F 3.18(yo)-.15 G 3.18(ft)-3.18 G .68
(hese, you better ha)-3.18 F .98 -.15(ve a g)-.2 H .68
(ood reason for it, as in general the).15 F 3.18(yw)-.15 G(ork)-3.28 E
-(quite \214ne.)144 268.8 Q
+(quite \214ne.)144 369.6 Q
(Of these, 8BITMIME can not in reality be disabled, only its adv)144
-292.8 Q(erticement can be turned of)-.15 E(f.)-.25 E -.92(PA)108 321.6 S
-(RAM no\255multiline\255replies).92 E -.45(Tu)144 333.6 S 1.043(rn of)
+393.6 Q(erticement can be turned of)-.15 E(f.)-.25 E -.92(PA)108 422.4 S
+(RAM no\255multiline\255replies).92 E -.45(Tu)144 434.4 S 1.043(rn of)
.45 F 3.543(fZ)-.25 G(Mailer')-3.543 E 3.544(sd)-.55 G(ef)-3.544 E 1.044
(ault multiline replies; man)-.1 F 3.544(ys)-.15 G 1.044
(ystems \(especially from M$ breed\) don')-3.544 F 3.544(td)-.18 G(o)
--3.544 E(RFC 821 Appendix E properly)144 345.6 Q(...)-.65 E -.92(PA)108
-374.4 S(RAM polic).92 E(ydb)-.15 E .582(This de\214nes smtp input polic)
-144 386.4 R 3.082<798c>-.15 G .582(ltering/analysis database location.)
--3.082 F .581(See the comments at the sam-)5.581 F(ple)144 398.4 Q/F2 10
+-3.544 E(RFC 821 Appendix E properly)144 446.4 Q(...)-.65 E -.92(PA)108
+475.2 S(RAM polic).92 E(ydb)-.15 E .582(This de\214nes smtp input polic)
+144 487.2 R 3.082<798c>-.15 G .582(ltering/analysis database location.)
+-3.082 F .581(See the comments at the sam-)5.581 F(ple)144 499.2 Q/F2 10
/Times-Italic@0 SF(pr)2.5 E(oto/db/smtp-policy)-.45 E(.sr)-.55 E(c)-.37
-E F0(\214le.)2.5 E -.92(PA)108 439.2 S
-(RAM content\214lter @MAILBIN@/smtp-content\214lter).92 E(An e)144 451.2
-Q(xternal program for recei)-.15 E -.15(ve)-.25 G 2.5(dm).15 G
-(essage content analysis.)-2.5 E .915(The interf)144 475.2 R .915
-(ace to the program is simple, smtpserv)-.1 F .916(er writes relati)-.15
-F 1.216 -.15(ve \214)-.25 H .916(lepath of the programs stdin,).15 F
-.053(ending it with a ne)144 487.2 R 2.553(wline. The)-.25 F .052
-(reply be)2.553 F .052(gins with a signed inte)-.15 F(ger)-.15 E 2.552
-(,t)-.4 G .052(hen if an additional message fol-)-2.552 F(lo)144 499.2 Q
-(ws, a space separates the inte)-.25 E(ger from the message.)-.15 E -.92
-(PA)108 528 S(RAM tarpit n1 n2).92 E .874
-(This de\214nes a pre-reply slo)144 540 R(w-do)-.25 E .874(wn f)-.25 F
+E F0(\214le.)2.5 E -.92(PA)108 540 S
+(RAM content\214lter $MAILBIN/smtp-content\214lter).92 E(An e)144 552 Q
+(xternal program for recei)-.15 E -.15(ve)-.25 G 2.5(dm).15 G
+(essage content analysis.)-2.5 E 1.429(The interf)144 576 R 1.429
+(ace to the program is simple synchronous half-duple)-.1 F 3.929(xo)-.15
+G 1.429(ne, smtpserv)-3.929 F 1.43(er writes relati)-.15 F -.15(ve)-.25
+G .975
+(\214lepath of the message into programs stdin, ending it with a ne)144
+588 R 3.474(wline. The)-.25 F .974(\214lter programs reply)3.474 F
+(must be)144 600 Q(gin with a signed inte)-.15 E(ger)-.15 E 2.5(,t)-.4 G
+(hen whate)-2.5 E -.15(ve)-.25 G 2.5(rt).15 G -.15(ex)-2.5 G 2.5(ti).15
+G 2.5(sd)-2.5 G(esired to gi)-2.5 E .3 -.15(ve t)-.25 H 2.5(ot).15 G
+(he user)-2.5 E(.)-.55 E -.92(PA)108 628.8 S(RAM tarpit n1 n2).92 E .874
+(This de\214nes a pre-reply slo)144 640.8 R(w-do)-.25 E .874(wn f)-.25 F
(actor)-.1 E 3.375(,a)-.4 G .875(nd ne)-3.375 F .875
(xt delay multiplier \(both are inte)-.15 F 3.375(gers\). Def)-.15 F
-(ault)-.1 E -.25(va)144 552 S .995(lues are \(0, 0\).).25 F .995
+(ault)-.1 E -.25(va)144 652.8 S .995(lues are \(0, 0\).).25 F .995
(Delay tops at 250 \(seconds\).)5.995 F .994(The `)5.994 F(`n1')-.74 E
3.494('i)-.74 G 3.494(su)-3.494 G .994(sed as the initial tarpit delay)
--3.494 F 3.494(,a)-.65 G(nd)-3.494 E -.74(``)144 564 S(n2').74 E 2.5('i)
--.74 G 2.5(sm)-2.5 G(ultiplier for formula:)-2.5 E F2(ne)2.5 E(xt = pr)
--.2 E .3 -.15(ev + \()-.37 H(pr).15 E .3 -.15(ev * n)-.37 H(2\)).15 E F0
--.92(PA)108 592.8 S(RAM rcvd\255ident).92 E -.92(PA)108 609.6 S
-(RAM rcvd\255whoson).92 E -.92(PA)108 626.4 S(RAM rcvd\255auth\255user)
-.92 E -.92(PA)108 643.2 S(RAM rcvd\255tls\255mode).92 E -.92(PA)108 660
-S(RAM rcvd\255tls\255peer).92 E .864
-(This quintet controls what possibly collected data is sho)144 672 R
-.865(wn at the published `)-.25 F(`Recei)-.74 E -.15(ve)-.25 G(d:').15 E
-3.365('h)-.74 G(eader)-3.365 E(that this system generates.)144 684 Q 2.5
-(4S)283.5 768 S(ep 2000)-2.5 E(5)206.5 E EP
+-3.494 F 3.494(,a)-.65 G(nd)-3.494 E -.74(``)144 664.8 S(n2').74 E 2.5
+('i)-.74 G 2.5(sm)-2.5 G(ultiplier for formula:)-2.5 E F2(ne)2.5 E
+(xt = pr)-.2 E .3 -.15(ev + \()-.37 H(pr).15 E .3 -.15(ev * n)-.37 H
+(2\)).15 E F0 -.92(PA)108 693.6 S(RAM rcvd\255ident).92 E(13 Oct 2000)
+281.28 768 Q(5)204.28 E EP
%%Page: 6 6
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E -.92(PA)108 84 S(RAM etrn\255cluster node\255name\255or\
-\255address mq2\255username mq2\255passwd).92 E .241
-(In load-balance clusters a netw)144 96 R .241(ork le)-.1 F -.15(ve)-.25
-G 2.741(ll).15 G .241(oad-balancer may distrib)-2.741 F .241
-(ute the incoming SMTP connec-)-.2 F .088(tions to multiple real machin\
-es, and by using this parameter \(repeatedly\) to list those peers, sys\
-tem)144 108 R
-(can relay user initiated ETRN requests to all cluster nodes.)144 120 Q
-/F1 10/Times-Italic@0 SF(This method r)144 144 Q(equir)-.37 E
+(VER\(8\))-.8 E -.92(PA)108 84 S(RAM rcvd\255whoson).92 E -.92(PA)108
+100.8 S(RAM rcvd\255auth\255user).92 E -.92(PA)108 117.6 S
+(RAM rcvd\255tls\255mode).92 E -.92(PA)108 134.4 S
+(RAM rcvd\255tls\255peer).92 E .864
+(This quintet controls what possibly collected data is sho)144 146.4 R
+.865(wn at the published `)-.25 F(`Recei)-.74 E -.15(ve)-.25 G(d:').15 E
+3.365('h)-.74 G(eader)-3.365 E(that this system generates.)144 158.4 Q
+-.92(PA)108 187.2 S(RAM etrn\255cluster node\255name\255or\255address m\
+q2\255username mq2\255passwd).92 E .241(In load-balance clusters a netw)
+144 199.2 R .241(ork le)-.1 F -.15(ve)-.25 G 2.741(ll).15 G .241
+(oad-balancer may distrib)-2.741 F .241(ute the incoming SMTP connec-)
+-.2 F .088(tions to multiple real machines, and by using this parameter\
+ \(repeatedly\) to list those peers, system)144 211.2 R
+(can relay user initiated ETRN requests to all cluster nodes.)144 223.2
+Q/F1 10/Times-Italic@0 SF(This method r)144 247.2 Q(equir)-.37 E
(es that the sc)-.37 E(heduler runs its mailq service in MAILQv2 mode!)
--.15 E F0(Here is a possible con\214guration \214le:)108 172.8 Q/F2 10
-/Courier@0 SF(#)144 208.8 Q 6(#s)144 220.8 S
-(mtpserver.conf - autogenerated edition)-6 E(#)144 232.8 Q
-(#PARAM maxsize)144 244.8 Q(10000000 # Same as -M -option)48 E
-(#PARAM min-availspace)144 256.8 Q
-(5000 # Minimum free in POSTOFFICE after)30 E 180(##)144 268.8 S
+-.15 E F0 -.92(PA)108 276 S(RAM lmtp\255mode).92 E .283(When desiring t\
+o test LMTP \(RFC 2033\), this parameter can be turned on,)144 288 R F1
+(howe)2.782 E .282(ver ZMailer is no)-.15 F -.37(re)144 300 S
+(al LMTP server).37 E 2.5(,a)-1.11 G(nd this featur)-2.5 E 2.5(ei)-.37 G
+2.5(so)-2.5 G(nly for deb)-2.5 E(ug purposes.)-.2 E F0
+(Here is a possible con\214guration \214le:)108 328.8 Q/F2 10/Courier@0
+SF(#)144 364.8 Q 6(#s)144 376.8 S
+(mtpserver.conf - autogenerated edition)-6 E(#)144 388.8 Q
+(#PARAM maxsize)144 400.8 Q(10000000 # Same as -M -option)48 E
+(#PARAM min-availspace)144 412.8 Q
+(5000 # Minimum free in POSTOFFICE after)30 E 180(##)144 424.8 S
(message has arrived; in kBs.)-174 E(#PARAM max-error-recipients)144
-280.8 Q 6(3#M)12 G(ore than this is propably SPAM!)-6 E
-(#PARAM max-unknown-commands 10 # More than this is propably broken)144
-292.8 Q 180(##)144 304.8 S(client)-174 E(#PARAM MaxSameIpSource)144
-316.8 Q(10 # Max simultaneous connections)36 E 180(##)144 328.8 S
+436.8 Q 6(3#M)12 G(ore than this is probably SPAM!)-6 E
+(#PARAM max-unknown-commands 10 # More than this is probably broken)144
+448.8 Q 180(##)144 460.8 S(client)-174 E(#PARAM MaxSameIpSource)144
+472.8 Q(10 # Max simultaneous connections)36 E 180(##)144 484.8 S
(from any IP source address)-174 E
(#PARAM MaxParallelConnections 800 # Max simultaneous connections)144
-340.8 Q 180(##)144 352.8 S(in total to the server)-174 E
-(#PARAM TcpRcvBufferSize)144 364.8 Q(32000 # Should not need to set!)12
-E(#PARAM TcpXmitBufferSize 32000 # Should not need to set!)144 376.8 Q
-(#)144 388.8 Q(#PARAM ListenQueueSize)144 400.8 Q
-(10 # listen\(2\) parameter)36 E(#)144 412.8 Q(#PARAM RcptLimitCount)144
-424.8 Q(10000 # Max number of recipients for one)24 E 180(##)144 436.8 S
-(MAIL FROM session. Minimum: 100)-174 E(#)144 448.8 Q(#PARAM BindPort)
-144 460.8 Q 18(25 #)60 F(Binding port)6 E(#PARAM BindAddress)144 472.8 Q
+496.8 Q 180(##)144 508.8 S(in total to the server)-174 E
+(#PARAM TcpRcvBufferSize)144 520.8 Q(32000 # Should not need to set!)12
+E(#PARAM TcpXmitBufferSize 32000 # Should not need to set!)144 532.8 Q
+(#)144 544.8 Q(#PARAM ListenQueueSize)144 556.8 Q
+(10 # listen\(2\) parameter)36 E(#)144 568.8 Q(#PARAM RcptLimitCount)144
+580.8 Q(10000 # Max number of recipients for one)24 E 180(##)144 592.8 S
+(MAIL FROM session. Minimum: 100)-174 E(#)144 604.8 Q(#PARAM BindPort)
+144 616.8 Q 18(25 #)60 F(Binding port)6 E(#PARAM BindAddress)144 628.8 Q
6([0.0.0.0] #)12 F(Binding address - for multihomers..)6 E
(#PARAM BindAddress [IPv6.0::0] # and here is for IPv6 - NO SPACES!)144
-484.8 Q(#)144 496.8 Q 6(#E)144 508.8 S(nables of some commands:)-6 E 6
-(#PARAM DEBUGcmd)144 520.8 R 12(PARAM EXPNcmd)144 532.8 R 12
-(PARAM VRFYcmd)144 544.8 R 6(PARAM enable-router)144 556.8 R 90(##)144
-568.8 S(This is a security decission for you.)-84 E 90(##)144 580.8 S
-(This is needed for EXPN/VRFY and interactive)-84 E 90(##)144 592.8 S
-(processing of MAIL FROM and RCPT TO addresses.)-84 E 90(##)144 604.8 S
-(However it also may allow external user entrance)-84 E 90(##)144 616.8
-S(to ZMailer router shell environment with some)-84 E 90(##)144 628.8 S
-(suitably pervert input, if quotation rules are)-84 E 90(##)144 640.8 S
-(broken in the scripts.)-84 E(#)144 652.8 Q 6(#PARAM smtp-auth)144 664.8
-R 90(##)144 676.8 S(enable if you want to allow SMTP to autenticate)-84
-E 90(##)144 688.8 S(with the default code against system /etc/passwd)-84
-E 90(##)144 700.8 S(\(or whatever source)-84 E
-(getpwnam\(\) uses for it..\))12 E(#)144 712.8 Q 6
-(#PARAM AUTH-LOGIN-also-without-TLS)144 724.8 R F0 2.5(4S)283.5 768 S
-(ep 2000)-2.5 E(6)206.5 E EP
+640.8 Q(#)144 652.8 Q 6(#E)144 664.8 S(nables of some commands:)-6 E 6
+(#PARAM DEBUGcmd)144 676.8 R 12(PARAM EXPNcmd)144 688.8 R 12
+(PARAM VRFYcmd)144 700.8 R 6(PARAM enable-router)144 712.8 R 90(##)144
+724.8 S(This is a security decission for you.)-84 E F0(13 Oct 2000)
+281.28 768 Q(6)204.28 E EP
%%Page: 7 7
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
(VER\(8\))-.8 E/F1 10/Courier@0 SF 90(##)144 84 S
-(Enable, if the "AUTH LOGIN" is to be allowed to)-84 E 90(##)144 96 S
-(be used without running under SSL/TLS security)-84 E 90(##)144 108 S
-(envelope.)-84 E(#)144 120 Q 6(#PARAM MSA-mode)144 132 R 90(##)144 144 S
-(Message Submission Agent mode. Require)-84 E 90(##)144 156 S
-(successful user authentication during SMTP)-84 E 90(##)144 168 S
-(sessions initiated from outside of the trusted)-84 E 90(##)144 180 S
-(networks or the networks with relaying enabled)-84 E 90(##)144 192 S
-(\(see "fulltrustnet" and "relaycustnet" in)-84 E 90(##)144 204 S
-(smtp-policy.src file\).)-84 E(#)144 216 Q 6(#PARAM SMTP-auth-pipe)144
-228 R(/path/to/program)6 E 90(##)144 240 S
-(External authentication program. The)-84 E 90(##)144 252 S
-(authenticator should read a username from)-84 E 90(##)144 264 S
-(command line and a password from standard input.)-84 E 90(##)144 276 S
-(Exit status 0 means successful authentication.)-84 E(#)144 288 Q 6(#D)
-144 300 S(isablers of some facility adverticements)-6 E 6(#PARAM NoEHLO)
-144 312 R 6(#PARAM NoPIPELINING)144 324 R 6(#PARAM No8BITMIME)144 336 R
-6(#PARAM NoCHUNKING)144 348 R 6(#PARAM NoDSN)144 360 R 6(#PARAM NoETRN)
-144 372 R 6(#PARAM no-multiline-replies)144 384 R 6(#e)6 G
-(xcept to EHLO)-6 E(#)144 396 Q 6(#H)144 408 S(DR220 metatags:)-6 E 12
-(#%)144 420 S 6(%-)-12 G 6(-')-6 G(%' character)-6 E 12(#%)144 432 S 6
-(H-)-12 G 6(-S)-6 G(S->myhostname)-6 E 12(#%)144 444 S 6(I-)-12 G 6(-')
--6 G(+IDENT' if 'identflg' is set)-6 E 12(#%)144 456 S 6(V-)-12 G 6(-V)
--6 G(ersionNumb)-6 E 12(#%)144 468 S 6(T-)-12 G 6(-c)-6 G(urtime string)
--6 E 12(#%)144 480 S 6(X-)-12 G 6(-x)-6 G(latelang parameter)-6 E(#)144
-492 Q(#PARAM hdr220 %H ZMailer ESMTP-server %V running at Yoyodyne Inc.)
-144 504 Q
-(#PARAM hdr220 %H \(NO UCE\)\(NO UBE\) our local time is now %T)144 516
-Q(#)144 528 Q
-(PARAM help ------------------------------------------------------)144
-540 Q(PARAM help)144 552 Q
-(This mail-server is at Yoyodyne Propulsion Inc.)12 E(PARAM help)144 564
-Q(Our telephone number is: +1-234-567-8900, and)12 E(PARAM help)144 576
-Q(telefax number is: +1-234-567-8999)12 E(PARAM help)144 588 Q
-(Our business-hours are Mon-Fri: 0800-1700 \(TZ: -0700\))12 E
-(PARAM help)144 600 Q(PARAM help)144 612 Q
-(Questions regarding our email service should be sent)12 E(PARAM help)
-144 624 Q(via email to address)12 E(<postmaster@OURDOMAIN>)12 E
-(PARAM help)144 636 Q
-(Reports about abuse are to be sent to: <abuse@OURDOMAIN>)12 E
+(This is needed for EXPN/VRFY and interactive)-84 E 90(##)144 96 S
+(processing of MAIL FROM and RCPT TO addresses.)-84 E 90(##)144 108 S
+(However it also may allow external user entrance)-84 E 90(##)144 120 S
+(to ZMailer router shell environment with some)-84 E 90(##)144 132 S
+(suitably pervert input, if quotation rules are)-84 E 90(##)144 144 S
+(broken in the scripts.)-84 E(#)144 156 Q 6(#PARAM smtp-auth)144 168 R
+90(##)144 180 S(enable if you want to allow SMTP to autenticate)-84 E 90
+(##)144 192 S(with the default code against system /etc/passwd)-84 E 90
+(##)144 204 S(\(or whatever source)-84 E(getpwnam\(\) uses for it..\))12
+E(#)144 216 Q 6(#PARAM AUTH-LOGIN-also-without-TLS)144 228 R 90(##)144
+240 S(Enable, if the "AUTH LOGIN" is to be allowed to)-84 E 90(##)144
+252 S(be used without running under SSL/TLS security)-84 E 90(##)144 264
+S(envelope.)-84 E(#)144 276 Q 6(#PARAM MSA-mode)144 288 R 90(##)144 300
+S(Message Submission Agent mode. Require)-84 E 90(##)144 312 S
+(successful user authentication during SMTP)-84 E 90(##)144 324 S
+(sessions initiated from outside of the trusted)-84 E 90(##)144 336 S
+(networks or the networks with relaying enabled)-84 E 90(##)144 348 S
+(\(see "fulltrustnet" and "relaycustnet" in)-84 E 90(##)144 360 S
+(smtp-policy.src file\).)-84 E(#)144 372 Q 6(#PARAM SMTP-auth-pipe)144
+384 R(/path/to/program)6 E 90(##)144 396 S
+(External authentication program. The)-84 E 90(##)144 408 S
+(authenticator should read a username from)-84 E 90(##)144 420 S
+(command line and a password from standard input.)-84 E 90(##)144 432 S
+(Exit status 0 means successful authentication.)-84 E(#)144 444 Q 6(#D)
+144 456 S(isablers of some facility adverticements)-6 E 6(#PARAM NoEHLO)
+144 468 R 6(#PARAM NoPIPELINING)144 480 R 6(#PARAM No8BITMIME)144 492 R
+6(#PARAM NoCHUNKING)144 504 R 6(#PARAM NoDSN)144 516 R 6(#PARAM NoETRN)
+144 528 R 6(#PARAM no-multiline-replies)144 540 R 6(#e)6 G
+(xcept to EHLO)-6 E(#)144 552 Q 6(#H)144 564 S(DR220 metatags:)-6 E 12
+(#%)144 576 S 6(%-)-12 G 6(-')-6 G(%' character)-6 E 12(#%)144 588 S 6
+(H-)-12 G 6(-S)-6 G(S->myhostname)-6 E 12(#%)144 600 S 6(I-)-12 G 6(-')
+-6 G(+IDENT' if 'identflg' is set)-6 E 12(#%)144 612 S 6(V-)-12 G 6(-V)
+-6 G(ersionNumb)-6 E 12(#%)144 624 S 6(T-)-12 G 6(-c)-6 G(urtime string)
+-6 E 12(#%)144 636 S 6(X-)-12 G 6(-x)-6 G(latelang parameter)-6 E(#)144
+648 Q(#PARAM hdr220 %H ZMailer ESMTP-server %V running at Yoyodyne Inc.)
+144 660 Q
+(#PARAM hdr220 %H \(NO UCE\)\(NO UBE\) our local time is now %T)144 672
+Q(#)144 684 Q
(PARAM help ------------------------------------------------------)144
-648 Q(#)144 660 Q 6(#U)144 672 S
-(ncomment following for not to strip incoming addresses of)-6 E 6(#f)144
-684 S(orm: <@aa,@bb:cc@dd> into non-source-routed base form: <cc@dd>)-6
-E(#)144 696 Q(#PARAM allowsourceroute)144 708 Q(#)144 720 Q F0 2.5(4S)
-283.5 768 S(ep 2000)-2.5 E(7)206.5 E EP
+696 Q(PARAM help)144 708 Q
+(This mail-server is at Yoyodyne Propulsion Inc.)12 E(PARAM help)144 720
+Q(Our telephone number is: +1-234-567-8900, and)12 E F0(13 Oct 2000)
+281.28 768 Q(7)204.28 E EP
%%Page: 8 8
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E/F1 10/Courier@0 SF 6(#T)144 84 S(he policy database:)-6
-E 6(#\()144 96 S(NOTE: See `makedb' for its default suffixes!\))-6 E(#)
-144 108 Q 6(PARAM policydb)144 120 R 6
-(@DBTYPE@ @MAILVAR@/db/smtp-policy)18 F(#)144 132 Q 6(#E)144 144 S
+(VER\(8\))-.8 E/F1 10/Courier@0 SF(PARAM help)144 84 Q
+(telefax number is: +1-234-567-8999)12 E(PARAM help)144 96 Q
+(Our business-hours are Mon-Fri: 0800-1700 \(TZ: -0700\))12 E
+(PARAM help)144 108 Q(PARAM help)144 120 Q
+(Questions regarding our email service should be sent)12 E(PARAM help)
+144 132 Q(via email to address)12 E(<postmaster@OURDOMAIN>)12 E
+(PARAM help)144 144 Q
+(Reports about abuse are to be sent to: <abuse@OURDOMAIN>)12 E
+(PARAM help ------------------------------------------------------)144
+156 Q(#)144 168 Q 6(#U)144 180 S
+(ncomment following for not to strip incoming addresses of)-6 E 6(#f)144
+192 S(orm: <@aa,@bb:cc@dd> into non-source-routed base form: <cc@dd>)-6
+E(#)144 204 Q(#PARAM allowsourceroute)144 216 Q(#)144 228 Q 6(#T)144 240
+S(he policy database:)-6 E 6(#\()144 252 S
+(NOTE: See `makedb' for its default suffixes!\))-6 E(#)144 264 Q 6
+(PARAM policydb)144 276 R 6($DBTYPE $MAILVAR/db/smtp-policy)18 F(#)144
+288 Q 6(#E)144 300 S
(xternal program for received message content analysis:)-6 E 6
-(#PARAM contentfilter @MAILBIN@/smtp-content-policy-analysis)144 156 R 6
-(#PARAM tarpit)144 180 R 6(00 #N)6 G 6(o")-6 G
-(tarpit" for 4XX/5XX reply codes)-6 E 6(#PARAM tarpit)144 192 R(20 2)6 E
+(#PARAM contentfilter $MAILBIN/smtp-content-policy-analysis)144 312 R 6
+(#PARAM tarpit)144 336 R 6(00 #N)6 G 6(o")-6 G
+(tarpit" for 4XX/5XX reply codes)-6 E 6(#PARAM tarpit)144 348 R(20 2)6 E
6(#I)12 G(nitial delay: 20 secs, next = prev + \(prev * 2\))-6 E(#)144
-216 Q 6(#T)144 228 S(LSv1/SSLv[23] parameters;)-6 E 6(#a)144 240 S
-(ll must be used for the system to work!)-6 E(#)144 252 Q 6(#S)144 264 S
-12(ee doc/guides/openssl,)-6 F(or:)12 E 6(#h)144 276 S
+372 Q 6(#T)144 384 S(LSv1/SSLv[23] parameters;)-6 E 6(#a)144 396 S
+(ll must be used for the system to work!)-6 E(#)144 408 Q 6(#S)144 420 S
+12(ee doc/guides/openssl,)-6 F(or:)12 E 6(#h)144 432 S
(ttp://www.aet.tu-cottbus.de/personen/jaenicke/pfixtls/doc/setup.html)-6
-E(#)144 288 Q 6(#PARAM use-tls)144 300 R 6(#PARAM tls-CAfile)144 312 R
-(/opt/mail/db/smtpserver-CAcert.pem)36 E 6(#PARAM tls-cert-file)144 324
-R(/opt/mail/db/smtpserver-cert.pem)18 E 6(#PARAM tls-key-file)144 336 R
-(/opt/mail/db/smtpserver-key.pem)24 E 12(##)144 348 S
-(Then some futher thoughs that may materialize some time..)-6 E
-(#PARAM tls-loglevel)144 360 Q(0)30 E(#PARAM tls-ccert-vd)144 372 Q(0)30
-E(#PARAM tls-ask-cert)144 384 Q(0)30 E(#PARAM tls-require-cert 0)144 396
-Q(##PARAM tls-CApath ... \(somewhen: verify client's certificates\))144
-408 Q(##PARAM tls-enforce-tls 1)144 420 Q 6(#E)144 444 S
-(lements to be added into "Received:" header's)-6 E 6(#i)144 456 S
-(nitial comment part:)-6 E(#)144 468 Q(#PARAM rcvd-ident)144 480 Q 6(#T)
-42 G(he ident lookup result)-6 E 138(##)144 492 S
+E(#)144 444 Q 6(#PARAM use-tls)144 456 R(##PARAM listen-ssmtp)144 468 Q
+6(#Ad)24 G(eprecated TCP/465 port listener for SSL/SMTP)-6 E 6
+(#PARAM tls-CAfile)144 480 R($MAILVAR/db/smtpserver-CAcert.pem)36 E 6
+(#PARAM tls-cert-file)144 492 R($MAILVAR/db/smtpserver-cert.pem)18 E 6
+(#PARAM tls-key-file)144 504 R($MAILVAR/db/smtpserver-key.pem)24 E 12
+(##)144 516 S(Then some futher thoughs that may materialize some time..)
+-6 E(#PARAM tls-loglevel)144 528 Q(0)30 E(#PARAM tls-ccert-vd)144 540 Q
+(0)30 E(#PARAM tls-ask-cert)144 552 Q(0)30 E(#PARAM tls-require-cert 0)
+144 564 Q
+(##PARAM tls-CApath ... \(somewhen: verify client's certificates\))144
+576 Q(##PARAM tls-enforce-tls 1)144 588 Q 6(#E)144 612 S
+(lements to be added into "Received:" header's)-6 E 6(#i)144 624 S
+(nitial comment part:)-6 E(#)144 636 Q(#PARAM rcvd-ident)144 648 Q 6(#T)
+42 G(he ident lookup result)-6 E 138(##)144 660 S
(\(or even admitting it having queried\))-132 E(#PARAM rcvd-whoson)144
-504 Q 6(#L)36 G(ikewise for "whoson")-6 E(#PARAM rcvd-auth-user)144 516
-Q 6(#A)18 G(uthenticated Username)-6 E(#PARAM rcvd-tls-mode)144 528 Q 6
-(#C)24 G(ipher or not)-6 E(#PARAM rcvd-tls-ccert)144 540 Q 6(#C)18 G
-(lient Certificate reference)-6 E 6(#Al)144 564 S
-(oad-balanced server cluster may want to communicate)-6 E 6(#t)144 576 S
-(he ETRN request to cluster components, here is how:)-6 E 6(#S)144 588 S
-(ee also:)-6 E(doc/guides/etrn-cluster)12 E(#)144 600 Q
-(#PARAM etrn-cluster localhost mq2-username mq2-passwd)144 612 Q
-(#PARAM etrn-cluster node-2-name-or-address mq2-username mq2-passwd)144
-624 Q
-(#PARAM etrn-cluster node-3-name-or-address mq2-username mq2-passwd)144
-636 Q(#...)144 648 Q
-(#PARAM etrn-cluster node-40-name-or-address mq2-username mq2-passwd)144
-660 Q(#)144 684 Q(#)144 696 Q 6(#H)144 708 S 24
-(ELO/EHLO-pattern style-flags)-6 F 90(#[)144 720 S(max loadavg])-90 E F0
-2.5(4S)283.5 768 S(ep 2000)-2.5 E(8)206.5 E EP
+672 Q 6(#L)36 G(ikewise for "whoson")-6 E(#PARAM rcvd-auth-user)144 684
+Q 6(#A)18 G(uthenticated Username)-6 E(#PARAM rcvd-tls-mode)144 696 Q 6
+(#C)24 G(ipher or not)-6 E(#PARAM rcvd-tls-ccert)144 708 Q 6(#C)18 G
+(lient Certificate reference)-6 E F0(13 Oct 2000)281.28 768 Q(8)204.28 E
+EP
%%Page: 9 9
%%BeginPageSetup
BP
%%EndPageSetup
/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
-(VER\(8\))-.8 E/F1 10/Courier@0 SF(#)144 84 Q 60(localhost 999)144 96 R
-(ftveR)6 E 18(some.host.domain 999)144 108 R
-(!NO EMAIL ACCEPTED FROM YOUR MACHINE)6 E 6(#I)144 120 S 6(ft)-6 G
-(he host presents itself as:)-6 E(HELO [1.2.3.4])12 E(be lenient to)12 E
-6(#i)144 132 S 6(t.. The)-6 F
-(syntax below is due to these patterns being SH-GLOB)6 E 6(#s)144 144 S
+(VER\(8\))-.8 E/F1 10/Courier@0 SF 6(#Al)144 84 S
+(oad-balanced server cluster may want to communicate)-6 E 6(#t)144 96 S
+(he ETRN request to cluster components, here is how:)-6 E 6(#S)144 108 S
+(ee also:)-6 E(doc/guides/etrn-cluster)12 E(#)144 120 Q
+(#PARAM etrn-cluster localhost mq2-username mq2-passwd)144 132 Q
+(#PARAM etrn-cluster node-2-name-or-address mq2-username mq2-passwd)144
+144 Q
+(#PARAM etrn-cluster node-3-name-or-address mq2-username mq2-passwd)144
+156 Q(#...)144 168 Q
+(#PARAM etrn-cluster node-40-name-or-address mq2-username mq2-passwd)144
+180 Q(#)144 204 Q(#)144 216 Q 6(#H)144 228 S 24
+(ELO/EHLO-pattern style-flags)-6 F 90(#[)144 240 S(max loadavg])-90 E(#)
+144 252 Q 60(localhost 999)144 264 R(ftveR)6 E 18(some.host.domain 999)
+144 276 R(!NO EMAIL ACCEPTED FROM YOUR MACHINE)6 E 6(#I)144 288 S 6(ft)
+-6 G(he host presents itself as:)-6 E(HELO [1.2.3.4])12 E(be lenient to)
+12 E 6(#i)144 300 S 6(t.. The)-6 F
+(syntax below is due to these patterns being SH-GLOB)6 E 6(#s)144 312 S
(tyle patterns where the brackets are special characters.)-6 E 72
-(\\[*\\] 999)144 156 R(ve)6 E 6(#P)144 168 S
+(\\[*\\] 999)144 324 R(ve)6 E 6(#P)144 336 S
(er default demant strict syntactic adherence, including fully)-6 E 6
-(#q)144 180 S(ualified addresses for)-6 E(MAIL FROM, and RCPT TO.)12 E
-(To be lenient)12 E 6(#o)144 192 S 6(nt)-6 G
-(hat detail, remove the "R" from "veR" string below:)-6 E 114(*9)144 204
-S(99 veR)-114 E/F2 10.95/Times-Bold@0 SF -.81(PA)72 232.8 S(M-SUPPOR).81
-E 2.738(TF)-.438 G(OR SMTP-A)-2.738 E(UTH)-.548 E F0
-(If the system has <security/pam_appl.h> \214le, follo)108 244.8 Q
-(wing \214le will also be needed for the system:)-.25 E F1
-(------- /etc/pam.d/smtpauth-login -----------)108 273.6 Q(#%PAM-1.0)108
-285.6 Q 24(auth required)108 297.6 R(/lib/security/pam_pwdb.so shadow)12
-E 24(auth required)108 309.6 R(/lib/security/pam_nologin.so)12 E 6
-(account required /lib/security/pam_pwdb.so)108 321.6 R F2(FILES)72
-338.4 Q/F3 10/Times-Italic@0 SF(/etc/zmailer)108 350.4 Q(.conf)-1.11 E
-(/var/spool/postof)108 362.4 Q(\214ce/.pid.smtpserver \(POST)-.18 E
-(OFFICE/.pid.smtpserver\))-.18 E(/local/shar)108 374.4 Q
+(#q)144 348 S(ualified addresses for)-6 E(MAIL FROM, and RCPT TO.)12 E
+(To be lenient)12 E 6(#o)144 360 S 6(nt)-6 G
+(hat detail, remove the "R" from "veR" string below:)-6 E 114(*9)144 372
+S(99 veR)-114 E/F2 10.95/Times-Bold@0 SF(CONTENTFIL)72 400.8 Q
+(TER INTERF)-1.007 E -.602(AC)-.986 G(E).602 E F0(The)108 412.8 Q/F3 10
+/Times-Italic@0 SF(content\214lter)3.206 E F0 .706
+(program is started without parameters running userid of)3.206 F F3
+(daemon)3.206 E F0 .707(in directory $POST)3.206 F(OF-)-.18 E(FICE.)108
+424.8 Q .405(The program must silently w)108 441.6 R .405(ait for input\
+, which is full path to the message spool \214le, analyze it, and reply)
+-.1 F .765(with e)108 453.6 R .766
+(xactly one line matching rule of: "%i " -- be)-.15 F .766
+(gin with signed inte)-.15 F(ger)-.15 E 3.266(,t)-.4 G .766(hen ha)
+-3.266 F 1.066 -.15(ve o)-.2 H .766(ne or more whites-).15 F
+(pace, then whate)108 465.6 Q -.15(ve)-.25 G 2.5<728c>.15 G
+(lter writer lik)-2.5 E(ed.)-.1 E(General rule:)108 482.4 Q F1
+(-1 negatives are condemned into rejection)114 506.4 Q 6(0z)120 518.4 S
+(ero is ok! gladly accepted)-6 E 6(1p)120 530.4 S
+(ositives are sent into the freezer)-6 E F0(The program)108 547.2 Q F3
+(may)2.5 E F0
+(produce also the numeric SMTP reply codes in its response te)2.5 E(xt:)
+-.15 E F1(-1)114 571.2 Q
+(-1 250 2.7.1 Glad to see some spam, immediately destroyed :\))114 583.2
+Q(0)120 595.2 Q 6(02)120 607.2 S(50 2.6.0 Message OK!)-6 E(1)120 619.2 Q
+6(15)120 631.2 S(50 5.7.1 That is spam, rejected!)-6 E F0 .817
+(If the message has no te)108 648 R .817(xt, some def)-.15 F .817
+(aults are supplied.)-.1 F .817(If the message te)5.817 F .817
+(xt starts with numbers, it is pre-)-.15 F .43
+(sumed that it contains both the SMTP reply code, and ENHANCEDST)108 660
+R -1.11(AT)-.93 G .431(USCODE before the te)1.11 F 2.931(xt. \(If)-.15 F
+(no)2.931 E(ENHANCEDST)108 672 Q -1.11(AT)-.93 G
+(USCODE part is present, then some possibly senseless def)1.11 E
+(ault is supplied.\))-.1 E(Interf)108 688.8 Q .23(ace message te)-.1 F
+.23(xt lines be)-.15 F .229(ginning with an)-.15 F .229(ything e)-.15 F
+.229(xcept signed inte)-.15 F .229(ger are logged, and the communica-)
+-.15 F .617(tion channel from the smtpserv)108 700.8 R .617
+(er to the content\214lter program is closed.)-.15 F(Interf)5.618 E .618
+(ace continues to scan things)-.1 F .341(reported by the content\214lte\
+r program, and if no properly formatted line appears, def)108 712.8 R
+.34(ault is to send the mes-)-.1 F(sage into the freezer \("-1"\);)108
+724.8 Q(13 Oct 2000)281.28 768 Q(9)204.28 E EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(SMTPSER)72 48 Q 314.86(VER\(8\) SMTPSER)-.8 F
+(VER\(8\))-.8 E/F1 10.95/Times-Bold@0 SF -.81(PA)72 84 S(M-SUPPOR).81 E
+2.738(TF)-.438 G(OR SMTP-A)-2.738 E(UTH)-.548 E F0
+(If the system has <security/pam_appl.h> \214le, follo)108 96 Q
+(wing \214le will also be needed for the system:)-.25 E/F2 10/Courier@0
+SF(------- /etc/pam.d/smtpauth-login -----------)108 124.8 Q(#%PAM-1.0)
+108 136.8 Q 24(auth required)108 148.8 R
+(/lib/security/pam_pwdb.so shadow)12 E 24(auth required)108 160.8 R
+(/lib/security/pam_nologin.so)12 E 6
+(account required /lib/security/pam_pwdb.so)108 172.8 R F1(FILES)72
+189.6 Q/F3 10/Times-Italic@0 SF(/etc/zmailer)108 201.6 Q(.conf)-1.11 E
+(/var/spool/postof)108 213.6 Q(\214ce/.pid.smtpserver \(POST)-.18 E
+(OFFICE/.pid.smtpserver\))-.18 E(/local/shar)108 225.6 Q
(e/mail/smtpserver)-.37 E(.conf \(MAILSHARE/smtpserver)-1.11 E(.conf\))
--1.11 E F2(SEE ALSO)72 391.2 Q F0(router\(8\))108 403.2 Q(RFC 821)108
-420 Q(The basic SMTP speci\214cation)146.1 E(RFC 1123)108 432 Q -1.11
-(Va)141.1 G(rious 821 parameter clari\214cations)1.11 E(Se)108 456 Q
--.15(ve)-.25 G(ral e).15 E(xtended SMTP f)-.15 E
-(acilities are implemented:)-.1 E(RFC 1341/1521/2045)108 480 Q
-(MIME speci\214cation \(body)95.54 E 2.5(,f)-.65 G(ormats\))-2.5 E
-(RFC 1342/1522/2047)108 492 Q(MIME speci\214cation \(headers\))95.54 E
-(RFC 1425/1651/1869)108 504 Q(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G(rk)
-.1 E(RFC 1426/1652)108 516 Q(ESMTP 8BITMIME)118.32 E(RFC 1427/1653/1870)
-108 528 Q(ESMTP SIZE)95.54 E(RFC 1428)108 540 Q(Basic MIME con)141.1 E
--.15(ve)-.4 G(rsion rules).15 E(RFC 1830)108 552 Q(ESMTP CHUNKING)141.1
-E(RFC 1854/2197)108 564 Q(ESMTP PIPELINING)118.32 E(RFC 1891)108 576 Q
-(ESMTP DSN)141.1 E(RFC 1985)108 588 Q(ESMTP ETRN)141.1 E(RFC 2034)108
-600 Q(ESMTP ENHANCEDST)141.1 E -1.11(AT)-.93 G(USCODES)1.11 E(RFC 2487)
-108 612 Q(ESMTP ST)141.1 E(AR)-.93 E(TTLS)-.6 E(RFC 2554+M$ Exchange)108
-624 Q(ESMTP A)79.64 E(UTH LOGIN)-.55 E(RFC 2554+NetScape)108 636 Q
-(ESMTP A)97.14 E(UTH=LOGIN)-.55 E(RFC 2852)108 648 Q(ESMTP DELIVERBY)
-141.1 E F2 -.548(AU)72 664.8 S(THOR).548 E F0
-(This program authored and cop)108 676.8 Q(yright by:)-.1 E
-(Rayan Zachariassen \(w)108 688.8 Q(as at U of T)-.1 E(oronto\))-.8 E
-(Extended SMTP)108 700.8 Q 2.5(,p)-1.11 G(olic)-2.5 E 2.5(yf)-.15 G
-(acilities, etc. by)-2.6 E(Matti Aarnio)108 712.8 Q
-(<[email protected].\214>)5 E 2.5(4S)283.5 768 S(ep 2000)-2.5 E(9)206.5 E EP
+-1.11 E(/etc/pam.d/smtpauth-lo)108 237.6 Q(gin \(if P)-.1 E(AM mec)-.9 E
+(hanism is pr)-.15 E(esent and plain-passwor)-.37 E 2.5(da)-.37 G
+(uthentication is wanted\))-2.5 E F1(SEE ALSO)72 254.4 Q F0(router\(8\))
+108 266.4 Q(RFC 821)108 283.2 Q(The basic SMTP speci\214cation)146.1 E
+(RFC 1123)108 295.2 Q -1.11(Va)141.1 G
+(rious 821 parameter clari\214cations)1.11 E(Se)108 319.2 Q -.15(ve)-.25
+G(ral e).15 E(xtended SMTP f)-.15 E(acilities are implemented:)-.1 E
+(RFC 1341/1521/2045)108 343.2 Q(MIME speci\214cation \(body)95.54 E 2.5
+(,f)-.65 G(ormats\))-2.5 E(RFC 1342/1522/2047)108 355.2 Q
+(MIME speci\214cation \(headers\))95.54 E(RFC 1425/1651/1869)108 367.2 Q
+(ESMTP EHLO frame)95.54 E -.1(wo)-.25 G(rk).1 E(RFC 1426/1652)108 379.2
+Q(ESMTP 8BITMIME)118.32 E(RFC 1427/1653/1870)108 391.2 Q(ESMTP SIZE)
+95.54 E(RFC 1428)108 403.2 Q(Basic MIME con)141.1 E -.15(ve)-.4 G
+(rsion rules).15 E(RFC 1830)108 415.2 Q(ESMTP CHUNKING)141.1 E
+(RFC 1854/2197)108 427.2 Q(ESMTP PIPELINING)118.32 E(RFC 1891)108 439.2
+Q(ESMTP DSN)141.1 E(RFC 1985)108 451.2 Q(ESMTP ETRN)141.1 E(RFC 2033)108
+463.2 Q(LMTP mode)141.1 E(RFC 2034)108 475.2 Q(ESMTP ENHANCEDST)141.1 E
+-1.11(AT)-.93 G(USCODES)1.11 E(RFC 2487)108 487.2 Q(ESMTP ST)141.1 E(AR)
+-.93 E(TTLS)-.6 E(RFC 2554+M$ Exchange)108 499.2 Q(ESMTP A)79.64 E
+(UTH LOGIN)-.55 E(RFC 2554+NetScape)108 511.2 Q(ESMTP A)97.14 E
+(UTH=LOGIN)-.55 E(RFC 2852)108 523.2 Q(ESMTP DELIVERBY)141.1 E F1 -.548
+(AU)72 540 S(THOR).548 E F0(This program authored and cop)108 552 Q
+(yright by:)-.1 E(Rayan Zachariassen \(w)108 564 Q(as at U of T)-.1 E
+(oronto\))-.8 E(Extended SMTP)108 576 Q 2.5(,p)-1.11 G(olic)-2.5 E 2.5
+(yf)-.15 G(acilities, etc. by)-2.6 E(Matti Aarnio)108 588 Q
+(<[email protected].\214>)5 E(13 Oct 2000)281.28 768 Q(10)199.28 E EP
%%Trailer
end
%%EOF
Index: man/vacation.1.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/vacation.1.ps,v
retrieving revision 1.32
retrieving revision 1.36
diff -u -r1.32 -r1.36
--- man/vacation.1.ps   2000/09/04 12:54:22     1.32
+++ man/vacation.1.ps   2000/10/17 11:12:04     1.36
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:34 2000
+%%CreationDate: Tue Oct 17 14:11:14 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
Index: man/zmsh.1
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/zmsh.1,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- man/zmsh.1  1998/02/10 21:01:48     1.1.1.1
+++ man/zmsh.1  2000/10/12 20:00:48     1.2
@@ -1,4 +1,4 @@
-.\" $Header: /home/mea/src/CVSROOT/zmailer/man/zmsh.1,v 1.1.1.1 1998/02/10 21:01:48 mea Exp $
+.\" $Header: /home/mea/src/CVSROOT/zmailer/man/zmsh.1,v 1.2 2000/10/12 20:00:48 mea Exp $
.ds ]W ZMailer 2.99
.TH ZMSH 1 "24 Dec 1994"
.SH NAME
@@ -443,4 +443,4 @@
.br
Some "small" tweaks by:
.br
-Matti Aarnio <[email protected]>
+Matti Aarnio <[email protected]>
Index: man/zmsh.1.ps
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/man/zmsh.1.ps,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- man/zmsh.1.ps       2000/09/04 12:54:23     1.7
+++ man/zmsh.1.ps       2000/10/16 11:32:39     1.9
@@ -1,6 +1,6 @@
%!PS-Adobe-3.0
%%Creator: groff version 1.16
-%%CreationDate: Mon Sep  4 15:51:34 2000
+%%CreationDate: Fri Oct 13 17:53:36 2000
%%DocumentNeededResources: font Times-Roman
%%+ font Times-Bold
%%+ font Times-Italic
@@ -557,8 +557,8 @@
(SEE ALSO)72 326.4 Q F0(sh\(1\), router\(8\))108 338.4 Q F1 -.548(AU)72
355.2 S(THOR).548 E F0(This program authored and cop)108 367.2 Q
(yright by:)-.1 E(Rayan Zachariassen <[email protected]>)108 379.2 Q
-(Some "small" tweaks by:)108 391.2 Q(Matti Aarnio <mea@utu.\214>)108
-403.2 Q(24 Dec 1994)280.45 768 Q(5)203.45 E EP
+(Some "small" tweaks by:)108 391.2 Q(Matti Aarnio <[email protected].\214>)
+108 403.2 Q(24 Dec 1994)280.45 768 Q(5)203.45 E EP
%%Trailer
end
%%EOF
Index: private/SONERA.mailbox.configure
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/private/SONERA.mailbox.configure,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- private/SONERA.mailbox.configure    1999/07/19 23:06:21     1.2
+++ private/SONERA.mailbox.configure    2000/09/25 10:59:24     1.3
@@ -1,6 +1,6 @@
#!/bin/sh

-SONERA="50-SONERA-V2.4" # ( = 2.99.51patch0 )
+SONERA="54-SONERA-V2.6" # ( = 2.99.54patch1 )
ZVERSION="2.99.$SONERA"

#( cd transports/mailbox; rm sieve.c; ln private/sieve.c . )
@@ -16,7 +16,12 @@
rm -f config.cache config.status
set -x

-./configure                                    \
+export CC CFLAGS
+CC=gcc
+CFLAGS="-g -O"
+MAKE=${MAKE:=make}
+
+../configure                                   \
  --prefix=/pop/opt/mail                       \
  --with-zconfig=/pop/opt/mail/zmailer.conf    \
  --with-logdir=/logs/mail                     \
@@ -26,23 +31,25 @@
  --with-tcp-wrappers=/usr/local/lib           \
  --with-generic-include="-I/aa/include -I/usr/local/include"  \
  --with-generic-library="-L/usr/local/lib"    \
-  --with-getpwnam-library="-L/aa/lib -lfakeauth0 -lcrypt -laa0 -laautils" \
+  --with-getpwnam-library="/aa/lib/libauth.a /aa/lib/libmd5crypt.a /aa/lib/libaa0.a " \
  --with-privatembox                           \
  --with-privateauth                           \
  --with-ldap-prefix="`/bin/pwd`/private"

-(cd private/lib;make clean;make)
+(cd ../;tar cf - private)|tar xf -
+(cd private; ln -s include lib)
+(cd private/lib;make clean;$MAKE)

-make PATCHLEVEL="$SONERA" || exit $?
+$MAKE PATCHLEVEL="$SONERA" || exit $?

# --------- build Solaris package out of the stuff -------------
# ------- THIS WILL NOT CONTAIN CUSTOMIZED CFG FILES -----------

rm -rf /tmp/zm-inst
-make install  prefix=/tmp/zm-inst || exit $?
+$MAKE install  prefix=/tmp/zm-inst || exit $?
cd man
- make install  MANDIR=/tmp/zm-inst/usr/man || exit $?
+ $MAKE install  MANDIR=/tmp/zm-inst/usr/man || exit $?
cd ..

cd packaging/solaris
-make pkgs prefix=/tmp/zm-inst VERSION="$ZVERSION"
+$MAKE pkgs prefix=/tmp/zm-inst SUFF=mbox VERSION="$ZVERSION"
Index: proto/Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/Makefile.in,v
retrieving revision 1.38
retrieving revision 1.41
diff -u -r1.38 -r1.41
--- proto/Makefile.in   2000/05/28 21:59:09     1.38
+++ proto/Makefile.in   2000/10/20 17:07:30     1.41
@@ -14,9 +14,9 @@
               newdbprocessor post-install.sh

all:
-       @echo Usage: '"make [ dirs | config | mailbin | mailshare | db | cf | forms | install | install-bin ]"'
+       @echo Usage: '"make [ dirs | config | mailbin | mailshare | db | cf | forms | guides | install | install-bin ]"'

-install: dirs mailbin mailshare db cf forms
+install: dirs mailbin mailshare db cf forms guides

install-bin: dirs mailbin cf db

@@ -78,6 +78,10 @@
               echo $(MKDIR) $(prefix)$$MAILSHARE/bak &&       \
                       $(MKDIR) $(prefix)$$MAILSHARE/bak ;     \
       fi ;                                                    \
+       if [ ! -d $(prefix)$$MAILSHARE/guides ]; then           \
+               echo $(MKDIR) $(prefix)$$MAILSHARE/guides &&    \
+                       $(MKDIR) $(prefix)$$MAILSHARE/guides ;  \
+       fi ;                                                    \
       if [ ! -d $(prefix)$$MAILBIN ]; then                    \
               echo $(MKDIR) $(prefix)$$MAILBIN &&             \
                       $(MKDIR) $(prefix)$$MAILBIN ;           \
@@ -156,13 +160,9 @@
       if [ ! -d "$$FORMSDIR/proto" ]; then    \
               $(MKDIR) "$$FORMSDIR/proto" ;   \
       fi ;                                    \
-       cd $(srcdir);                           \
-       for file in forms/????* ;               \
+       for file in ${srcdir}/forms/????* ;     \
       do                                      \
               name="`basename $$file`" ;      \
-               if [ "$$name" = bak ] ; then    \
-                       continue ;              \
-               fi ;                            \
               echo $(INSTALL) -m 644 $$file $$FORMSDIR/proto/$$name ; \
               $(INSTALL) -m 644 $$file $$FORMSDIR/proto/$$name ;      \
       done )
@@ -209,10 +209,18 @@
               foo-file ;                                      \
       )

+
+guides:        FRC
+       -. $(PZCONFIG) ;                                        \
+       MAILSHARE=$(prefix)$$MAILSHARE ;                        \
+       src=$(srcdir)/$(TOPDIR)/doc/guides ;                    \
+       cp -p $$src/* $$MAILSHARE/guides/
+
+
clean: FRC
       rm -f ./+* *~
distclean: clean
-       rm -f Makefile sm.conf smtpserver.conf zmailer.sh \
+       rm -f Makefile sm.conf zmailer.sh \
               newfqdnaliases newaliases newdb mailrm.sh \
               scheduler.conf post-install.sh smtp-tls.conf
depend:
Index: proto/newdbprocessor.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/newdbprocessor.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- proto/newdbprocessor.in     2000/09/18 23:18:45     1.6
+++ proto/newdbprocessor.in     2000/10/31 17:49:50     1.7
@@ -89,7 +89,7 @@

       next unless(m/^[0-9a-zA-Z]/);
       chomp;
-       ($rname,$rest) = split(' ',$_);
+       ($rname,$rest) = split(' ',$_,2);
       $rels{$rname} = 1;
       push @inps, $_;

@@ -117,7 +117,7 @@
    $oo='';
    # --- construct each relation, and binding at lookup, generate the db
    foreach $inp (@inps) {
-       ($rname,$rtype,$rpriv,$rndbopt, $rdbfile, $rdbflags) = split(' ',$inp);
+       ($rname,$rtype,$rpriv,$rndbopt, $rdbfile, $rdbflags) = split(' ',$inp,6);
       next unless ( $rel eq $rname );

       $rn="${rel}_$rnum";
Index: proto/scheduler.auth.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/scheduler.auth.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- proto/scheduler.auth.in     2000/05/28 20:25:38     1.1
+++ proto/scheduler.auth.in     2000/10/12 20:00:48     1.2
@@ -7,7 +7,10 @@
#   - Enabled attributes (tokens, space separated)
#   - Addresses in brackets plus netmask widths:  [1.2.3.4]/32
#
-# Default-account for 'mailq' is 'nobody' with password 'nobody'.
+# Same userid CAN appear multiple times, parsing will pick the first
+# instance of it which has matching IP address set
+#
+# The default-account for 'mailq' is 'nobody' with password 'nobody'.
# Third field is at the moment a WORK IN PROGRESS!
#
# SECURITY NOTE:
@@ -21,7 +24,11 @@
#      TT      "SHOW QUEUE THREADS", "SHOW THREAD channel/host"
#      ETRN    "START THREAD channel host"
#      KILL    "KILL THREAD channel host", "KILL MSG spoolid"
+#
+# -- "nobody" via loopback gets different treatment from
+#    "nobody" from anywhere else.
#
-nobody:nobody:SNMP ETRN:[0.0.0.0]/0
-#watcher:zzzzz:SNMP QQ TT ETRN:[127.0.0.0]/8 [192.168.0.1]/32
-#root:zzzzzzz:ALL:[127.0.0.0]/8 [192.168.0.2]/32
+nobody:nobody:SNMP QQ TT ETRN:  [127.0.0.0]/8 [ipv6.0::1]/128
+nobody:nobody:SNMP ETRN:        [0.0.0.0]/0   [ipv6.0::0]/0
+#watcher:zzzzz:SNMP QQ TT ETRN: [127.0.0.0]/8 [192.168.0.1]/32
+#root:zzzzzzz:ALL:              [127.0.0.0]/8 [192.168.0.2]/32
Index: proto/scheduler.conf.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/scheduler.conf.in,v
retrieving revision 1.11
retrieving revision 1.13
diff -u -r1.11 -r1.13
--- proto/scheduler.conf.in     2000/03/03 09:03:48     1.11
+++ proto/scheduler.conf.in     2000/10/12 20:00:48     1.13
@@ -154,11 +154,8 @@
       maxchannel=0
       maxring=20
       #
-       maxta=250 # OSF/1 has 4096 files per process. Don't overbook :-)
+       maxta=0 # Let it be automagically determined
       #
-       # skew is maximum number of tries before the retry time is
-       # aligned to a standard boundary (seconds modulo interval).
-       skew=1
       # default uid/gid of transport agents
       user=root
       group=daemon
@@ -263,14 +260,7 @@
       # Or with PROCMAIL as the local delivery agent:
       #command="sm -8c $channel procm"

-# smtpx is a channel where the delivery is done without checking at MXes;
-# rather only on A/AAAA (address) entries:
-smtpx/*
-       maxchannel=90
-       maxring=10
-       command="smtp -c smtpx -x -s"

-
# Sometimes we may want to PUNT all out to somewhere without regarding
# on what the routing said:
#
@@ -358,6 +348,26 @@
       command="smtp -s" # -l ${LOGDIR}/smtp"

#
+# Connections to the outside shouldn't duplicate effort so we only allow one
+# per destination.
+#
+smtp/*
+       maxchannel=199
+       maxring=50
+       command="smtp -s" # -l ${LOGDIR}/smtp"
+
+#
+#  LMTP (RFC 2033) protocol driver with presumed "standard" port of 2525.
+#
+
+smtp-lmtp/*
+       maxchannel=199
+       maxring=20
+       interval=1m
+       retries="1 3 7 15"
+       command="smtp -c $channel -M -x -p 2525 -s -l ${LOGDIR}/smtp-lmtp"
+
+#
# These messages will go only into the queue, and need explicite
# SMTP mediated ETRN request, before they become flushed out.
#
@@ -368,7 +378,7 @@
       interval=1h
       retries="12"
       queueonly
-       command="smtp -s -c $channel -l ${LOGDIR}/smtp-etrn"
+       command="smtp -c $channel -s" # -l ${LOGDIR}/smtp-etrn"

#
# Destinations desired to use TLS (a.k.a. SSL) encryption can be
@@ -382,14 +392,41 @@
       interval=1h
       retries="12"
       queueonly
-       command="smtp -s -c $channel -T ${MAILSHARE}/smtp-tls.conf -l ${LOGDIR}/smtp-tls"
+       command="smtp -c $channel -s -S ${MAILSHARE}/smtp-tls.conf" # -l ${LOGDIR}/smtp-tls"

-# Connections to the outside shouldn't duplicate effort so we only allow one
-# per destination.
-smtp/*
+# smtpx is a channel where the delivery is done without checking at MXes;
+# rather only on A/AAAA (address) entries:
+smtpx/*
+       maxchannel=90
+       maxring=10
+       command="smtp -c $channel -x -s" # -l ${LOGDIR}/smtpx"
+
+# Connections to places which sit behind broken firewalls, e.g. Cisco PIX
+# versions with allowing EHLO to go thru with feature reply, but then
+# rejecting all ESMTP protocol features listed at that reply...
+smtp77/*
       maxchannel=199
       maxring=50
-       command="smtp -s" # -l ${LOGDIR}/smtp"
+       command="smtp -c $channel -77 -s" # -l ${LOGDIR}/smtp77"
+
+# Combination of smtp77 and smtpx
+smtp77x/*
+       maxchannel=199
+       maxring=50
+       command="smtp -c $channel -77 -x -s" # -l ${LOGDIR}/smtp77x"
+
+# Connections to places we want to drive 8-bit-clean channel to
+# independent of what EHLO tells (or does not tell)
+smtp8/*
+       maxchannel=199
+       maxring=50
+       command="smtp -c $channel -8 -s" # -l ${LOGDIR}/smtp8"
+
+# Combination of smtp8 and smtpx
+smtp8x/*
+       maxchannel=199
+       maxring=50
+       command="smtp -c $channel -8 -x -s" # -l ${LOGDIR}/smtp8x"

# Error messages.  Delivery can be retried at leisure.
error/*
Index: proto/smtpserver.conf.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/smtpserver.conf.in,v
retrieving revision 1.31
retrieving revision 1.34
diff -u -r1.31 -r1.34
--- proto/smtpserver.conf.in    2000/06/08 00:48:34     1.31
+++ proto/smtpserver.conf.in    2000/10/31 17:49:50     1.34
@@ -4,7 +4,7 @@
#PARAM maxsize              10000000   # Same as -M -option
#PARAM min-availspace           5000    # Minimum free in POSTOFFICE after
#                                       # message has arrived; in KILOBYTES.
-#PARAM max-error-recipients        3   # More than this is propably SPAM!
+#PARAM max-error-recipients        3   # More than this is probably SPAM!
#PARAM max-unknown-commands       10    # Max unknown cmds before we hung up
#
#PARAM MaxSameIpSource           10    # Max simultaneous connections
@@ -103,10 +103,10 @@
#
# The policy database:  (NOTE: See  'makedb'  for its default suffixes!)
#
-PARAM  policydb   @DBTYPE@  @MAILVAR@/db/smtp-policy
+PARAM  policydb   $DBTYPE  $MAILVAR/db/smtp-policy
#
# External program for received message content analysis:
-#PARAM  contentfilter  @MAILBIN@/smtp-contentfilter
+#PARAM  contentfilter  $MAILBIN/smtp-contentfilter

#
#PARAM  tarpit 0 0   # No "tarpit" for 4XX/5XX reply codes
@@ -119,9 +119,9 @@
# http://www.aet.tu-cottbus.de/personen/jaenicke/pfixtls/doc/setup.html
#
#PARAM use-tls
-#PARAM tls-CAfile      @MAILVAR@/db/smtpserver-CAcert.pem
-#PARAM tls-cert-file   @MAILVAR@/db/smtpserver-cert.pem
-#PARAM tls-key-file    @MAILVAR@/db/smtpserver-key.pem
+#PARAM tls-CAfile      $MAILVAR/db/smtpserver-CAcert.pem
+#PARAM tls-cert-file   $MAILVAR/db/smtpserver-cert.pem
+#PARAM tls-key-file    $MAILVAR/db/smtpserver-key.pem
#  # If system default SSL-session-cache is to be used ?
#PARAM  tls-use-scache
#PARAM  tls-scache-timeout 3600 # (cache timeout in seconds)
Index: proto/zmailer.sh.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/zmailer.sh.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- proto/zmailer.sh.in 2000/03/31 14:50:57     1.11
+++ proto/zmailer.sh.in 2000/10/12 20:00:48     1.12
@@ -141,9 +141,9 @@
                        ;;
                *)
                       checkfreeze
-                        cd /
+                        cd $POSTOFFICE
                        if [ -f $MAILSHARE/smtpserver.conf ]; then
-                            cd /; smtpserver $SMTPOPTIONS
+                            smtpserver $SMTPOPTIONS
                        elif [ -d $MAILSHARE/smtpserver.conf ]; then
                            if [ -e $POSTOFFICE/.pid.smtpserver ]; then
                                if [ ! -d $POSTOFFICE/.pid.smtpserver ]; then
Index: proto/cf/aliases-new.cf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/cf/aliases-new.cf,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- proto/cf/aliases-new.cf     2000/04/02 02:35:14     1.13
+++ proto/cf/aliases-new.cf     2000/10/10 21:00:58     1.14
@@ -114,7 +114,7 @@
*)  # Can be found!
    case "$(type fullnamemap)" in
    *"not found")
-       # The DB is there, but not this function, propably as a part of
+       # The DB is there, but not this function, probably as a part of
       # aliases() database call entry...
       fullnamemap() { return 1 }
       ;;
Index: proto/cf/aliases.cf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/cf/aliases.cf,v
retrieving revision 1.34
retrieving revision 1.37
diff -u -r1.34 -r1.37
--- proto/cf/aliases.cf 2000/09/19 08:46:55     1.34
+++ proto/cf/aliases.cf 2000/10/10 21:00:58     1.37
@@ -22,7 +22,7 @@
#        or 'alias expand' as the delivery status.   NOT any of the final
#       destinations possibly thru lots of further diversions.
#
-#       Right now all DSN data is just scrubbed away, although propably
+#       Right now all DSN data is just scrubbed away, although probably
#       some semi-strange hybride of redirected ORCPT data would be in
#       order -- at least.  (With redirected sender address.)
#
@@ -119,7 +119,7 @@
*)  # Can be found!
    case "$(type fullnamemap)" in
    *"not found")
-       # The DB is there, but not this function, propably as a part of
+       # The DB is there, but not this function, probably as a part of
       # aliases() database call entry...
       fullnamemap() { return 1 }
       ;;
@@ -485,7 +485,7 @@
                   db add expansions "$key.unixgroup" 1
                   nattr=$(newattribute $attr privilege $nobodypriv )
                   $(zapDSNnotify $nattr expanded "$sender" "$lcuser$domain")
-                   a=$(echo $a |
+                   a=$(echo "$a" |
                       listaddresses -e postmaster -c "$lcuser expansion" |
                       maprrouter $nattr $lcuser "$host" "$plustail" \
                                  "$domain")
@@ -602,6 +602,9 @@
       if homedir="$(homedirectory "$user")" ; then
               hashomedir=1
       else
+           [ "$defer" ] &&
+                   return (((hold "$defer" "$address" $attr)))
+
           ssift "$user" in # No 'homedir' for this user ? Has a '+' in it ?
           (.+)\+.+
               # Try expanding 'user+', and then plain 'user'
@@ -673,6 +676,8 @@
               if homedir="$(homedirectory "\1")"; then
                       hashomedir=1
               fi
+               [ "$defer" ] &&
+                   return (((hold "$defer" "$address" $attr)))
               ;;
           tfiss
       fi
Index: proto/cf/canon.cf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/cf/canon.cf,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- proto/cf/canon.cf   1999/07/20 10:51:04     1.11
+++ proto/cf/canon.cf   2000/10/23 23:12:36     1.12
@@ -107,6 +107,12 @@
#      hostname CNAME mappings.  (Which IMO isn't all that bad [mea])
#

+       ssift "$host" in
+       \[.*\]
+               return "$host"
+               ;;
+       tfiss
+
       tmp="$(deliver "$host")" && return "$tmp"

       # Not locally known, is it multi-component domain with
Index: proto/cf/rrouter.cf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/cf/rrouter.cf,v
retrieving revision 1.14
retrieving revision 1.17
diff -u -r1.14 -r1.17
--- proto/cf/rrouter.cf 2000/06/14 10:42:18     1.14
+++ proto/cf/rrouter.cf 2000/10/23 23:12:36     1.17
@@ -58,6 +58,13 @@

       address=$(canonicalize "$address")

+       ssift "$address" in
+       <@\[([A-Za-z0-9]+)\]>:(.+)@(.+)
+               # VERY MAGICAL:  @[channelname]:user@domain
+               return ((("\1" "\3" "\2$plustail@\3" $A)))
+               ;;
+       tfiss
+
       tsift "$address" in
#      <in%>(.*)
#              return (((error vms-in-pros "in%\1" $A))) ;;
@@ -133,7 +140,7 @@
                       domain="@\2"
                       plustail=""
               fi ;;
-       <@>.(.+)        # This plustail is propably wrong...
+       <@>.(.+)        # This plustail is probably wrong...
               return $(rrouter "\1$plustail" "$origaddr" $A "" "$domain") ;;  # try after route strip
       (.+)<@>
               if [ -z "$domain" ]; then
@@ -289,25 +296,19 @@
       ignore!.*
               break
               ;;
-       smtp!
-               tsift "$address" in
-               (.*)@(.+)
-                       return (((smtp "\2" "$address" $A)))
-                       ;;
-               tfist
-               ;;
-       smtpx!
+       (smtpgw.*)!
+               tmp="\1"
               tsift "$address" in
               (.*)@(.+)
-                       return (((smtpx "\2" "$address" $A)))
+                       return ((("$tmp" "\1" "$address" $A)))
                       ;;
               tfist
               ;;
-       (smtpgw.*)!
+       (smtp.*)!
               tmp="\1"
               tsift "$address" in
               (.*)@(.+)
-                       return ((($tmp "\1" "$address" $A)))
+                       return ((("$tmp" "\2" "$address" $A)))
                       ;;
               tfist
               ;;
Index: proto/cf/standard.cf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/cf/standard.cf,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- proto/cf/standard.cf        2000/08/30 11:57:52     1.18
+++ proto/cf/standard.cf        2000/10/10 21:00:58     1.19
@@ -68,7 +68,7 @@
#
relation -lt incore expansions

-# set up the host expansions cache -- same cavet as above, but propably can
+# set up the host expansions cache -- same cavet as above, but probably can
# live with it [mea] 94-Aug-04
relation -lt incore hostexpansions

Index: proto/db/dbases.conf
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/db/dbases.conf,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- proto/db/dbases.conf        2000/05/28 22:07:14     1.7
+++ proto/db/dbases.conf        2000/10/31 17:49:50     1.9
@@ -42,10 +42,10 @@
#| mboxmap         $DBTYPE  -    -l  $MAILSHARE/db/mboxmap      -lm
#| expired         $DBTYPE  -    -l  $MAILVAR/db/expiredaccts   -lm
#| iproutesdb      $DBTYPE  -    -l  $MAILVAR/db/iproutes       -lm -d longestmatch
-#| routesdb        $DBTYPE  -    -l  $MAILVAR/db/routes         -lm
-#| thishost        $DBTYPE  -    -l  $MAILVAR/db/localnames     -lm
-#| thishost        unordered -   -   $MAILVAR/db/localnames     -l
-#| thishost        bind,mxlocal - -  -                          -l
+#| routesdb        $DBTYPE  -    -l  $MAILVAR/db/routes         -lm -d pathalias
+#| thishost        $DBTYPE  -    -l  $MAILVAR/db/localnames     -lm -d pathalias
+#| thishost        unordered -   -   $MAILVAR/db/localnames     -l  -d pathalias
+#| thishost        bind,mxlocal - -  -                          -l  -d pathalias
#| otherservers    unordered -   -   $MAILVAR/db/otherservers   -lm -d pathalias
#| newsgroup       $DBTYPE  -    -l  $MAILVAR/db/active         -lm

@@ -54,5 +54,5 @@
fqdnaliases    $DBTYPE root:0:644 -la $MAILVAR/db/fqdnaliases          -lm
userdb         $DBTYPE root:0:644 -la $MAILVAR/db/userdb               -lm

-routesdb       $DBTYPE -          -l  $MAILVAR/db/routes               -lm
-thishost       $DBTYPE -          -l  $MAILVAR/db/localnames           -lm
+routesdb       $DBTYPE -          -l  $MAILVAR/db/routes               -lm -d pathalias
+thishost       $DBTYPE -          -l  $MAILVAR/db/localnames           -lm -d pathalias
Index: proto/db/kill-headers
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/db/kill-headers,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- proto/db/kill-headers       2000/03/28 23:31:03     1.3
+++ proto/db/kill-headers       2000/09/20 16:43:15     1.4
@@ -8,12 +8,13 @@
# Just some (built-in) examples, add your own ones!
#

-#db add headers return-path            -:kill:-
-#db add headers resent-return-path     -:kill:-
-#db add headers x-orcpt                        -:kill:-
-#db add headers resent-x-orcpt         -:kill:-
-#db add headers x-envid                        -:kill:-
-#db add headers resent-x-envid         -:kill:-
+db add headers return-path             -:kill:-
+db add headers resent-return-path      -:kill:-
+db add headers x-orcpt                 -:kill:-
+db add headers resent-x-orcpt          -:kill:-
+db add headers x-envid                 -:kill:-
+db add headers resent-x-envid          -:kill:-
+db add headers x-envelope-to           -:kill:-

# A likely usefull addition:

Index: proto/db/routes
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/proto/db/routes,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- proto/db/routes     1998/03/06 17:19:07     1.2
+++ proto/db/routes     2000/09/20 23:29:41     1.3
@@ -9,3 +9,30 @@
# or in this directory with usual configuration:
#   ../bin/newdb routes
#
+
+#
+#  Sample route statements (and channels):
+#
+#      .foo  error!cannedmsgfilename
+#      #       Canned error message from $MAILSHARE/forms/cannedmsgfilename
+#
+#      .bar  smtpx!
+#      #       Send all traffic destined to any subdomain under this
+#      #       suffix via "smtpx" channel to that domain
+#
+#      .bar  smtp-etrn!
+#      .bar  smtp-tls!
+#      .bar  smtp77!
+#      .bar  smtp77x!
+#      .bar  smtp8!
+#      .bar  smtp8x!
+#      #       Ditto
+#
+#      .bar  smtpgw-xyz!
+#      #       Drives genericish gateway function kit
+#
+#      junkdom      bitbucket!
+#      myself       local!
+#      news.domain  usenet!
+#      uunode.dom   uucp!uunode
+#
Index: router/functions.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/router/functions.c,v
retrieving revision 1.45
retrieving revision 1.47
diff -u -r1.45 -r1.47
--- router/functions.c  2000/09/19 08:46:57     1.45
+++ router/functions.c  2000/09/21 00:34:58     1.47
@@ -120,7 +120,7 @@
{      "printaliases", run_praliases,  NULL,   NULL,   0       },
{      "listaddresses",run_listaddresses,NULL, NULL,   SH_ARGV },
{      "zapDSNnotify", zap_DSN_notify, NULL,   NULL,   SH_ARGV },
-{      "postzapDSNnotify", zap_DSN_notify, NULL, NULL, SH_ARGV },
+{      "postzapDSNnotify", post_zap_DSN_notify, NULL, NULL, SH_ARGV },
{      "listexpand",   NULL,   run_listexpand, NULL,   SH_ARGV },
#if 0
{      "newattribute", NULL,   run_newattribute, NULL, SH_ARGV },
@@ -1784,6 +1784,7 @@
       const char *argv[];
{
       struct passwd *pw;
+       char *b;

       if (argc != 2) {
               fprintf(stderr, "Usage: %s name\n", argv[0]);
@@ -1793,8 +1794,20 @@
       if (pw == NULL) {
               strlower((char*)argv[1]);
               pw = getpwnam(argv[1]);
-               if (pw == NULL)
-                       return 2;
+               if (pw == NULL) {
+                 if (errno == ENOENT) return 2;
+#ifdef __osf__
+                 if (errno == EINVAL) return 2;
+#endif
+                 ++deferit;
+
+                 b = malloc(strlen(argv[1])+10);
+                 sprintf(b, "HOME:%s", argv[1]);
+                 v_set(DEFER, b);
+                 free(b);
+
+                 return 3;
+               }
       }
       printf("%s\n", pw->pw_dir);
       return 0;
Index: router/prototypes.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/router/prototypes.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- router/prototypes.h 2000/08/30 11:57:54     1.9
+++ router/prototypes.h 2000/10/10 21:00:58     1.10
@@ -28,7 +28,7 @@
extern const char * const gs_name;
extern const char * const monthname[];
extern char    *prio_list[];
-#ifndef HAVE_STRERROR /* System has it, and propably has prototype too..
+#ifndef HAVE_STRERROR /* System has it, and probably has prototype too..
                        IRIX 6.2 */
extern char    *strerror __((const int errno));
#endif
Index: router/rfc822walk.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/router/rfc822walk.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- router/rfc822walk.c 1998/02/10 21:01:51     1.1.1.1
+++ router/rfc822walk.c 2000/10/10 21:00:58     1.2
@@ -1,6 +1,8 @@
/*
 *     Copyright 1990 by Rayan S. Zachariassen, all rights reserved.
 *     This will be free software, but only when it is finished.
+ *
+ *      Copyright Matti Aarnio <[email protected]> 1992-2000
 */

#include "hostenv.h"
@@ -127,9 +129,9 @@
{ eIllegalSpecialInPhrase,     "illegal special character in phrase"   },
{ eIllegalPeriodInPhrase,      "illegal period in phrase"              },
{ eIllegalPhraseMustBeQuoted,  "phrases containing '.' must be quoted" },
-{ eIllegalSubdomainInDomain,   "illegal subdomain in domain, propably extra '.' at the end of the address"     },
+{ eIllegalSubdomainInDomain,   "illegal subdomain in domain, probably extra '.' at the end of the address"     },
{ eIllegalTokenInRoute,                "illegal token in route"                },
-{ eIllegalWordInLocalPart,     "illegal word in localpart, propably extra '.' at the end of the address"       },
+{ eIllegalWordInLocalPart,     "illegal word in localpart, probably extra '.' at the end of the address"       },
{ eIllegalStartOfMessageId,    "illegal start of message identification"},
{ eIllegalEndOfMessageId,      "illegal end of message identification" },
{ eIllegalEncryptionIdentifier,        "illegal encryption Identifier"         },
Index: scheduler/mq2.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/scheduler/mq2.c,v
retrieving revision 1.14
retrieving revision 1.18
diff -u -r1.14 -r1.18
--- scheduler/mq2.c     2000/06/13 10:17:26     1.14
+++ scheduler/mq2.c     2000/10/10 21:00:58     1.18
@@ -88,16 +88,17 @@
static void mq2_discard(mq)
     struct mailq *mq;
{
-  if (mq == mq2root) {
-    mq2root = mq->nextmailq;
-  } else {
-    struct mailq *m2 = mq2root;
-    while (m2 && m2->nextmailq  != mq)
-      m2 = m2->nextmailq;
-    if (m2 && m2->nextmailq == mq)
-      m2->nextmailq = m2->nextmailq;
+  struct mailq **mqp = &mq2root;
+  while (*mqp) {
+    if (*mqp == mq) {
+      *mqp = mq->nextmailq;
+      break;
+    }
+    mqp = &((*mqp)->nextmailq);
  }
+
  close(mq->fd);
+
  if (mq->inbuf)
    free(mq->inbuf);
  if (mq->inpline)
@@ -681,7 +682,7 @@
    return;
  }

-  mq2_puts(mq, "-MAILQ2 No such command; VERB='");
+  mq2_puts(mq, "-MAILQ2 Unknown command, or refused by access control; VERB='");
  mq2_puts(mq, s);
  mq2_puts(mq, "' REST='");
  mq2_puts(mq, t);
Index: scheduler/mq2auth.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/scheduler/mq2auth.c,v
retrieving revision 1.11
retrieving revision 1.14
diff -u -r1.11 -r1.14
--- scheduler/mq2auth.c 2000/09/14 20:54:11     1.11
+++ scheduler/mq2auth.c 2000/10/16 11:32:39     1.14
@@ -85,7 +85,7 @@
       const char **hostp;
       Usockaddr *au;
{
-       int rc;
+       int rc = 0, err;
       const char *host = *hostp;
       char *hh = (void *) host;

@@ -95,31 +95,30 @@
       if (hh) *hh = 0;

#if defined(AF_INET6) && defined(INET6)
-       if (strncasecmp(host,"[IPv6:",6)==0) {
+       if (CISTREQN(host,"[IPv6:",6) ||
+           CISTREQN(host,"[IPv6.",6)) {
         au->v6.sin6_family = AF_INET6;
-         rc = inet_pton(AF_INET6, host+6, &au->v6.sin6_addr);
-         if (hh) *hh = ']';
-         if (rc > 0) rc = 128;
+         err = inet_pton(AF_INET6, host+6, &au->v6.sin6_addr);
+         if (err > 0) rc = 128;
       } else
#endif
         if (*host == '[') {
           au->v4.sin_family = AF_INET;
-           rc = inet_pton(AF_INET, host+1, &au->v4.sin_addr);
-           if (hh) *hh = ']';
-           if (rc > 0) rc = 32;
+           err = inet_pton(AF_INET, host+1, &au->v4.sin_addr);
+           if (err > 0) rc = 32;
         } else
-           return -1;
+           err = -1;

-       if (rc <= 0)
-         return -1; /* Umm.. Failed ? */
+       if (hh) *hh = ']';

       while (*host && *host != ']') ++host;
       if (*host == ']') ++host;

       if (*host == '/') {
         ++host;
-         rc = 0;
+         rc = -1;
         while ('0' <= *host && *host <= '9') {
+           if (rc < 0) rc = 0;
           rc = rc * 10 + (*host) - '0';
           ++host;
         }
@@ -127,6 +126,7 @@

       *hostp = host;

+       if (err < 0) rc = -1;
       return rc;
}

@@ -250,7 +250,7 @@
  if (!fp) return NULL; /* D'uh! */

  mpw.user = linebuf;
-  while (cfgets(linebuf, sizeof(linebuf)-1, fp) >= 0) {
+  while (csfgets(linebuf, sizeof(linebuf)-1, fp) >= 0) {
    if (*linebuf == '#' || *linebuf == '*' || *linebuf == '\n')
      continue;
    s = strchr(linebuf,'\n');
@@ -271,6 +271,7 @@
      *s++ = '\000';
      if (mq2amaskverify(mq, s)) continue; /* BAD! */
      mpw.auth = mq2authtokens(mpw.attrs);
+      sfclose(fp);
      return & mpw;
    }
  }
@@ -304,7 +305,7 @@
  pw = authuser(mq, str);

  if (!pw) {
-    mq2_puts(mq,"-BAD USER OR PASSWORD OR CONTACT ADDRESS\n");
+    mq2_puts(mq,"-BAD USER OR AUTHENTICATOR OR CONTACT ADDRESS\n");
    return;
  }

Index: scheduler/msgerror.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/scheduler/msgerror.c,v
retrieving revision 1.29
retrieving revision 1.31
diff -u -r1.29 -r1.31
--- scheduler/msgerror.c        2000/08/29 13:21:14     1.29
+++ scheduler/msgerror.c        2000/10/16 11:32:39     1.31
@@ -314,7 +314,7 @@
       if (fp != NULL) {
         int inhdr = 1, hadsubj =0;
         buf[sizeof(buf)-1] = 0;
-         while (cfgets(buf,sizeof(buf)-1,fp) >= 0) {
+         while (csfgets(buf,sizeof(buf)-1,fp) >= 0) {
           if (strncmp(buf,"HDR",3)==0) {
             continue;
           } else if (strncmp(buf,"ADR",3)==0) {
@@ -333,7 +333,7 @@
           sfprintf(errfp, "To: %s\n", eaddr);
         else if (*no_error_reportp < 0)
           sfprintf(errfp, "To: dummy:; (error trapped source)\n");
-         while (cfgets(buf,sizeof(buf)-1,fp) >= 0) {
+         while (csfgets(buf,sizeof(buf)-1,fp) >= 0) {
           if (strncmp(buf,"HDR",3)==0) {
             sfprintf(errfp, "%s", buf+4);
           } else if (strncmp(buf,"ADR",3)==0) {
@@ -419,7 +419,7 @@
         sfprintf(errfp, "This report is classified as 'Multiple-fault', because\n");
         sfprintf(errfp, "the error report template file (%s) was not found.\n\n",path);
         sfprintf(errfp, "Please report this to this system's postmaster.\n\n");
-         sfprintf(errfp, "Here are report messages regarding email you (propably) sent:\n\n");
+         sfprintf(errfp, "Here are report messages regarding email you (probably) sent:\n\n");
       }
}

@@ -882,14 +882,14 @@
         } else {
           /* Scan the input, and drop off the ZMailer
              envelope headers */
-           while (cfgets(buf,sizeof(buf),fp) >= 0) {
+           while (csfgets(buf,sizeof(buf),fp) >= 0) {
             const char *s = buf;
             while (*s && *s != ':' && *s != ' ' && *s != '\t') ++s;
             if (*s == ':') break;
             *buf = 0;
           }
           /* We leave the first scan-phase with  buf[]  containing some
-              valid RFC-822 -style header, propably "Received:" */
+              valid RFC-822 -style header, probably "Received:" */
           if (*buf)
             sfprintf(errfp, "%s", buf);
           else {
@@ -946,14 +946,14 @@
           /* Scan the input, and drop off the Zmailer
              envelope headers */
           sfseek(fp, (Sfoff_t)0, SEEK_SET);
-           while (cfgets(buf,sizeof(buf),fp) >= 0) {
+           while (csfgets(buf,sizeof(buf),fp) >= 0) {
             const char *s = buf;
             while (*s && *s != ':' && *s != ' ' && *s != '\t') ++s;
             if (*s == ':') break;
             *buf = 0;
           }
           /* We leave the first scan-phase with  buf[]  containing some
-              valid RFC-822 -style header, propably "Received:" */
+              valid RFC-822 -style header, probably "Received:" */
           if (*buf)
             sfprintf(errfp, "%s", buf);
           else {
Index: scheduler/readconfig.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/scheduler/readconfig.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- scheduler/readconfig.c      2000/04/08 15:14:20     1.20
+++ scheduler/readconfig.c      2000/10/16 11:32:39     1.21
@@ -22,6 +22,10 @@

#include "libz.h"

+#define SKIPSPACE(Y) while (*Y == ' ' || *Y == '\t' || *Y == '\n') ++Y
+#define SKIPTEXT(Y)  while (*Y && *Y != ' ' && *Y != '\t' && *Y != '\n') ++Y
+#define SKIPDIGIT(Y) while ('0' <= *Y && *Y <= '9') ++Y
+
static void celink __((struct config_entry *, struct config_entry **, struct config_entry **));
static int readtoken __((Sfio_t *fp, char *buf, int buflen, int *linenump));
static int paramparse __((char *line));
@@ -344,7 +348,7 @@
             while (p >= line && (*p == ' ' || *p == '\t'))
               *p-- = '\0';
             a = cp+1;
-             while (*a == ' ' || *a == '\t') ++a;
+             SKIPSPACE(a);
             if (*a == '"') {
               ++a;
               cp = a;
@@ -406,14 +410,13 @@

redo_readtoken:
       if (lp == NULL) {
-         if (cfgets(line, sizeof line, fp) < 0)
+         if (csfgets(line, sizeof line, fp) < 0)
           return -1;
         *linenump += 1;
         lp = line;
       }
       /* Skip initial white-space */
-       while (*lp != '\0' && isspace(0xFF & *lp))
-         ++lp;
+       SKIPSPACE(lp);
       /* Now it is one of: a token, a comment start, or end of line */
       if (*lp == '\0' || *lp == '#') {
         /* Comment/EOL */
@@ -422,12 +425,12 @@
       }
       /* Now we scan for the token + possible value */
       elp = lp;
-       while (*elp && !isspace(0xFF & *elp) && *elp != '=' && *elp != '#')
+       while (*elp && *elp != ' ' && *elp != '\t' && *elp != '\n' && *elp != '=' && *elp != '#')
         ++elp;
       if (isspace(0xFF & *elp)) {
         /* Allow spaces after the token and before '=' */
         char *p = elp;
-         while (*p && isspace(0xFF & *p)) ++p;
+         SKIPSPACE(p);
         if (*p == '=')
           elp = p;
       }
@@ -435,12 +438,12 @@
       if (*elp == '=') {
         /* Allow spaces between '=', and value */
         ++elp;
-         while (*elp && isspace(0xFF & *elp)) ++elp;
+         SKIPSPACE(elp);
         if (*elp == '"') {
           ++elp;
           while (*elp != '"' && *elp != '\0') {
             if (*elp == '\\' && *(elp+1) == '\n') {
-               if (cfgets(elp, sizeof line - (elp - line), fp) < 0) {
+               if (csfgets(elp, sizeof line - (elp - line), fp) < 0) {
                 sfprintf(sfstderr,
                         "%s: bad continuation line\n",
                         progname);
@@ -457,8 +460,7 @@
           }
           ++elp;
         } else {
-           while (*elp && !isspace(0xFF & *elp) && *elp != '"')
-             ++elp;
+           SKIPTEXT(elp);
         }
       }
       strncpy(buf, lp, elp-lp);
@@ -538,17 +540,14 @@

       ce->command = strsave(arg);
       j = 0;
-       for (cp = ce->command; *cp != '\0' && isascii(*cp);) {
+       for (cp = ce->command; *cp;) {
         argv[j++] = cp;
         if (j >= (sizeof argv)/(sizeof argv[0]))
-           break;
-         while (*cp != '\0' && !isspace(0xFF & *cp))
-           ++cp;
-         if (*cp == '\0')
           break;
+         SKIPTEXT(cp);
+         if (*cp == '\0')  break;
         *cp++ = '\0';
-         while (*cp != '\0' && isspace(0xFF & *cp))
-           ++cp;
+         SKIPSPACE(cp);
       }
       argv[j++] = NULL;
       if (j > 0) {
@@ -594,7 +593,7 @@
       if (isascii(*arg) && isdigit(*arg))
         ce->gid = atoi(arg);
       else if ((gr = getgrnam(arg)) == NULL) {
-         sfprintf(sfstderr, "%s: unknown group: %s\n", progname, arg);
+         sfprintf(sfstderr, "%s: unknown group: '%s'\n", progname, arg);
         return 1;
       } else
         ce->gid = gr->gr_gid;
@@ -734,13 +733,11 @@

       j = 0;
       for (cp = arg; *cp != '\0'; ++cp) {
-         while (*cp != '\0' && isspace(0xFF & *cp))
-           ++cp;
+         SKIPSPACE(cp);
         if (*cp == '\0')
           break;
         d = cp++;
-         while (*cp != '\0' && !isspace(0xFF & *cp))
-           ++cp;
+         SKIPTEXT(cp);
         c = *cp;
         *cp = '\0';
         i = atoi(d);
@@ -780,13 +777,11 @@

       j = 0;
       for (cp = arg; *cp != '\0'; ++cp) {
-         while (*cp != '\0' && isspace(0xFF & *cp))
-           ++cp;
+         SKIPSPACE(cp);
         if (*cp == '\0')
           break;
         d = cp++;
-         while (*cp != '\0' && !isspace(0xFF & *cp))
-           ++cp;
+         SKIPTEXT(cp);
         c = *cp;
         *cp = '\0';
         i = parse_interval(d, NULL);
@@ -893,7 +888,7 @@
         while (p >= line && (*p == ' ' || *p == '\t'))
           *p-- = '\0';
         a = s+1;
-         while (*a == ' ' || *a == '\t') ++a;
+         SKIPSPACE(a);
         if (*a == '"') {
           ++a;
           s = a;
Index: scheduler/scheduler.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/scheduler/scheduler.c,v
retrieving revision 1.86
retrieving revision 1.88
diff -u -r1.86 -r1.88
--- scheduler/scheduler.c       2000/08/02 18:23:00     1.86
+++ scheduler/scheduler.c       2000/10/10 21:00:58     1.88
@@ -722,7 +722,7 @@
       cehead = readconfig(config);
       if (cehead == NULL) {
         cp = emalloc(strlen(config)+50);
-         sprintf(cp, "null control file, propably errors in it: %s", config);
+         sprintf(cp, "null control file, probably errors in it: %s", config);
         die(1, cp);
         /* NOTREACHED */
       }
@@ -1129,6 +1129,11 @@
       /* Some changes lately, open the dir and read it */

       dirp = opendir(dir);
+       if (!dirp) {
+         sfprintf(sfstderr,"A 'this can never fail' opendir('%s') failed!; errno=%d (%s)\n",dir,errno,strerror(errno));
+         return 0;
+       }
+
       for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp)) {
         /* Scan filenames into memory */

Index: sfio/Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/sfio/Makefile.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sfio/Makefile.in    2000/03/23 18:51:39     1.3
+++ sfio/Makefile.in    2000/10/26 11:02:30     1.4
@@ -22,7 +22,7 @@
       ln include/sfio.h        ../include/

clean:
-       cd src/lib/sfio; $(MAKE) -f makefile  clean
+       -cd src/lib/sfio; $(MAKE) -f makefile  clean
       rm -f ../libs/libsfio.a ../libs/libstdio.a
       rm -f ../include/ast_common.h ../include/sfio.h
       rm -f lib/*.a include/*.h
Index: sfio/src/lib/sfio/makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/sfio/src/lib/sfio/makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sfio/src/lib/sfio/makefile.in       2000/03/23 18:51:42     1.2
+++ sfio/src/lib/sfio/makefile.in       2000/10/13 18:44:38     1.3
@@ -65,6 +65,7 @@
       -(ranlib libsfio.a; exit 0) >/dev/null 2>&1

FEATURE/sfio: $(srcdir)/features/sfio
+       -if [ ! -d FEATURE ]; then mkdir FEATURE; else exit 0; fi
       $(BINDIR)/iffe set cc $(CC) $(CCMODE) $(CXFLAGS) : run $(srcdir)/features/sfio
ast_common.h: $(srcdir)/features/common
       $(BINDIR)/iffe - set cc $(CC) $(CCMODE) $(CXFLAGS) : run $(srcdir)/features/common > ast_common.h
Index: sfio/src/lib/sfio/sfhdr.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/sfio/src/lib/sfio/sfhdr.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sfio/src/lib/sfio/sfhdr.h   1999/08/30 10:16:20     1.1
+++ sfio/src/lib/sfio/sfhdr.h   2000/09/25 11:30:34     1.2
@@ -147,7 +147,15 @@
#endif

#if _socket_peek
-#include       <sys/socket.h>
+# ifdef _AIX
+#  undef SF_CLOSE
+#  include     <sys/socket.h>
+#  undef SF_CLOSE
+/* From sfio.h, but must not be defined until after socket.h! */
+#  define SF_CLOSE 4
+# else /* !_AIX */
+#  include     <sys/socket.h>
+# endif
#endif

#ifndef X_OK   /* executable */
@@ -875,12 +883,21 @@
extern void*   malloc _ARG_((size_t));
extern void*   realloc _ARG_((void*, size_t));
extern void    free _ARG_((void*));
+#ifndef strlen
extern size_t  strlen _ARG_((const char*));
+#endif
+#ifndef strcpy
extern char*   strcpy _ARG_((char*, const char*));
-
+#endif
+#ifndef memset
extern Void_t* memset _ARG_((void*, int, size_t));
+#endif
+#ifndef memchr
extern Void_t* memchr _ARG_((const void*, int, size_t));
+#endif
+#ifndef memccpy
extern Void_t* memccpy _ARG_((void*, const void*, int, size_t));
+#endif
#ifndef memcpy
extern Void_t* memcpy _ARG_((void*, const void*, size_t));
#endif
@@ -903,8 +920,12 @@
extern int     pipe _ARG_((int*));
extern int     access _ARG_((const char*, int));
extern uint    sleep _ARG_((uint));
+#ifndef execl
extern int     execl _ARG_((const char*, const char*,...));
+#endif
+#ifndef execv
extern int     execv _ARG_((const char*, char**));
+#endif
#if !defined(fork)
extern int     fork _ARG_((void));
#endif
Index: sfio/src/lib/sfio/Stdio_b/Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/sfio/src/lib/sfio/Stdio_b/Makefile.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sfio/src/lib/sfio/Stdio_b/Makefile.in       2000/03/24 09:43:07     1.1
+++ sfio/src/lib/sfio/Stdio_b/Makefile.in       2000/10/13 18:44:39     1.2
@@ -45,7 +45,7 @@
       -(ranlib libstdio.a; rm sfstdio.h; exit 0) >/dev/null 2>&1

FEATURE/stdio: $(srcdir)/features/stdio
-       -mkdir FEATURE
+       -if [ ! -d FEATURE ]; then mkdir FEATURE ; else exit 0; fi
       $(BINDIR)/iffe set cc $(CC) $(CCMODE) $(CXFLAGS) : run $(srcdir)/features/stdio

must:  sfstdio.h sfstdgen
Index: smtpserver/cfgread.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/cfgread.c,v
retrieving revision 1.30
retrieving revision 1.32
diff -u -r1.30 -r1.32
--- smtpserver/cfgread.c        2000/09/04 12:54:24     1.30
+++ smtpserver/cfgread.c        2000/10/16 11:32:39     1.32
@@ -13,23 +13,125 @@

#include "smtpserver.h"

-/* as in: SKIPWHILE(isascii,cp) */
-#define SKIPWHILE(X,Y)  while (*Y != '\0' && isascii(*Y) && X(*Y)) { ++Y; }
+#define SKIPSPACE(Y) while (*Y == ' ' || *Y == '\t') ++Y
+#define SKIPTEXT(Y)  while (*Y && *Y != ' ' && *Y != '\t') ++Y
+#define SKIPDIGIT(Y) while ('0' <= *Y && *Y <= '9') ++Y
+
+static void dollarexpand __((unsigned char *s0, int space));
+static void dollarexpand(s0, space)
+     unsigned char *s0;
+     int space;
+{
+    unsigned char *str = s0;
+    unsigned char *eol = s0 + space; /* assert(str < eol) */
+    unsigned char namebuf[80];
+    unsigned char *s;
+    int len, taillen;
+
+    while (*str) {
+      if (*str != '$') {
+       ++str;
+       continue;
+      }
+      /*  *str == '$' */
+      s0 = str; /* start position */
+      ++str;
+      if (*str == '$') {
+       /* A '$$' sequence shrinks to '$' */
+       strcpy(str, str+1);
+       continue;
+      }
+      s = namebuf;
+      if (*str == '{' || *str == '(') {
+       int endc = (*str == '{') ? '}' : ')';
+       ++str;
+       for (;*str;++str) {
+         if (*str == endc)
+           break;
+         if (s < namebuf + sizeof(namebuf)-1)
+           *s++ = *str;
+       }
+       if (*str) ++str; /* End char */
+       *s = 0; /* name end */
+      } else {
+       for (;*str;++str) {
+         if (!((isascii(*str) && isalnum(*str)) || *str == '_'))
+           break; /* 'A'..'Z', 'a'..'z', '0'..'9', '_' */
+         if (s < namebuf + sizeof(namebuf)-1)
+           *s++ = *str;
+       }
+       *s = 0;
+      }
+      if (*namebuf == 0) /* If there are e.g.  "$/" or "${}" or "$()", or
+                           just "$" at the end of the line, then let it be. */
+       continue;
+      s = getzenv(namebuf); /* Pick whatever name there was.. */
+      if (!s) continue;     /* No ZENV variable with this name ? */
+
+      len     = strlen(s);
+      taillen = strlen(str);
+
+      if (len > (str - s0)) {
+       /* Must expand the spot! */
+
+       unsigned char *replacementend = s0  + len;
+
+       if ((replacementend + taillen) >= eol) {
+         /* Grows past the buffer end, can't! */
+         taillen = eol - replacementend;
+       } /* else
+            We have space */
+
+       if (taillen > 0) {
+         unsigned char *si = str            + taillen;
+         unsigned char *so = replacementend + taillen;
+         /* Copy also the tail NIL ! */
+         for (;taillen>=0; --taillen, --so, --si) *so = *si;
+       }
+
+       if ((s0 + len) >= eol)
+         /* The fill-in goes over the buffer end */
+         len = eol - s0; /* Cut down */
+       if (len > 0) { /* Still something can be copied ? */
+         memcpy(s0, s, len);
+         str = s0 + len;
+       } else
+         str = s0 + (*s0 == '$'); /* Hmm.. grumble.. */
+
+      } else {
+
+       /* Same space, or can shrink! */
+
+       if (len > 0)
+         memcpy(s0, s, len);
+       if (s0+len < str)
+         /* Copy down */
+         strcpy(s0+len, str);
+       str = s0 + len;
+       str[taillen] = 0; /* Chop the possible old junk from the tail */

-static void cfparam __((char *));
-static void cfparam(str)
+      }
+    }
+    eol[-1] = 0;
+}
+
+
+static void cfparam __((char *, int));
+static void cfparam(str,size)
     char *str;
+     int size;
{
    char *name, *param1, *param2, *param3;
+    char *str0 = str;

    name = strchr(str, '\n');  /* The trailing newline chopper ... */
    if (name)
       *name = 0;

-    SKIPWHILE(!isspace, str);
-    SKIPWHILE(isspace, str);
+    SKIPTEXT (str); /* "PARAM" */
+    SKIPSPACE(str);
    name = str;
-    SKIPWHILE(!isspace, str);
+    SKIPTEXT (str);
    if (*str != 0)
       *str++ = 0;

@@ -54,20 +156,24 @@
       return;
    }

-    SKIPWHILE(isspace, str);
+    /* Do '$' expansions on the string */
+    dollarexpand(str, size - (str - str0));
+
+    SKIPSPACE(str);
+
    param1 = *str ? str : NULL;

-    SKIPWHILE(!isspace, str);
+    SKIPTEXT (str);
    if (*str != 0)
       *str++ = 0;
-    SKIPWHILE(isspace, str);
+    SKIPSPACE(str);
    param2 = *str ? str : NULL;
-    SKIPWHILE(!isspace, str);
+    SKIPTEXT (str);
    if (*str != 0)
       *str++ = 0;
-    SKIPWHILE(isspace, str);
+    SKIPSPACE(str);
    param3 = *str ? str : NULL;
-    SKIPWHILE(!isspace, str);
+    SKIPTEXT (str);
    if (*str != 0)
       *str++ = 0;

@@ -98,7 +204,7 @@
    /* IP address and port binders */

    else if (cistrcmp(name, "BindPort") == 0 && param1) {
-      bindport = htons(atoi(param1));
+      bindport = atoi(param1);
      if (bindport != 0 && bindport != 0xFFFFU)
       bindport_set = 1;
    } else if (cistrcmp(name, "BindAddress") == 0 && param1) {
@@ -272,9 +378,12 @@

    /* TLSv1/SSLv* options */

-    else if (cistrcmp(name, "use-tls") == 0) {
+    else if (cistrcmp(name, "use-tls") == 0)
      starttls_ok = 1;         /* Default: OFF */

+    else if (cistrcmp(name, "listen-ssmtp") == 0) {
+      ssmtp_listen = 1;                /* Default: OFF */
+
    } else if (cistrcmp(name, "tls-cert-file") == 0 && param1) {
      if (tls_cert_file) free(tls_cert_file);
      tls_cert_file = strdup(param1);
@@ -319,6 +428,8 @@
#ifdef HAVE_OPENSSL
      sscanf(param1,"%d", & tls_scache_timeout);
#endif /* - HAVE_OPENSSL */
+    } else if (cistrcmp(name, "lmtp-mode") == 0) {
+      lmtp_mode = 1;
    }

    /* Cluster-wide ETRN support for load-balanced smtp relay use */
@@ -362,15 +473,15 @@
       buf[sizeof(buf) - 1] = 0;       /* Trunc, just in case.. */

       cp = buf;
-       SKIPWHILE(isspace, cp);
+       SKIPSPACE(cp);
       if (strncmp(cp, "PARAM", 5) == 0) {
-           cfparam(cp);
+           cfparam(cp, sizeof(buf) -(cp-buf));
           continue;
       }
       scf.flags = "";
       scf.next = NULL;
       s0 = cp;
-       SKIPWHILE(!isspace, cp);
+       SKIPTEXT(cp);
       c = *cp;
       *cp = '\0';
       s0 = strdup(s0);
@@ -381,13 +492,13 @@
       scf.maxloadavg = 999;
       if (c != '\0') {
           ++cp;
-           SKIPWHILE(isspace, cp);
+           SKIPSPACE(cp);
           if (*cp && isascii(*cp) && isdigit(*cp)) {
               /* Sanity-check -- 2 is VERY LOW */
               if ((scf.maxloadavg = atoi(cp)) < 2)
                   scf.maxloadavg = 2;
-               SKIPWHILE(isdigit, cp);
-               SKIPWHILE(isspace, cp);
+               SKIPDIGIT(cp);
+               SKIPSPACE(cp);
           }
           scf.flags = strdup(cp);
           if ((cp = strchr(scf.flags, '\n')) != NULL)
Index: smtpserver/contentpolicy.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/contentpolicy.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- smtpserver/contentpolicy.c  2000/06/08 11:33:33     1.7
+++ smtpserver/contentpolicy.c  2000/10/16 11:32:39     1.8
@@ -10,7 +10,7 @@
 *  The protocol in between the smtpserver, and the content
 *  policy analysis program is a simple one:
 *     to contentpolicy:   relfilepath \n  (relative to current dir)
- *     from contentpolicy: %i comment text \n
+ *     from contentpolicy: %i [%i ]comment text \n
 */

#include "smtpserver.h"
@@ -106,11 +106,15 @@
  fprintf(cpol_tofp, "%s\n", fname);
  fflush(cpol_tofp);

-  for (c = i = 0; i < sizeof(responsebuf)-1; ++i) {
+ pick_reply:;
+
+  c = i = 0;
+  for (;;) {
    if (ferror(cpol_fromfp) || feof(cpol_fromfp)) break;
    c = fgetc(cpol_fromfp);
    if (c == '\n') break;
-    responsebuf[i] = c;
+    if (i < sizeof(responsebuf)-1)
+      responsebuf[i++] = c;
  }
  responsebuf[i] = 0;
  while (c != '\n') {
@@ -123,18 +127,40 @@
  /* on non-zero return, do set  state->message  on free()able storage ! */

  /* Pick at first the heading numeric value. */
+
+  i = sscanf(responsebuf, "%d", &rc);
+
+  if (i == 1) {
+    /* Scan until first space - or EOL */
+    for (i = 0; i < sizeof(responsebuf) && responsebuf[i] != 0; ++i)
+      if (responsebuf[i] == ' ') break;
+    /* Scan over spaces */
+    while (i < sizeof(responsebuf) && responsebuf[i] == ' ') ++i;
+  } else {
+
+    /* Hmm.. Bad!  Lets close the  cpol_tofp  and see what happens..
+       Will we ever get working reply ? */
+
+    if (cpol_tofp) {
+      fclose(cpol_tofp);
+      cpol_tofp = NULL;
+      goto pick_reply;
+    }
+
+    /* No working reply, ah well, push it into the freezer */
+
+    i = 0;
+    rc = -1;
+  }
+
+  if (!cpol_tofp) {
+    fclose(cpol_fromfp);
+    cpol_fromfp = NULL;
+    kill(SIGKILL, contentpolicypid);
+    contentpolicypid = -1;
+  }

-  rc = atoi(responsebuf);
-  /* Scan until first space - or EOL */
-  for (i = 0; i < sizeof(responsebuf) && responsebuf[i] != 0; ++i)
-    if (responsebuf[i] == ' ') break;
-  /* Scan over spaces */
-  while (i < sizeof(responsebuf) && responsebuf[i] == ' ') ++i;
-
-  s = NULL;
-  if (rc)
-    s = strdup(responsebuf + i);
+  state->message = strdup(responsebuf + i);

-  state->message = s;
  return rc;
}
Index: smtpserver/mxverify.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/mxverify.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- smtpserver/mxverify.c       2000/09/19 11:32:57     1.23
+++ smtpserver/mxverify.c       2000/10/10 21:00:58     1.24
@@ -640,7 +640,7 @@
           sprintf(hbuf + ((15-i) << 2),
                   "%x.%x.", ipaddr[i] & 0x0F, (ipaddr[i] >> 4) & 0x0F);
         }
-         strcpy(hbuf+32,"ip6."); /* Fixed length of hex nybbles */
+         strcpy(hbuf+64,"ip6."); /* Fixed length of hex nybbles */
       }

       suf = hbuf + strlen(hbuf);
Index: smtpserver/policytest.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/policytest.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- smtpserver/policytest.c     2000/08/17 20:39:59     1.58
+++ smtpserver/policytest.c     2000/10/16 11:32:39     1.59
@@ -692,9 +692,11 @@
    }
    if (!openok) {
       /* ERROR!  Could not open the database! */
-      if (debug)
+      if (debug) {
       printf("000- ERROR!  Could not open the database file '%s'; errno=%d!\n",
              dbname, errno);
+       fflush(stdout);
+      }
      *relp = NULL;

#ifndef HAVE_ALLOCA
@@ -914,6 +916,7 @@
Usockaddr *raddr;
{
    char pbuf[64]; /* Not THAT much space needed.. */
+    int rc;

    struct sockaddr_in *si4;
#if defined(AF_INET6) && defined(INET6)
@@ -967,7 +970,9 @@
    }

    state->request = 0;
-    return _addrtest_(rel, state, pbuf, 1);
+    rc = _addrtest_(rel, state, pbuf, 1);
+    if (debug) fflush(stdout);
+    return rc;
}


@@ -1648,7 +1653,7 @@
      abort();                 /* Code error! Bad policy ! */
      return 9999; /* To silence most compilers.. */
    }
-    fflush(stdout);
+    if (debug) fflush(stdout);
    return rc;
}

Index: smtpserver/rfc821scn.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/rfc821scn.c,v
retrieving revision 1.7
retrieving revision 1.9
diff -u -r1.7 -r1.9
--- smtpserver/rfc821scn.c      2000/05/23 22:15:01     1.7
+++ smtpserver/rfc821scn.c      2000/10/16 11:32:39     1.9
@@ -1,7 +1,7 @@
/* Small pieces for scanning forward on a buffer of RFC-821/822 compliant
   addresses */

-/* (c) Matti Aarnio 1993-1997 <[email protected]> */
+/* (c) Matti Aarnio 1993-2000 <[email protected]> */

/* All these routines scan over the lexical elements they are after, and
   if successfull, return pointer just AFTER such element.
@@ -513,7 +513,7 @@
     *    Paul Vixie, 1996.
     */

-#ifndef IN6ADDRSZ              /* Propably these all set at the same time.. */
+#ifndef IN6ADDRSZ              /* Probably these all set at the same time.. */
#define IN6ADDRSZ 16
#define INADDRSZ   4
#define INT16SZ    2
@@ -708,9 +708,6 @@
    }
    if (*p == '[') {
       q = rfc821_dotnum(p + 1, strict);
-#if 0
- printf("    dotnum: p='%s', q='%s'\n",p,q);
-#endif
       if (q == p + 1)
           return s;
       if (*q != ']') {
Index: smtpserver/smtpcmds.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpcmds.c,v
retrieving revision 1.70
retrieving revision 1.72
diff -u -r1.70 -r1.72
--- smtpserver/smtpcmds.c       2000/09/19 11:32:57     1.70
+++ smtpserver/smtpcmds.c       2000/10/16 11:32:39     1.72
@@ -162,6 +162,7 @@
    else
      while (*cp == ' ' || *cp == '\t') ++cp;

+    if (debug) typeflush(SS);
    SS->policyresult = policytest(policydb, &SS->policystate,
                                 POLICY_HELONAME, cp, strlen(cp),
                                 SS->authuser);
@@ -726,6 +727,7 @@

    RFC821_822QUOTE(cp, newcp, addrlen);

+    if (debug) typeflush(SS);
    SS->policyresult = policytest(policydb, &SS->policystate,
                                 POLICY_MAILFROM, cp, addrlen,
                                 SS->authuser);
@@ -1024,6 +1026,7 @@
      SS->state = Recipient;

    SS->rcpt_count = 0;
+    SS->ok_rcpt_count = 0;
    SS->from_box = (addrlen == 0);
}

@@ -1039,6 +1042,7 @@
    int addrlen = 0, notifylen = 0, orcptlen = 0, notifyflgs;
    int strict = STYLE(SS->cfinfo, 'R');
    int sloppy = STYLE(SS->cfinfo, 'S');
+    int err;

    if (strict && sloppy) /* If misconfigured, SLOPPY takes precedence! */
      strict = 0;
@@ -1289,6 +1293,7 @@

    RFC821_822QUOTE(cp, newcp, addrlen);

+    if (debug) typeflush(SS);
    SS->policyresult = policytest(policydb, &SS->policystate,
                                 POLICY_RCPTTO, cp, addrlen,
                                 SS->authuser);
@@ -1309,9 +1314,11 @@
         SS->policyresult = 0; /* Plain <postmaster> */
       else
         if (policydb != NULL && SS->policyresult > -100) {
-           int rc = policytest(policydb, &SS->policystate,
-                               POLICY_RCPTPOSTMASTER, cp, addrlen,
-                               SS->authuser);
+           int rc;
+           if (debug) typeflush(SS);
+           rc = policytest(policydb, &SS->policystate,
+                           POLICY_RCPTPOSTMASTER, cp, addrlen,
+                           SS->authuser);
           if (rc == 0)
             SS->policyresult = 0;

@@ -1521,6 +1528,9 @@
    else
      SS->sizeoptsum = SS->sizeoptval;

+    err = 1;
+    SS->rcpt_count += 1;
+
    if (ferror(SS->mfp)) {
       smtp_tarpit(SS);
       type(SS, 452, m430, (char *) NULL);
@@ -1534,9 +1544,12 @@
       if (SS->from_box && SS->rcpt_count > MaxErrorRecipients) {
           smtp_tarpit(SS);
           type(SS, 552, m571, "SPAM trap -- too many recipients for an empty source address!");
-       } else
-           type(SS, atoi(s), s + 4, "Ok");
-       SS->rcpt_count += 1;
+       } else {
+           err = atoi(s);
+           type(SS, err, "%s", s + 4);
+           if (err < 400)
+             err = 0;
+       }
    } else {
       if (SS->from_box && SS->rcpt_count > MaxErrorRecipients) {
           smtp_tarpit(SS);
@@ -1547,11 +1560,15 @@
       else
           type(SS, 250, "2.1.5", "Recipient address syntax Ok%s; rcpt=<%.*s>",
                srcrtestatus, addrlen, cp);
-       SS->rcpt_count += 1;
+       err = 0;
    }
    if (s)
       free((void *) s);
-    SS->state = RecipientOrData;
+
+    if (!err) {
+      SS->ok_rcpt_count += 1;
+      SS->state = RecipientOrData;
+    }
}


Index: smtpserver/smtpdata.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpdata.c,v
retrieving revision 1.32
retrieving revision 1.36
diff -u -r1.32 -r1.36
--- smtpserver/smtpdata.c       2000/09/04 12:54:24     1.32
+++ smtpserver/smtpdata.c       2000/10/17 10:25:51     1.36
@@ -33,9 +33,45 @@
#include <libtrans.h>
#endif                         /* USE_TRANSLATION */

+#define SKIPSPACE(Y) while (*Y == ' ' || *Y == '\t') ++Y
+#define SKIPDIGIT(Y) while ('0' <= *Y && *Y <= '9') ++Y
+#define SKIPTEXT(Y)  while (*Y && *Y != ' ' && *Y != '\t') ++Y
+
+static const char *m260 = "2.6.0";
+
static int mvdata __((SmtpState *, char *));
static int mvbdata __((SmtpState *, char *, long));

+static int parsestatcode __((const char **ss, const char **statcode));
+static int parsestatcode(ssp, statcodep)
+     const char **ssp;
+     const char **statcodep;
+{
+    int code = -1;
+    const char *ss = *ssp;
+    static char statcodebuf[6];
+
+    *statcodep = NULL;
+
+    for (;'0' <= *ss && *ss <= '9'; ++ss) {
+      if (code < 0) code = 0;
+      code = code * 10 + (*ss - '0');
+    }
+    SKIPSPACE(ss);
+    if (isdigit(ss[0]) && ss[1] == '.' &&
+       isdigit(ss[2]) && ss[3] == '.' &&
+       isdigit(ss[4])) {
+      memcpy(statcodebuf, ss, 5);
+      statcodebuf[5] = 0;
+      *statcodep = statcodebuf;
+      ss += 5;
+    }
+    SKIPSPACE(ss);
+    *ssp = ss;
+    if (code < 200 || code > 599) code = 0;
+    return code;
+}
+
int smtp_data(SS, buf, cp)
SmtpState *SS;
const char *buf, *cp;
@@ -43,7 +79,7 @@
    int filsiz;
    long tell = 0;
    time_t mtime;
-    int ino;
+    int ino, i;
    char msg[2048];

    while (!strict_protocol && (*cp == ' ' || *cp == '\t')) ++cp;
@@ -137,6 +173,8 @@
       mail_abort(SS->mfp);
       SS->mfp = NULL;
       type(SS, 452, m430, "%s", msg);
+       if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+           type(SS, 452, m430, "%s", msg);
       typeflush(SS);
    } else if (s_feof(SS)) {
       /* [[email protected]] says this can happen */
@@ -147,10 +185,14 @@
         mail_abort(SS->mfp);
       SS->mfp = NULL;
       reporterr(SS, tell, "premature EOF on DATA input");
+       if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+         reporterr(SS, tell, "premature EOF on DATA input");
       typeflush(SS);
       return -1;
    } else if (availspace < 0 || ferror(SS->mfp)) {
       type(SS, 452, m430, NULL); /* insufficient system storage */
+       if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+         type(SS, 452, m430, NULL); /* insufficient system storage */
       typeflush(SS);
       reporterr(SS, tell, ferror(SS->mfp) ? "write to spool file failed" : "system free storage under limit");
       clearerr(SS->mfp);
@@ -160,6 +202,8 @@
       mail_abort(SS->mfp);
       SS->mfp = NULL;
       type(SS, 552, "5.3.4", "Size of this message exceeds the fixed maximum size of  %ld  chars for received email ", maxsize);
+       if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+         type(SS, 552, "5.3.4", "Size of this message exceeds the fixed maximum size of  %ld  chars for received email ", maxsize);
       typeflush(SS);
    } else {

@@ -169,14 +213,33 @@

       /* Lets see what the content-policy will tell now ? */
       char *fname = mail_fname(SS->mfp);
+       const char *statcode = NULL, *ss, *ss0;
+       int code = 0;
+
+       if (debug) typeflush(SS);
       SS->policyresult = contentpolicy(policydb, &SS->policystate, fname);

+       ss0 = ss  = policymsg(policydb, &SS->policystate);
+       if (ss)
+         code = parsestatcode(&ss,&statcode);
+
       if (SS->policyresult < 0) {
-         char *ss = policymsg(policydb, &SS->policystate);
         type(NULL,0,NULL,
-              "Content-policy analysis ordered message rejection. (code=%d)", SS->policyresult);
-         type(SS, -552,m571, "Content-Policy analysis rejected this message");
-         type(SS, 552, m571, "Content-Policy msg: %s", ss ? ss : "rejected");
+              "Content-policy analysis ordered message rejection. (code=%d); msg='%s'", SS->policyresult, ss0 ? ss0 : "<NIL>");
+
+         if (!statcode)  statcode = m571;
+         if (!code)      code = 552;
+
+         if (!ss) {
+           type(SS,code,statcode,"Content-Policy-Analysis rejected this message");
+           if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+             type(SS,code,statcode,"Content-Policy-Analysis rejected this message");
+         } else {
+           type(SS, code, statcode, "%s", ss);
+           if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+             type(SS, code, statcode, "%s", ss);
+         }
+
         mail_abort(SS->mfp);
         SS->mfp = NULL;
       } else if (SS->policyresult > 0) {
@@ -193,6 +256,8 @@
                "mail_close_alternate(..'FREEZER','%s') failed, errno=%d (%s)",
                polbuf, errno, strerror(errno));
           type(SS, 452, m430, "Message file disposition failed");
+           if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+             type(SS, 452, m430, "Message file disposition failed");
           typeflush(SS);
           SS->mfp = NULL;
           reporterr(SS, tell, "message file close failed");
@@ -200,7 +265,19 @@
           static int freezecnt = 1;
           freezecnt <<= 1;
           sleep(freezecnt);
-           type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area; %s", SS->policyresult, ss ? ss : "");
+
+           if (!ss) {
+             type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area", SS->policyresult);
+             if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+               type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area", SS->policyresult);
+           } else {
+             if (!statcode)  statcode = m260;
+             if (!code)      code = 250;
+             type(SS, code, statcode, "%s", ss);
+             if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+               type(SS, code, statcode, "%s", ss);
+           }
+
           typeflush(SS);
           SS->mfp = NULL;
           zsyslog((LOG_INFO, "accepted id %d (%dc) from %s/%d into freeze[%d]",
@@ -215,6 +292,8 @@

         if (_mail_close_(SS->mfp, &ino, &mtime) == EOF) {
           type(SS, 452, m430, (char *) NULL);
+           if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+             type(SS, 452, m430, (char *) NULL);
           typeflush(SS);
           SS->mfp = NULL;
           reporterr(SS, tell, "message file close failed");
@@ -225,7 +304,17 @@
           taspoolid(taspid, mtime, (long)ino);

           SS->mfp = NULL;
-           type(SS, 250, "2.6.0", "%s message accepted", taspid);
+           if (!ss || *ss == 0) {
+             type(SS, 250, "2.6.0", "%s message accepted", taspid);
+             if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+               type(SS, 250, "2.6.0", "%s message accepted", taspid);
+           } else {
+             if (!statcode)  statcode = m260;
+             if (!code)      code = 250;
+             type(SS, code, statcode, "%s", ss);
+             if (lmtp_mode) for(i = 1; i < SS->ok_rcpt_count; ++i)
+               type(SS, code, statcode, "%s", ss);
+           }
           typeflush(SS);

           if (smtp_syslog)
@@ -253,7 +342,7 @@
    long tell;
    char msg[2048];
    long bdata_chunksize;
-    int bdata_last;
+    int bdata_last, i;

    if (SS->state == RecipientOrData) {
       SS->state = BData;
@@ -303,7 +392,10 @@
           cp = NULL;
           break;
       }
-       type(SS, 503, m552, cp);
+       if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+         type(SS, 503, m552, cp);
+       else
+         type(SS, 503, m552, cp);
       typeflush(SS);
       if (SS->mfp)
           mail_abort(SS->mfp);
@@ -315,7 +407,10 @@
           cp = "No valid sender, rejecting all recipients";
           if (SS->sender_ok != 0)
               cp = "No valid recipient at RCPT addresses, or no RCPT addresses at all";
-           type(SS, 550, "5.1.3", cp);
+           if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+             type(SS, 550, "5.1.3", cp);
+           else
+             type(SS, 550, "5.1.3", cp);
           typeflush(SS);
           SS->state = MailOrHello;
           if (SS->mfp)
@@ -325,7 +420,10 @@
       }
       if ((SS->from_box != 0) && (SS->rcpt_count > MaxErrorRecipients)) {
         /* Too many recipients for a  "MAIL FROM:<>" */
-         type(SS, 550, "5.7.1", "SPAM trap -- too many recipients for an empty source address!");
+         if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+           type(SS, 550, "5.7.1", "SPAM trap -- too many recipients for an empty source address!");
+         else
+           type(SS, 550, "5.7.1", "SPAM trap -- too many recipients for an empty source address!");
         typeflush(SS);
         SS->state = MailOrHello;
         mail_abort(SS->mfp);
@@ -343,11 +441,17 @@

    /* The common typeflush() is at the end... */
    if (SS->mfp == NULL) {
-       type(SS, 503, m552, "BDAT block discarded due to earlier error");
+       if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+         type(SS, 452, m430, "BDAT block discarded due to earlier error");
+       else
+         type(SS, 452, m430, "BDAT block discarded due to earlier error");
    } else if (*msg != 0) {
       mail_abort(SS->mfp);
       SS->mfp = NULL;
-       type(SS, 452, "%s", msg);
+       if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+         type(SS, 452, "%s", msg);
+       else
+         type(SS, 452, "%s", msg);
    } else if (s_feof(SS)) {
       /* [[email protected]] says this can happen */
       if (STYLE(SS->cfinfo,'D')) {
@@ -357,10 +461,13 @@
         mail_abort(SS->mfp);
       SS->mfp = NULL;
       reporterr(SS, tell, "premature EOF on BDAT input");
-       typeflush(SS);
+       typeflush(SS); /* Pointless ?? */
       return -1;
    } else if (availspace < 0 || ferror(SS->mfp)) {
-       type(SS, 452, m400, (char *) NULL);
+       if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+         type(SS, 452, m400, (char *) NULL);
+       else
+         type(SS, 452, m400, (char *) NULL);
       reporterr(SS, tell, ferror(SS->mfp) ? "write to spool file failed" : "system free storage under limit");
       clearerr(SS->mfp);
       mail_abort(SS->mfp);
@@ -368,7 +475,10 @@
    } else if (maxsize > 0 && tell > maxsize) {
       mail_abort(SS->mfp);
       SS->mfp = NULL;
-       type(SS, 552, "5.3.4", "Size of this message exceeds the fixed maximum size of  %ld  chars for received email ", maxsize);
+       if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i)
+         type(SS, 552, "5.3.4", "Size of this message exceeds the fixed maximum size of  %ld  chars for received email ", maxsize);
+       else
+         type(SS, 552, "5.3.4", "Size of this message exceeds the fixed maximum size of  %ld  chars for received email ", maxsize);
    } else if (bdata_last) {
       time_t mtime;
       int inum;
@@ -379,14 +489,30 @@

       /* Lets see what the content-policy will tell now ? */
       char *fname = mail_fname(SS->mfp);
+       const char *statcode = NULL, *ss, *ss0;
+       int code = 0;
+
+       if (debug) typeflush(SS);
       SS->policyresult = contentpolicy(policydb, &SS->policystate, fname);

+       ss0 = ss  = policymsg(policydb, &SS->policystate);
+       if (ss)
+         code = parsestatcode(&ss,&statcode);
+
       if (SS->policyresult < 0) {
-         char *ss = policymsg(policydb, &SS->policystate);
-type(NULL,0,NULL,
-  "Content-policy analysis ordered message rejection. (code=%d)", SS->policyresult);
-         type(SS, -552,m571, "Content-Policy analysis rejected this message");
-         type(SS, 552, m571, "Content-Policy msg: %s", ss ? ss : "rejected");
+         type(NULL,0,NULL,
+              "Content-policy analysis ordered message rejection. (code=%d); msg: '%s'", SS->policyresult, ss0 ? ss0 : "<NIL>");
+
+         if (!code) code = 552;
+         if (!statcode) statcode = m571;
+
+         if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i){
+           type(SS,-552,m571,"Content-Policy analysis rejected this message");
+           type(SS, 552,m571,"Content-Policy msg: %s", ss ? ss : "rejected");
+         } else {
+           type(SS,-552,m571,"Content-Policy analysis rejected this message");
+           type(SS,552, m571,"Content-Policy msg: %s", ss ? ss : "rejected");
+         }
         mail_abort(SS->mfp);
         SS->mfp = NULL;
       } else if (SS->policyresult > 0) {
@@ -401,11 +527,19 @@
                "policy", errno, strerror(errno));
           if (logfp)
             fflush(logfp);
-           type(SS, 452, m430, "Message file disposition failed");
+           if (lmtp_mode && bdata_last) {
+             for(i = 0; i < SS->ok_rcpt_count; ++i)
+               type(SS, 452, m430, "Message file disposition failed");
+           } else
+             type(SS, 452, m430, "Message file disposition failed");
           SS->mfp = NULL;
           reporterr(SS, tell, "message file close failed");
         } else {
-           type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area; %s", SS->policyresult, ss ? ss : "");
+           if (lmtp_mode && bdata_last) {
+             for(i = 0; i < SS->ok_rcpt_count; ++i)
+               type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area; %s", SS->policyresult, ss ? ss : "");
+           } else
+             type(SS, 250, "2.6.0", "message accepted; into freezer[%d] area; %s", SS->policyresult, ss ? ss : "");
           SS->mfp = NULL;
           zsyslog((LOG_INFO, "accepted id %d (%dc) from %s/%d into freeze",
                    (int) stbuf.st_ino, (int) stbuf.st_size,
@@ -413,7 +547,11 @@
         }
         runastrusteduser();
       } else if (_mail_close_(SS->mfp, &inum, &mtime) == EOF) {
-         type(SS, 452, m400, (char *) NULL);
+         if (lmtp_mode && bdata_last) {
+           for(i = 0; i < SS->ok_rcpt_count; ++i)
+             type(SS, 452, m400, (char *) NULL);
+         } else
+           type(SS, 452, m400, (char *) NULL);
         SS->mfp = NULL;
         reporterr(SS, tell, "message file close failed");
       } else {
@@ -422,7 +560,12 @@
         taspoolid(taspid, mtime, inum);

         SS->mfp = NULL;
-         type(SS, 250, "2.6.0", "%s Roger, got %ld bytes in the last chunk, stored %ld bytes into spool",
+
+         if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i) {
+           type(SS, 250, "2.6.0", "%s Roger, got %ld bytes in the last chunk, stored %ld bytes into spool",
+              taspid, bdata_chunksize, (long) tell);
+         } else
+           type(SS, 250, "2.6.0", "%s Roger, got %ld bytes in the last chunk, stored %ld bytes into spool",
              taspid, bdata_chunksize, (long) tell);
         type(NULL,0,NULL,"-- pipeline input: %d bytes",s_hasinput(SS));

@@ -430,12 +573,15 @@
           zsyslog((LOG_INFO,
                    "%s: (%ldc) accepted from %s/%d", taspid, tell,
                    SS->rhostname, SS->rport));
-
         type(NULL,0,NULL,"%s: %ld bytes", taspid, tell);
+
         if (logfp)
           fflush(logfp);
       }
    } else {                   /* Not last chunk! */
+      if (lmtp_mode && bdata_last) for(i = 0; i < SS->ok_rcpt_count; ++i) {
+       type(SS, 250, "2.6.0", "Received %ld bytes", bdata_chunksize);
+      } else
       type(SS, 250, "2.6.0", "Received %ld bytes", bdata_chunksize);
    }
    if (bdata_last) {
Index: smtpserver/smtpetrn.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpetrn.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- smtpserver/smtpetrn.c       2000/09/14 20:55:56     1.5
+++ smtpserver/smtpetrn.c       2000/10/16 11:32:39     1.6
@@ -96,7 +96,7 @@
  (*buf)[*bufsize] = 0;

  if (c == EOF && *bufsize != 0) {
-    fprintf(stderr, "%s: no input from scheduler\n", progname);
+    fprintf(stderr," no input from scheduler");
    (*buf)[0] = '\0';
    return -1;
  }
@@ -163,7 +163,7 @@
      req.ai_family   = PF_INET;
      ai = NULL;

-      if (debug) fprintf(stderr,"INET6 lookup for '%s'\n",node->nodename);
+      if (debug) fprintf(stderr,"INET lookup for '%s'\n",node->nodename);

#ifdef HAVE_GETADDRINFO
      rc = getaddrinfo(node->nodename, "0", &req, &ai);
Index: smtpserver/smtphelp.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtphelp.c,v
retrieving revision 1.3
retrieving revision 1.7
diff -u -r1.3 -r1.7
--- smtpserver/smtphelp.c       2000/03/21 22:22:35     1.3
+++ smtpserver/smtphelp.c       2000/10/17 10:25:51     1.7
@@ -25,53 +25,68 @@
    int col;
    const char *cp;
    struct command *carp;
+    Command cmd;
+    char linebuf[3000];

+    while (query && (*query == ' ' || *query == '\t')) ++query;
+
    for (carp = &command_list[0]; carp->verb != NULL; ++carp) {
       if (CISTREQ(carp->verb, query))
           break;
    }
-    switch (carp->cmd) {
+
+    cmd = carp->cmd;
+    if (lmtp_mode && (cmd == Hello || cmd == Hello2)) cmd = Null;
+    if (!lmtp_mode && (cmd == HelloL)) cmd = Null;
+
+    switch (cmd) {
    case Hello:
    case Hello2:
-       TYPE_("EHLO your.domain.name");
-       TYPE_("HELO your.domain.name");
-       TYPE_("\tThe 'EHLO' is for Extended SMTP feature recognition, and is preferred!.");
-       TYPE_("\tIt is polite to introduce yourself before talking.");
-       TYPE("\tI will in fact ignore you until you do!");
+    case HelloL:
+        if (lmtp_mode) {
+         TYPE_("LHLO your.domain.name");
+         TYPE_("    The 'LHLO' is for RFC 2033 / LMTP session greeting.");
+       } else {
+         TYPE_("EHLO your.domain.name");
+         TYPE_("HELO your.domain.name");
+         TYPE_("    The 'EHLO' is for Extended SMTP feature recognition, and is preferred!.");
+       }
+       TYPE_("    It is polite to introduce yourself before talking.");
+       TYPE("    I will in fact ignore you until you do!");
       break;
    case Mail:
    case Mail2:
       TYPE_("MAIL FROM:<sender> (ESMTP parameters)");
       TYPE_("EMAL FROM:<sender>");
-       TYPE_("\tSpecify the originator address for the next message.");
+       TYPE_("    Specify the originator address for the next message.");
       if (STYLE(cfinfo, 'f')) {
-           TYPE("\tThe address will be checked before it is accepted.");
+           TYPE("    The address will be checked before it is accepted.");
       } else {
-           TYPE("\tAny address will be accepted here, but may be rejected later.");
+           TYPE("    Any address will be accepted here, but may be rejected later.");
       }
       break;
    case Recipient:
       TYPE_("RCPT TO:<recipient> (ESMTP parameters)");
-       TYPE_("\tSpecify a destination address for the next message.");
+       TYPE_("    Specify a destination address for the next message.");
       if (STYLE(cfinfo, 't')) {
-           TYPE("\tThe address will be checked before it is accepted.");
+           TYPE("    The address will be checked before it is accepted.");
       } else {
-           TYPE("\tAny address will be accepted here, but may be rejected later.");
+           TYPE("    Any address will be accepted here, but may be rejected later.");
       }
       break;
    case Data:
       TYPE_("DATA");
-       TYPE_("\tStart collecting the message itself.  The text data");
-       TYPE("\tis terminated by a <CRLF>.<CRLF> combination.");
+       TYPE_("    Start collecting the message itself.  The text data");
+       TYPE("    is terminated by a <CRLF>.<CRLF> combination.");
       break;
    case BData:
       TYPE_("BDAT nnn [LAST]");
-       TYPE_("\tESMTP \"CHUNKING\" service extension; See RFC 1830");
+       TYPE_("    ESMTP \"CHUNKING\" service extension; See RFC 1830");
       break;
    case Reset:
       TYPE_("RSET");
-       TYPE_("\tReset the state of the SMTP server to be ready for");
-       TYPE_("\tthe next message, and abort any current transaction.");
+       TYPE_("    Reset the state of the SMTP server to be ready for");
+       TYPE_("    the next message, and abort any current transaction.");
       TYPE_("");
       switch (SS->state) {
       case Hello:
@@ -100,57 +115,56 @@
    case SendAndMail:
    case Turn:
       TYPE_(carp->verb);
-       TYPE("\tThis command will never be implemented.");
+       TYPE("    This command will never be implemented.");
       break;
    case Turnme:
       type(SS, -214, NULL, "%s hostname", carp->verb);
-       TYPE_("\tThis command schedules (at least tries to) all");
-       TYPE_("\toutbound traffic to ``hostname'' host.");
-       TYPE_("\tFor security reasons this server will initiate the");
-       TYPE("\tSMTP-transport towards relay/recipient SMTP-server.");
+       TYPE_("    This command schedules (at least tries to) all");
+       TYPE_("    outbound traffic to ``hostname'' host.");
+       TYPE_("    For security reasons this server will initiate the");
+       TYPE("    SMTP-transport towards relay/recipient SMTP-server.");
       break;
    case Verify:
    case Verify2:
       TYPE_("VRFY <recipient>");
       TYPE_("EVFY <recipient>");
       if (STYLE(cfinfo, 'v')) {
-           TYPE_("\tPrints the recipients for the given address.")
-               TYPE("\tIf the address is local, it is not expanded.");
+           TYPE_("    Prints the recipients for the given address.")
+               TYPE("    If the address is local, it is not expanded.");
       } else {
-           TYPE("\tThis command is disabled.");
+           TYPE("    This command is disabled.");
       }
       break;
    case Expand:
       TYPE_("EXPN <recipient>");
       if (STYLE(cfinfo, 'e')) {
-           TYPE_("\tPrints the recipients for the given address.")
-               TYPE("\tIf the address is local, it is expanded.");
+           TYPE_("    Prints the recipients for the given address.")
+               TYPE("    If the address is local, it is expanded.");
       } else {
-           TYPE("\tThis command is disabled.");
+           TYPE("    This command is disabled.");
       }
       break;
    case NoOp:
       TYPE_(carp->verb);
-       TYPE("\tThis command does nothing.");
+       TYPE("    This command does nothing.");
       break;
    case Quit:
       TYPE_("QUIT");
-       TYPE("\tTerminate the SMTP protocol conversation.");
+       TYPE("    Terminate the SMTP protocol conversation.");
       break;
    case Verbose:
       TYPE_("VERB");
-       TYPE_("\tPrints out the SMTP server version and copyright notice.");
-       TYPE("\tThis command has no other effect.");
+       TYPE_("    Prints out the SMTP server version and copyright notice.");
+       TYPE("    This command has no other effect.");
       break;
    case Tick:
       TYPE_("TICK id");
-       TYPE("\tThis BSMTP command is just reflected back at you.");
+       TYPE("    This BSMTP command is just reflected back at you.");
       break;
    case Help:
       TYPE_("HELP [command]");
-       TYPE_("\tReminder of what the SMTP command does, or prints:");
-       TYPE_("");
-       /* fall through */
+       TYPE_("    Reminder of what the SMTP command does.");
+       break;
    case Null:
    default:
       TYPE_(Copyright);
@@ -162,27 +176,30 @@
               TYPE_(helplines[i]);
           TYPE_("");
       }
-       printf("214-The following commands are recognized:");
-       if (logfp)
-           fprintf(logfp, "%sw\t214-The following commands are recognized:",
-                   logtag);
-       col = 100;
+       TYPE_("The following commands are recognized:");
+       col = 4;
+       strcpy(linebuf, "    ");
       for (carp = &command_list[0]; carp->verb != NULL; ++carp) {
-           if (col > 70) {
-               col = 12;
-               printf("\r\n214-\t%s", carp->verb);
-               if (logfp)
-                   fprintf(logfp, "\n%sw\t214\t%s", logtag, carp->verb);
+           if (carp->cmd == HelloL && !lmtp_mode)
+             continue;
+           if (lmtp_mode && (carp->cmd == Hello || carp->cmd == Hello2))
+             continue;
+           if (carp->cmd == Silent)
+             continue;
+           if (col > 55) {
+               TYPE_(linebuf);
+               col = 4;
+               strcpy(linebuf, "    ");
+           } else if (col == 4) {
+               sprintf(linebuf+col, "%s", carp->verb);
           } else {
-               printf(", %s", carp->verb);
-               if (logfp)
-                   fprintf(logfp, ", %s", carp->verb);
-               col += 6;
+               sprintf(linebuf+col, ", %s", carp->verb);
           }
+           col += strlen(linebuf+col);
       }
-       printf("\r\n");
-       if (logfp)
-           fprintf(logfp, "\n");
+       /* If it has more than just the start indentation. */
+       if (linebuf[4] != 0) TYPE_(linebuf);
+
       TYPE_("");
       TYPE_("The normal sequence is: EHLO/HELO (MAIL RCPT+ DATA)+ QUIT.");
       TYPE_("");
Index: smtpserver/smtprouter.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtprouter.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- smtpserver/smtprouter.c     2000/03/17 18:26:59     1.14
+++ smtpserver/smtprouter.c     2000/10/10 21:00:58     1.15
@@ -4,7 +4,7 @@
 */
/*
 *    Several extensive changes by Matti Aarnio <[email protected]>
- *      Copyright 1991-1999.
+ *      Copyright 1991-2000.
 */

#include "smtpserver.h"
@@ -272,7 +272,7 @@
       if (!bufp) {


-           /* Huh! Got an EOF, while propably didn't expect it ?
+           /* Huh! Got an EOF, while probably didn't expect it ?
              Lets find out what the subprocess status was */
           bufp = emalloc(80 + strlen(args0) + strlen(function) +
                          sizeof(ROUTER_SERVER));
Index: smtpserver/smtpserver.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpserver.c,v
retrieving revision 1.105
retrieving revision 1.110
diff -u -r1.105 -r1.110
--- smtpserver/smtpserver.c     2000/07/30 15:46:36     1.105
+++ smtpserver/smtpserver.c     2000/11/02 19:09:35     1.110
@@ -46,6 +46,7 @@
    {"EHLO", Hello2},
                       /* Normal stuff.. */
    {"HELO", Hello},
+    {"LHLO", HelloL},
    {"MAIL", Mail},
    {"RCPT", Recipient},
    {"DATA", Data},
@@ -65,14 +66,14 @@
                       /* sendmail extensions */
    {"VERB", Verbose},
    {"ONEX", NoOp},
-                       /* Depreciated */
+                       /* Deprecated */
    {"SEND", Send},
    {"SOML", SendOrMail},
    {"SAML", SendAndMail},
    {"TURN", Turn},
                       /* bsmtp extensions */
    {"TICK", Tick},
-                       /* 8-bit smtp extensions -- depreciated */
+                       /* 8-bit smtp extensions -- deprecated */
    {"EMAL", Mail2},
    {"ESND", Send2},
    {"ESOM", Send2},
@@ -213,15 +214,17 @@
int chunkingok = 1;
int enhancedstatusok = 1;
int multilinereplies = 1;
-int enable_router = 0; /* Off by default -- security */
+int enable_router = 0;         /* Off by default -- security */
int mime8bitok = 1;
int dsn_ok = 1;
int auth_ok = 0;
int ehlo_ok = 1;
int etrn_ok = 1;
int starttls_ok = 0;
+int ssmtp_listen = 0;     /* Listen on port TCP/465; deprecated SMTP in TLS */
+int ssmtp_connected = 0;
int msa_mode = 0;
-int deliverby_ok = -1; /* FIXME: RFC 2852 */
+int deliverby_ok = -1;         /* FIXME: RFC 2852 */
etrn_cluster_ent etrn_cluster[MAX_ETRN_CLUSTER_IDX] = { {NULL,}, };
char *tls_cert_file = NULL;
char *tls_key_file  = NULL;
@@ -249,6 +252,10 @@
int tarpit_initial = 0;
int tarpit_exponent = 0;

+int lmtp_mode = 0;     /* A sort-of RFC 2033 LMTP mode ;
+                          this is MAINLY for debug purposes,
+                          NOT for real use! */
+
#ifndef        IDENT_TIMEOUT
#define        IDENT_TIMEOUT   5
#endif                         /* IDENT_TIMEOUT */
@@ -344,7 +351,7 @@
int argc;
char **argv;
{
-    int inetd, errflg, raddrlen, s, msgfd, version, i;
+    int inetd, errflg, raddrlen, s25, ssmtp, msgfd, version, i;
    const char *mailshare;
    char path[1024];
    int force_ipv4 = 0;
@@ -403,15 +410,15 @@
#ifndef __STDC__
#if defined(AF_INET6) && defined(INET6)
#ifdef USE_TRANSLATION
-                      "?46aBC:d:ighl:np:I:L:M:P:R:s:S:T:VvwX8"
+                      "?46aBC:d:ighl:np:tI:L:M:P:R:s:S:T:VvwX8"
#else /* xlate */
-                      "?46aBC:d:ighl:np:I:L:M:P:R:s:S:T:Vvw"
+                      "?46aBC:d:ighl:np:tI:L:M:P:R:s:S:T:Vvw"
#endif /* xlate */
#else /* INET6 */
#ifdef USE_TRANSLATION
-                      "?4aBC:d:ighl:np:I:L:M:P:R:s:S:T:VvwX8"
+                      "?4aBC:d:ighl:np:tI:L:M:P:R:s:S:T:VvwX8"
#else
-                      "?4aBC:d:ighl:np:I:L:M:P:R:s:S:T:Vvw"
+                      "?4aBC:d:ighl:np:tI:L:M:P:R:s:S:T:Vvw"
#endif /* xlate */
#endif /* INET6 */
#else /* __STDC__ */
@@ -421,7 +428,7 @@
                      "6"
#endif
                      "aBC:d:ighl:n"
-                      "p:"
+                      "p:t"
                      "I:L:M:P:R:s:S:T:Vvw"
#ifdef USE_TRANSLATION
                      "X8"
@@ -492,7 +499,7 @@
           inetd = 1;
           break;
       case 'p':
-           bindport = htons(atoi(optarg));
+           bindport = atoi(optarg);
           bindport_set = 1;
           break;
       case 'P':
@@ -514,6 +521,11 @@
           else if (CISTREQ(optarg, "local"))
               logstyle = 1;
           break;
+       case 't':
+           ssmtp_connected = 1; /* If this connection should immediately
+                                   start the TLS negotiaion before SMTP
+                                   greeting -- and only then do SMTP greet. */
+           break;
       case 'T':
         /* Enter in interactive mode claimed foreign source IPv4/IPv6
            address, and then proceed to handle policy analysis as in
@@ -635,6 +647,11 @@
    else
      cfhead = readcffile(cfgpath);

+    if (daemon_flg)
+      if (lmtp_mode && (!bindport_set || (bindport_set && bindport == 25)))
+       lmtp_mode = 0; /* Disable LMTP mode unless we are bound at other than
+                         port 25. */
+
#ifdef HAVE_OPENSSL
    Z_init(); /* Some things for private processors */
#endif /* - HAVE_OPENSSL */
@@ -782,6 +799,8 @@
         fflush(stdout);
         fflush(stderr);
       }
+
+       ssmtp = -1;
#if defined(AF_INET6) && defined(INET6)

       /* Perhaps the system can grok the IPv6 - at least the headers
@@ -790,61 +809,100 @@
          If we are not explicitely told to use IPv6 only, we will try
          here to use IPv6, and if successfull, register it!  */
       if (!use_ipv6 && !force_ipv4) {
-         s = socket(PF_INET6, SOCK_STREAM, 0 /* IPPROTO_IPV6 */ );
-         if (s >= 0) {
+         s25 = socket(PF_INET6, SOCK_STREAM, 0 /* IPPROTO_IPV6 */ );
+         if (s25 >= 0) {
           use_ipv6 = 1;       /* We can do it! */
-           close(s);
+           close(s25);
         }
       }
       if (force_ipv4) {
-         s = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
+         s25 = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
         use_ipv6 = 0;
       } else if (use_ipv6) {
-         s = socket(PF_INET6, SOCK_STREAM, 0 /* IPPROTO_IPV6 */ );
-         if (s < 0) {  /* Fallback to the IPv4 mode .. */
-           s = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
+         s25 = socket(PF_INET6, SOCK_STREAM, 0 /* IPPROTO_IPV6 */ );
+         if (s25 < 0) {        /* Fallback to the IPv4 mode .. */
+           s25 = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
           use_ipv6 = 0;
         }
       } else
-         s = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
+         s25 = socket(PF_INET, SOCK_STREAM, 0 /* IPPROTO_IP   */ );
+
+       if (ssmtp_listen)
+         ssmtp = socket(use_ipv6 ? PF_INET6 : PF_INET, SOCK_STREAM, 0 );
#else
-       s = socket(PF_INET, SOCK_STREAM, 0);
+       s25 = socket(PF_INET, SOCK_STREAM, 0);
+       if (ssmtp_listen)
+         ssmtp = socket(PF_INET, SOCK_STREAM, 0 );
#endif
-       if (s < 0) {
+       if (s25 < 0) {
+         fprintf(stderr,
+                 "%s: socket(PF_INET%s, SOCK_STREAM): %s\n",
+                 progname, (use_ipv6 ? "6" : ""), strerror(errno));
+         exit(1);
+       }
+       if (ssmtp_listen && ssmtp < 0) {
         fprintf(stderr,
                 "%s: socket(PF_INET%s, SOCK_STREAM): %s\n",
                 progname, (use_ipv6 ? "6" : ""), strerror(errno));
         exit(1);
       }
       i = 1;
-       if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (caddr_t) & i, sizeof i) < 0) {
+       if (setsockopt(s25, SOL_SOCKET, SO_REUSEADDR, (caddr_t) & i, sizeof i) < 0) {
         fprintf(stderr,
                 "%s: setsockopt(SO_REUSEADDR): %s\n",
                 progname, strerror(errno));
         exit(1);
       }
+       if (ssmtp >= 0 && setsockopt(ssmtp, SOL_SOCKET, SO_REUSEADDR, (caddr_t) & i, sizeof i) < 0) {
+         fprintf(stderr,
+                 "%s: setsockopt(SO_REUSEADDR): %s\n",
+                 progname, strerror(errno));
+         exit(1);
+       }
#ifdef SO_REUSEPORT
-       if (setsockopt(s, SOL_SOCKET, SO_REUSEPORT, (caddr_t) & i, sizeof i) < 0) {
+       if (setsockopt(s25, SOL_SOCKET, SO_REUSEPORT, (caddr_t) & i, sizeof i) < 0) {
         fprintf(stderr,
                 "%s: setsockopt(SO_REUSEPORT): %s\n",
                 progname, strerror(errno));
         exit(1);
       }
+       if (ssmtp >= 0 && setsockopt(ssmtp, SOL_SOCKET, SO_REUSEPORT, (caddr_t) & i, sizeof i) < 0) {
+         fprintf(stderr,
+                 "%s: setsockopt(SO_REUSEPORT): %s\n",
+                 progname, strerror(errno));
+         exit(1);
+       }
#endif

#ifdef SO_RCVBUF
       if (TcpRcvBufferSize > 0)
-         if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
+         if (setsockopt(s25, SOL_SOCKET, SO_RCVBUF,
                        (char *) &TcpRcvBufferSize,
                        sizeof(TcpRcvBufferSize)) < 0) {
           fprintf(stderr, "%s: setsockopt(SO_RCVBUF): %s\n",
                   progname, strerror(errno));
           exit(1);
         }
+       if (TcpRcvBufferSize > 0 && ssmtp >= 0)
+         if (setsockopt(ssmtp, SOL_SOCKET, SO_RCVBUF,
+                        (char *) &TcpRcvBufferSize,
+                        sizeof(TcpRcvBufferSize)) < 0) {
+           fprintf(stderr, "%s: setsockopt(SO_RCVBUF): %s\n",
+                   progname, strerror(errno));
+           exit(1);
+         }
#endif
#ifdef SO_SNDBUF
       if (TcpXmitBufferSize > 0)
-         if (setsockopt(s, SOL_SOCKET, SO_SNDBUF,
+         if (setsockopt(s25, SOL_SOCKET, SO_SNDBUF,
+                        (char *) &TcpXmitBufferSize,
+                        sizeof(TcpXmitBufferSize)) < 0) {
+           fprintf(stderr, "%s: setsockopt(SO_SNDBUF): %s\n",
+                   progname, strerror(errno));
+           exit(1);
+         }
+       if (TcpXmitBufferSize > 0 && ssmtp >= 0)
+         if (setsockopt(ssmtp, SOL_SOCKET, SO_SNDBUF,
                        (char *) &TcpXmitBufferSize,
                        sizeof(TcpXmitBufferSize)) < 0) {
           fprintf(stderr, "%s: setsockopt(SO_SNDBUF): %s\n",
@@ -855,14 +913,14 @@
       if (bindport <= 0) {
         struct servent *service;
#ifdef IPPORT_SMTP
-         bindport = htons(IPPORT_SMTP);
+         bindport = IPPORT_SMTP;
#endif                         /* !IPPORT_SMTP */
         if ((service = getservbyname("smtp", "tcp")) == NULL) {
           fprintf(stderr,
                   "%s: no SMTP service entry, using default\n",
                   progname);
         } else
-           bindport = service->s_port;
+           bindport = ntohs(service->s_port);
       }
#if defined(AF_INET6) && defined(INET6)
       if (use_ipv6) {
@@ -871,17 +929,27 @@
         memset(&si6, 0, sizeof(si6));
         si6.sin6_family = AF_INET6;
         si6.sin6_flowinfo = 0;
-         si6.sin6_port = bindport;
+         si6.sin6_port = htons(bindport);
         memcpy( &si6.sin6_addr, zin6addrany, 16 );
         if (bindaddr_set && bindaddr.v6.sin6_family == AF_INET6)
           memcpy(&si6.sin6_addr, &bindaddr.v6.sin6_addr, 16);

-         i = bind(s, (struct sockaddr *) &si6, sizeof si6);
+         i = bind(s25, (struct sockaddr *) &si6, sizeof si6);
         if (i < 0) {
           fprintf(stderr, "%s: bind(IPv6): %s\n",
                   progname, strerror(errno));
           exit(1);
         }
+         if (ssmtp >= 0) {
+           memset(&si6, 0, sizeof(si6));
+           si6.sin6_family = AF_INET6;
+           si6.sin6_flowinfo = 0;
+           si6.sin6_port = htons(465); /* Deprecated SMTP/TLS WKS port */
+           memcpy( &si6.sin6_addr, zin6addrany, 16 );
+           if (bindaddr_set && bindaddr.v6.sin6_family == AF_INET6)
+             memcpy(&si6.sin6_addr, &bindaddr.v6.sin6_addr, 16);
+           i = bind(ssmtp, (struct sockaddr *) &si6, sizeof si6);
+         }
       } else
#endif
         {
@@ -890,16 +958,26 @@
           memset(&si4, 0, sizeof(si4));
           si4.sin_family = AF_INET;
           si4.sin_addr.s_addr = INADDR_ANY;
-           si4.sin_port = bindport;
+           si4.sin_port = htons(bindport);
           if (bindaddr_set && bindaddr.v4.sin_family == AF_INET)
             memcpy(&si4.sin_addr, &bindaddr.v4.sin_addr, 4);

-           i = bind(s, (struct sockaddr *) &si4, sizeof si4);
+           i = bind(s25, (struct sockaddr *) &si4, sizeof si4);
           if (i < 0) {
             fprintf(stderr, "%s: bind(IPv4): %s\n",
                     progname, strerror(errno));
             exit(1);
           }
+           if (ssmtp >= 0) {
+             memset(&si4, 0, sizeof(si4));
+             si4.sin_family = AF_INET;
+             si4.sin_addr.s_addr = INADDR_ANY;
+             si4.sin_port = htons(465); /* Deprecated SMTP/TLS WKS port */
+             if (bindaddr_set && bindaddr.v4.sin_family == AF_INET)
+               memcpy(&si4.sin_addr, &bindaddr.v4.sin_addr, 4);
+
+             i = bind(ssmtp, (struct sockaddr *) &si4, sizeof si4);
+           }
         }

       /* Set the listen limit HIGH; there has been an active
@@ -917,11 +995,22 @@
          allow rather high limits, lets try to use it!
          (The classical default is: 5) */

-       if (listen(s, ListenQueueSize) < 0) {
-         fprintf(stderr, "%s: listen(sock,%d): %s\n",
+
+       fd_nonblockingmode(s25);
+       if (listen(s25, ListenQueueSize) < 0) {
+         fprintf(stderr, "%s: listen(smtp_sock,%d): %s\n",
                 progname, ListenQueueSize, strerror(errno));
         exit(1);
       }
+
+       if (ssmtp >= 0) {
+         fd_nonblockingmode(ssmtp);
+         if (listen(ssmtp, ListenQueueSize) < 0) {
+           fprintf(stderr, "%s: listen(ssmtp_sock,%d): %s\n",
+                   progname, ListenQueueSize, strerror(errno));
+         }
+       }
+
       settrusteduser();       /* dig out the trusted user ID */
       zcloselog();            /* close the syslog too.. */
       detach();               /* this must NOT close fd's */
@@ -943,12 +1032,16 @@
       pid = getpid();
       openlogfp(&SS, daemon_flg);
       if (logfp != NULL) {
-         char *cp;
+         char *cp, *ssmtps = "";
+         char *tt;
+         if (ssmtp >= 0)
+           ssmtps = " including deprecated SMTP/TLS port TCP/465";
         time(&now);
         cp = rfc822date(&now);
+         tt = strchr(cp, '\n'); if (tt) *tt = 0;
         zsyslog((LOG_INFO, "server started."));
-         fprintf(logfp, "00000#\tstarted server pid %d at %s", pid, cp);
-         /*fprintf(logfp,"00000#\tfileno(logfp) = %d\n",fileno(logfp)); */
+         fprintf(logfp, "000000000#\tstarted server pid %d at %s%s\n", pid, cp, ssmtps);
+         /*fprintf(logfp,"000000000#\tfileno(logfp) = %d",fileno(logfp)); */
         fclose(logfp);
         logfp = NULL;
       }
@@ -962,8 +1055,38 @@
       SIGNAL_HANDLE(SIGHUP, SIG_IGN);
       SIGNAL_HANDLE(SIGTERM, sigterminator);
       while (!mustexit) {
+         fd_set rdset;
+         int n;
+
+         _Z_FD_ZERO(rdset);
+         _Z_FD_SET(s25, rdset);
+         if (ssmtp >= 0)
+           _Z_FD_SET(ssmtp, rdset);
+         n = s25;
+         if (n < ssmtp) n = ssmtp;
+         ++n;
+         n = select(n, &rdset, NULL, NULL, NULL);
+
+         if (n == 0) /* Timeout can't really happen here.. */
+           continue;
+         if (n < 0) {
+           /* various interrupts can happen here.. */
+           if (errno == EBADF || errno == EINVAL) break;
+           if (errno == ENOMEM) sleep(1); /* Wait a moment, then try again */
+           continue;
+         }
+
+         /* Ok, here the  select()  has reported that we have something
+            appearing in the listening socket(s).
+            We are simple, and try them in order.. */
+
+         n = -1;
+         if (s25   >= 0 && _Z_FD_ISSET(s25,   rdset)) n = s25;
+         if (ssmtp >= 0 && _Z_FD_ISSET(ssmtp, rdset)) n = ssmtp;
+
+
         raddrlen = sizeof(SS.raddr);
-         msgfd = accept(s, (struct sockaddr *) &SS.raddr, &raddrlen);
+         msgfd = accept(n, (struct sockaddr *) &SS.raddr, &raddrlen);
         if (msgfd < 0) {
           int err = errno;
           switch (err) {
@@ -998,7 +1121,7 @@
           openlogfp(&SS, daemon_flg);
           zsyslog((LOG_INFO, "accept() error=%d (%s)", err, strerror(err)));
           if (logfp) {
-             fprintf(logfp, "000000#\taccept(): %s; %s",
+             fprintf(logfp, "0000000000#\taccept(): %s; %s",
                     strerror(err), (char *) rfc822date(&now));
             fclose(logfp);
             logfp = NULL;
@@ -1039,8 +1162,13 @@
           SIGNAL_RELEASE(SIGCHLD);

           netconnected_flg = 1;
+
+           if (n == ssmtp) ssmtp_connected = 1;
+
+           close(s25); /* Listening socket.. */
+           if (ssmtp >= 0)
+             close(ssmtp); /* another of them */

-           close(s);   /* Listening socket.. */
           pid = getpid();

           if (msgfd != 0)
@@ -1067,7 +1195,6 @@
           SIGNAL_HANDLE(SIGTERM, SIG_IGN);

#if defined(AF_INET6) && defined(INET6)
-
           if (SS.raddr.v6.sin6_family == AF_INET6)
             SS.rport = SS.raddr.v6.sin6_port;
           else
@@ -1186,7 +1313,7 @@
         char *cp;
         time(&now);
         cp = rfc822date(&now);
-         fprintf(logfp, "00000#\tkilled server pid %d at %s", pid, cp);
+         fprintf(logfp, "000000000#\tkilled server pid %d at %s", pid, cp);
         fclose(logfp);
         logfp = NULL;
       }
@@ -1436,17 +1563,13 @@
    if (i) return i;

    if (SS->s_readout >= SS->s_bufread) {
-       /* So if it did dry up, try non-blocking read */
-       int flags = fcntl(SS->inputfd, F_GETFL, 0);
-       SS->s_readout = 0;
+        /* So if it did dry up, try non-blocking read */
#if defined(O_NONBLOCK) || defined(FNDELAY)
-#ifdef O_NONBLOCK
-       fcntl(SS->inputfd, F_SETFL, flags | O_NONBLOCK);
-#else
-       fcntl(SS->inputfd, F_SETFL, flags | FNDELAY);
-#endif
+       int flags = fd_nonblockingmode(SS->inputfd);
+       SS->s_readout = 0;
+
       SS->s_bufread = Z_read(SS, SS->s_buffer, sizeof(SS->s_buffer));
-       fcntl(SS->inputfd, F_SETFL, flags);
+       fd_restoremode(SS->inputfd, flags);
       if (SS->s_bufread > 0)
           return SS->s_bufread;
#endif
@@ -1533,6 +1656,9 @@
    SS->s_status = 0;
    SS->s_bufread = -1;
    SS->s_readout = 0;
+
+    fd_blockingmode(infd);
+    fd_blockingmode(outfd); /* Just in case these are separate FDs.. */
}


@@ -1634,6 +1760,20 @@
       exit(0);
#endif                         /* USE_TRANSLATION */
    }
+
+#ifdef HAVE_OPENSSL
+    if (ssmtp_connected) {
+      if (tls_start_servertls(SS)) {
+       /* No dice... */
+       exit(2);
+      }
+      SS->sslwrbuf = emalloc(8192);
+      SS->sslwrspace = 8192;
+      SS->sslwrin = SS->sslwrout = 0;
+    }
+#endif /* - HAVE_OPENSSL */
+
+
#ifdef HAVE_WHOSON_H
    if (do_whoson && netconnected_flg) {
       char buf[64];
@@ -1664,10 +1804,12 @@
      policystatus = 0; /* For internal - non-net-connected - mode
                          lack of PolicyDB is no problem at all.. */

+    if (debug) typeflush(SS);
    SS->policyresult = policytestaddr(policydb, &SS->policystate,
                                     POLICY_SOURCEADDR,
                                     (void *) &SS->raddr);
    SS->reject_net = (SS->policyresult < 0);
+    if (debug) typeflush(SS);
    if (SS->policyresult == 0) /* Alternates to this condition are:
                                 Always reject, or Always freeze.. */
      SS->policyresult = policytest(policydb, &SS->policystate,
@@ -1867,6 +2009,12 @@
           continue;
       }

+       /* RFC 2033 rules */
+       if (!lmtp_mode && SS->carp->cmd == HelloL)
+         goto unknown_command;
+       if (lmtp_mode && (SS->carp->cmd == Hello || SS->carp->cmd == Hello2))
+         goto unknown_command;
+
       if (SS->carp->cmd == DebugMode && ! debugcmdok)
         goto unknown_command;
       if (SS->carp->cmd == Expand    && ! expncmdok)
@@ -1951,6 +2099,7 @@
#endif /* - HAVE_OPENSSL */
       case Hello:
       case Hello2:
+       case HelloL:
           /* This code is LONG.. */
           smtp_helo(SS, buf, cp);
           typeflush(SS);
@@ -2307,15 +2456,14 @@
      zsyslog((LOG_DEBUG,"%s %c %s", logtag, (SS ? 'w' : '#'), buf));

    if (logfp != NULL) {
-       fprintf(logfp, "%s%c\t%s\n", logtag, (SS ? 'w' : '#'), buf);
-       fflush(logfp);
+      fprintf(logfp, "%s%c\t%s\n", logtag, (SS ? 'w' : '#'), buf);
+      fflush(logfp);
    }
    if (!SS) return; /* Only to local log.. */
    strcpy(s, "\r\n");
    Z_write(SS, buf, buflen+2); /* XX: check return value */
}

-
/*
 *  type220headers() outputs the initial greeting header(s), and
 *  does it without need for SSL wrapping.
@@ -2332,10 +2480,10 @@
    char linebuf[8000];
    char *l, *le;

-    /* Below use of  fprintf()  for SS->outfp  channel is for
-       ensuring that  setvbuf( _IOFBF ) is honoured always.
-       It appears not to be so with  fputc() and putc(), it *may*
-       be so with  fputs()  -- Solaris 2.5.1 */
+    /* We collect the line into single buffer, then output it in one go
+       with the code below.  This to ensure that it will (very likely)
+       be written out in single syscall -- some systems get mighty upset
+       when they receive multiple TCP segments of the initial greeting :-/ */

    for (; *hh ; ++hh) {
      char c = (hh[1] == NULL) ? ' ' : '-';
@@ -2405,16 +2553,11 @@
       *l = 0;
      *le = 0;

-      fprintf(SS->outfp, "220%c%s\r\n", c, linebuf);
-
-      if (logfp_to_syslog)
-       zsyslog((LOG_DEBUG, "%s w 220%c%s", logtag, c, linebuf));
-      if (logfp)
-       fprintf(logfp, "%sw\t220%c%s\n", logtag, c, linebuf);
-
+      if (c == ' ')
+       type(SS,  220, NULL, "%s", linebuf);
+      else
+       type(SS, -220, NULL, "%s", linebuf);
    }
-    fflush(SS->outfp);
-    if (logfp) fflush(logfp);
}


Index: smtpserver/smtpserver.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtpserver.h,v
retrieving revision 1.58
retrieving revision 1.61
diff -u -r1.58 -r1.61
--- smtpserver/smtpserver.h     2000/07/30 15:46:36     1.58
+++ smtpserver/smtpserver.h     2000/11/02 17:14:53     1.61
@@ -114,6 +114,58 @@
#include "zsyslog.h"


+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include <sys/time.h>
+
+#ifndef        NFDBITS
+/*
+ * This stuff taken from the 4.3bsd /usr/include/sys/types.h, but on the
+ * assumption we are dealing with pre-4.3bsd select().
+ */
+
+/* #error "FDSET macro susceptible" */
+
+typedef long   fd_mask;
+
+#ifndef        NBBY
+#define        NBBY    8
+#endif /* NBBY */
+#define        NFDBITS         ((sizeof fd_mask) * NBBY)
+
+/* SunOS 3.x and 4.x>2 BSD already defines this in /usr/include/sys/types.h */
+#ifdef notdef
+typedef        struct fd_set { fd_mask fds_bits[1]; } fd_set;
+#endif /* notdef */
+
+#ifndef        _Z_FD_SET
+/* #warning "_Z_FD_SET[1]" */
+#define        _Z_FD_SET(n, p)   ((p)->fds_bits[0] |= (1 << (n)))
+#define        _Z_FD_CLR(n, p)   ((p)->fds_bits[0] &= ~(1 << (n)))
+#define        _Z_FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << (n)))
+#define _Z_FD_ZERO(p)    memset((char *)(p), 0, sizeof(*(p)))
+#endif /* !FD_SET */
+#endif /* !NFDBITS */
+
+#ifdef FD_SET
+/* #warning "_Z_FD_SET[2]" */
+#define _Z_FD_SET(sock,var) FD_SET(sock,&var)
+#define _Z_FD_CLR(sock,var) FD_CLR(sock,&var)
+#define _Z_FD_ZERO(var) FD_ZERO(&var)
+#define _Z_FD_ISSET(i,var) FD_ISSET(i,&var)
+#else
+/* #warning "_Z_FD_SET[3]" */
+#define _Z_FD_SET(sock,var) var |= (1 << sock)
+#define _Z_FD_CLR(sock,var) var &= ~(1 << sock)
+#define _Z_FD_ZERO(var) var = 0
+#define _Z_FD_ISSET(i,var) ((var & (1 << i)) != 0)
+#endif
+
+
+
#ifndef __Usockaddr__
typedef union {
    struct sockaddr_in v4;
@@ -149,6 +201,7 @@
    StartTLS,
#endif /* - HAVE_OPENSSL */
    Hello2, Mail2, Send2, Verify2,     /* 8-bit extensions */
+    HelloL,            /* RFC 2033 LHLO -- sort of */
    Silent             /* One particular client error trap.. */
} Command;

@@ -208,6 +261,7 @@

    int  from_box;             /* Set when:  MAIL FROM:<>  */
    int  rcpt_count;
+    int  ok_rcpt_count;
    int  sender_ok;
    /* For BDAT -command */
    int  bdata_blocknum;
@@ -266,6 +320,7 @@
extern int ehlo_ok;
extern int etrn_ok;
extern int starttls_ok;
+extern int ssmtp_listen;;
extern int msa_mode;
extern int deliverby_ok;
#define MAX_ETRN_CLUSTER_IDX 40
@@ -288,6 +343,7 @@
extern int configuration_ok;
extern int unknown_cmd_limit;
extern int sum_sizeoption_value;
+extern int lmtp_mode;

extern int bindaddr_set, bindport_set, testaddr_set;
extern u_short   bindport;
@@ -374,9 +430,11 @@
extern void killr __((SmtpState * SS, int rpid));
extern void typeflush __((SmtpState *));
#if defined(HAVE_STDARG_H) && defined(HAVE_VPRINTF)
-extern void type __((SmtpState *, const int code, const char *status, const char *fmt,...));
+extern void type __((SmtpState *, int code, const char *status, const char *fmt,...));
+extern void Z_printf __(( SmtpState *, const char *fmt, ... ));
#else
extern void type __(( /* SmtpState *SS, int code, const char *status, const char *fmt, ... */ ));
+extern void Z_printf __(( /* SmtpState *, const char *fmt, ... */ ));
#endif
extern void debug_report __((SmtpState *, int, const char *, const char *));
extern void header_to_mime __((char *, int *, int));
@@ -437,6 +495,7 @@
extern void smtp_auth __((SmtpState * SS, const char *buf, const char *cp));

#ifdef HAVE_OPENSSL
+extern int tls_start_servertls __((SmtpState *SS));
extern void smtp_starttls __((SmtpState * SS, const char *buf, const char *cp));
extern void Z_init    __(( void ));
extern void Z_cleanup __(( SmtpState * ));
@@ -461,3 +520,8 @@

extern int encodebase64string __((const char *instr, int inlen, char *outstr, int outspc));
extern int decodebase64string __((const char *instr, int inlen, char *outstr, int outspc, const char **inleftover));
+
+/* transports/libta/nonblocking.c */
+extern int  fd_nonblockingmode __((int fd));
+extern int  fd_blockingmode __((int fd));
+extern void fd_restoremode __((int fd, int mode));
Index: smtpserver/smtptls.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/smtptls.c,v
retrieving revision 1.14
retrieving revision 1.16
diff -u -r1.14 -r1.16
--- smtpserver/smtptls.c        2000/08/22 12:48:28     1.14
+++ smtpserver/smtptls.c        2000/10/16 20:39:26     1.16
@@ -69,8 +69,6 @@
  sprintf(buf, "%s/%s/%s", po, subdir, filename);
}

-static int tls_start_servertls __((SmtpState *SS));
-
void
smtp_starttls(SS, buf, cp)
     SmtpState *SS;
@@ -956,7 +954,7 @@
#endif


-static int
+int
tls_start_servertls(SS)
     SmtpState *SS;
{
Index: ssl/ssl.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/ssl/ssl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ssl/ssl.c   1998/07/30 16:19:12     1.3
+++ ssl/ssl.c   2000/09/25 11:30:33     1.4
@@ -93,11 +93,17 @@
/* extern char *sprintf();
   extern int fprintf();
   extern int printf(); */
+#ifndef strcpy
extern char *strcpy();
-extern int atoi();
-extern int getopt();
+#endif
+#ifndef strcmp
extern int strcmp();
+#endif
+#ifndef strlen
extern int strlen();
+#endif
+extern int atoi();
+extern int getopt();
/* extern int tolower(); */
/* extern void abort(); */
/* extern void exit(); */
Index: transports/errormail/errormail.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/errormail/errormail.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- transports/errormail/errormail.c    1999/12/04 19:57:44     1.7
+++ transports/errormail/errormail.c    2000/10/16 11:32:39     1.8
@@ -294,7 +294,7 @@
       if (efp != NULL) {
         int inhdr = 1;
         buf[sizeof(buf)-1] = 0;
-         while (cfgets(buf,sizeof(buf)-1,efp) >= 0) {
+         while (csfgets(buf,sizeof(buf)-1,efp) >= 0) {
           if (strncmp(buf,"HDR",3)==0)
             continue;
           else if (strncmp(buf,"ADR",3)==0)
@@ -310,7 +310,7 @@
         /* copy To: from error return address */
         sfprintf(mfp, "To: <%s>\n", rp->addr->link->user);

-         while (cfgets(buf,sizeof(buf)-1,efp) >= 0) {
+         while (csfgets(buf,sizeof(buf)-1,efp) >= 0) {
           if (strncmp(buf,"HDR",3)==0) {
             sfprintf(mfp, "%s", buf+4);
           } else if (strncmp(buf,"ADR",3)==0) {
Index: transports/hold/hold.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/hold/hold.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- transports/hold/hold.c      2000/07/31 00:00:49     1.8
+++ transports/hold/hold.c      2000/09/25 11:35:59     1.9
@@ -12,6 +12,7 @@
#include <sysexits.h>
#include <sys/param.h>
#include <sys/stat.h>
+#include <errno.h>

#include "zmsignal.h"
#include "zmalloc.h"
@@ -729,7 +730,16 @@
       struct passwd *pw;
       struct stat st;

-       if ((pw = getpwnam(user)) == NULL) return 1;
+       pw = getpwnam(user);
+       if (!pw)
+         pw = getpwnam(user);
+       if (!pw) {
+         if (errno == ENOENT) return 1;
+#ifdef __osf__
+         if (errno == EINVAL) return 1;
+#endif
+         return ranny(2) == 0; /* 30% of the time */
+       }
       if (pw->pw_dir == NULL || pw->pw_dir[0] == '\0') return 1;
       if (stat(pw->pw_dir, &st) == 0 &&
           S_ISDIR(st.st_mode)) return 1;
Index: transports/libta/ctlopen.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/libta/ctlopen.c,v
retrieving revision 1.23
retrieving revision 1.25
diff -u -r1.23 -r1.25
--- transports/libta/ctlopen.c  2000/08/30 11:57:57     1.23
+++ transports/libta/ctlopen.c  2000/10/17 14:18:41     1.25
@@ -4,7 +4,7 @@
 */

/*
- *     Copyright 1994-1997 by Matti Aarnio
+ *     Copyright 1994-2000 by Matti Aarnio
 *
 * To really understand how headers (and their converted versions)
 * are processed you do need to draw a diagram.
@@ -360,6 +360,11 @@
         if (d.ctlmap != NULL)
           munmap((void*)d.ctlmap, d.contentsize);
#endif
+         /* Is it perhaps just the ETRN request file ?
+            and manual expirer gave it to us ?  Never mind then.. */
+         if (contents[0] == _CF_TURNME)
+           return NULL;
+
         warning("Truncated or illegal control file \"%s\"!", file);
         /* exit(EX_PROTOCOL); */
         sleep(60);
@@ -671,7 +676,7 @@
       }

       /* Sometimes we bail out before terminating NULLs are added..
-          propably before anything is added. */
+          probably before anything is added. */
       msgheaders   [headers_cnt] = NULL;
       msgheaderscvt[headers_cnt] = NULL;

Index: transports/libta/diagnostic.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/libta/diagnostic.c,v
retrieving revision 1.19
retrieving revision 1.22
diff -u -r1.19 -r1.22
--- transports/libta/diagnostic.c       2000/07/30 15:46:37     1.19
+++ transports/libta/diagnostic.c       2000/10/17 14:32:25     1.22
@@ -4,7 +4,7 @@
 */
/*
 *     A lot of changes all around over the years by Matti Aarnio
- *     <[email protected]>, copyright 1992-1997
+ *     <[email protected]>, copyright 1992-2000
 */

/*
@@ -220,6 +220,7 @@
       char    message[8192];
       char    statmsgbuf[32+16];
       const char * statmsg;
+       const char * syslogmsg;
       char    mark;
       register char *s, *es, *s2;
       va_list ap;
@@ -462,7 +463,9 @@
           rp->lockoffset = 0; /* mark this recipient unlocked */
         }

-         tasyslog(rp, xdelay, wtthost, wttip, statmsg, message);
+         syslogmsg = strrchr(message, '\r');
+         if (!syslogmsg) syslogmsg = message;
+         tasyslog(rp, xdelay, wtthost, wttip, statmsg, syslogmsg);
       }
       fflush(stdout);
}
Index: transports/libta/mimeheaders.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/libta/mimeheaders.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- transports/libta/mimeheaders.c      1999/12/30 20:03:57     1.19
+++ transports/libta/mimeheaders.c      2000/10/10 21:00:58     1.20
@@ -473,9 +473,20 @@
         }
         /* Picked up a param name, now scan the value */
         pv = s;
+
+         /* Have seen cases where there was:
+                charset = "foo-bar"
+            That is, it had whitespaces around the "=" sign. */
+
+         while (*s == ' ' || *s == '\t') ++s;
+
         if (*s == '=') {          /* What if no `=' ?? */
           ++pv;
           ++s;
+
+           /* Skip possible further whitespace */
+           while (*s == ' ' || *s == '\t') ++s;
+
           if (*s == '"') {
             /* Scan a quoted string, stop at trailing '"' */
             int quoted = 0; /* Quoted with '\' */
@@ -574,7 +585,7 @@

struct cte_data *
parse_content_encoding(cte_linep)
-     char **cte_linep; /* Propably is not a multiline entry.. */
+     char **cte_linep; /* Probably is not a multiline entry.. */
{
       char *line, *s;
       struct cte_data *cte = malloc(sizeof(struct cte_data));
@@ -823,7 +834,7 @@
         if (CT)       /* XX: This CAN be wrong action for
                              some esoteric SysV mailers.. */
           delete_header(rp,CT);
-         /* These most propably won't happen, but the delete_header()
+         /* These most probably won't happen, but the delete_header()
            does scram the pointers anyway.. */
         if (MIME)
           delete_header(rp,MIME);
@@ -1017,7 +1028,7 @@
         if (!mime_received_convert(rp," convert rfc822-to-8bit"))
           return 0;   /* "Received:" conversion failed! */

-       } /* else propably already decoded */
+       } /* else probably already decoded */

       return 1;
}
Index: transports/mailbox/mailbox.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/mailbox/mailbox.c,v
retrieving revision 1.78
retrieving revision 1.80
diff -u -r1.78 -r1.80
--- transports/mailbox/mailbox.c        2000/03/14 23:19:20     1.78
+++ transports/mailbox/mailbox.c        2000/10/16 11:32:39     1.80
@@ -339,7 +339,7 @@
extern void setrootuid __((struct rcpt *));
extern void process __((struct ctldesc *dp));
extern void deliver __((struct ctldesc *dp, struct rcpt *rp, const char *userbuf, const char *timestring));
-extern Sfio_t *putmail __((struct ctldesc *dp, struct rcpt *rp, int fdmail, const char *fdopmode, const char *timestring, const char *file));
+extern Sfio_t *putmail __((struct ctldesc *dp, struct rcpt *rp, int fdmail, const char *fdopmode, const char *timestring, const char *file, uid_t));
extern int appendlet __((struct ctldesc *dp, struct rcpt *rp, struct writestate *WS, const char *file, int ismime));
extern char **environ;
extern int writebuf __((struct writestate *, const char *buf, int len));
@@ -801,12 +801,12 @@
}

/*
- * propably_x400() -- some heuristics to see if this is likely
+ * probably_x400() -- some heuristics to see if this is likely
 *                   a mis-written X.400 address
 */
-int propably_x400 __((const char *));
+int probably_x400 __((const char *));
int
-propably_x400(addr)
+probably_x400(addr)
       const char *addr;
{
       int slashes = 0;
@@ -1121,7 +1121,7 @@
         }

         if (uid == nobody) {
-           if (propably_x400(usernam)) {
+           if (probably_x400(usernam)) {

             if (verboselog)
               fprintf(verboselog,
@@ -1234,7 +1234,7 @@
                          "getpwnam for user \"%s\" failed; errno=%d",
                          usernam, err);

-             } else if (propably_x400(usernam)) {
+             } else if (probably_x400(usernam)) {

               if (verboselog)
                 fprintf(verboselog,
@@ -1709,7 +1709,7 @@
         nbp->offset = eofindex;
#endif /* BIFF || RBIFF */

-       fp = putmail(dp, rp, fdmail, "a+", timestring, file);
+       fp = putmail(dp, rp, fdmail, "a+", timestring, file, uid);

       if (S_ISREG(st->st_mode)) {

@@ -1841,11 +1841,12 @@


Sfio_t *
-putmail(dp, rp, fdmail, fdopmode, timestring, file)
+putmail(dp, rp, fdmail, fdopmode, timestring, file, uid)
     struct ctldesc *dp;
     struct rcpt *rp;
     int fdmail;
     const char *fdopmode, *timestring, *file;
+     uid_t uid;
{
       int len, rc, mw=0;
       Sfio_t *fp;
@@ -1924,9 +1925,6 @@
           strcmp(rp->addr->link->channel, "error") == 0)
         fromuser = "";

-       if (*fromuser == 0)
-         fromuser = "MAILER-DAEMON";
-
       do {
         hdrs = has_header(rp,"Return-Path:");
         if (hdrs) delete_header(rp,hdrs);
@@ -1934,6 +1932,10 @@

       append_header(rp,"Return-Path: <%.999s>", fromuser);

+
+       if (*fromuser == 0)
+         fromuser = "MAILER-DAEMON";
+
       hdrs = has_header(rp,"To:");
       if (!hdrs) {
         /* No "To:" -header ?  Rewrite possible "Apparently-To:" header! */
@@ -1948,6 +1950,11 @@
       }

       do {
+         hdrs = has_header(rp,"X-Envelope-To:");
+         if (hdrs) delete_header(rp,hdrs);
+       } while (hdrs);
+
+       do {
         hdrs = has_header(rp,"X-Orcpt:");
         if (hdrs) delete_header(rp,hdrs);
       } while (hdrs);
@@ -1969,6 +1976,9 @@
           || swriteheaders(rp, fp, "\n", convert_qp, 0, NULL) < 0)
         failed = 1;

+       if (!failed)
+         sfprintf(fp, "X-Envelope-To: <%s> (uid %d)\n", rp->addr->user, uid);
+
       if (!failed && rp->orcpt) {
         sfprintf(fp, "X-Orcpt: ");
         decodeXtext(fp, rp->orcpt);
@@ -2363,7 +2373,7 @@

         } else {

-           /* Duh, propably something like:
+           /* Duh, probably something like:
              "|IFS=' '&&.... "
           */

@@ -2408,7 +2418,7 @@
       /* write the message */
       mmdf_mode += 2;
       eofindex = -1; /* NOT truncatable! */
-       fp = putmail(dp, rp, out[1], "a", timestring, cmdbuf);
+       fp = putmail(dp, rp, out[1], "a", timestring, cmdbuf, uid);
       /* ``fp'' is dummy marker */
       mmdf_mode -= 2;
       if (fp == NULL) {
@@ -2421,7 +2431,7 @@
       /* read any messages from its stdout/err on in[0] */
       /* ... having forked and set up the pipe, we quickly continue */
       buf[sizeof(buf)-100] = 0; /* Chop it just to make sure */
-       if (cfgets(buf, (sizeof buf) - 100, errfp) < 0)
+       if (csfgets(buf, (sizeof buf) - 100, errfp) < 0)
               buf[0] = '\0';
       else if ((cp = strchr(buf, '\n')) != NULL)
               *cp = '\0';
@@ -2589,13 +2599,13 @@
             struct stat st;
#ifdef HAVE_UTIME
             struct utimbuf tv;
-             stat(*filep,&st); /* This by all propability will not fail.. */
+             stat(*filep,&st); /* This by all probability will not fail.. */
             tv.actime  = 0;   /* never read */
             tv.modtime = st.st_mtime;
             utime(*filep, &tv);
#else
             struct timeval tv[2];
-             stat(*filep,&st); /* This by all propability will not fail.. */
+             stat(*filep,&st); /* This by all probability will not fail.. */
             tv[0].tv_sec = 0; /* never read */
             tv[1].tv_sec = st.st_mtime;
             tv[0].tv_usec = tv[1].tv_usec = 0;
@@ -2604,7 +2614,7 @@
           }
           return 1;
         }
-         if (errno == EEXIST) { /* It exists -- propably a race between
+         if (errno == EEXIST) { /* It exists -- probably a race between
                                   two file creators caused this */

           return 1;
@@ -2890,7 +2900,7 @@
         /* We really can't use the 'let_buffer' cache here */
         readalready = 0;
         i = 0;
-         while ((i = cfgets(let_buffer, sizeof(let_buffer), mfp)) != EOF) {
+         while ((i = csfgets(let_buffer, sizeof(let_buffer), mfp)) != EOF) {
           /* It MAY be malformed -- if it has a BUFSIZ length
              line in it, IT CAN'T BE MIME  :-/                */
           if (i == sizeof(let_buffer) &&
@@ -3476,7 +3486,7 @@
       if (efp != NULL) {
         int inhdr = 1;
         buf[sizeof(buf)-1] = 0;
-         while (cfgets(buf,sizeof(buf)-1,efp) >= 0) {
+         while (csfgets(buf,sizeof(buf)-1,efp) >= 0) {
           if (strncmp(buf,"HDR",3)==0) {
             sfprintf(mfp, "%s", buf+4);
           } else if (strncmp(buf,"SUB",3)==0) {
Index: transports/sm/sm.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/sm/sm.c,v
retrieving revision 1.20
retrieving revision 1.23
diff -u -r1.20 -r1.23
--- transports/sm/sm.c  2000/07/31 00:00:51     1.20
+++ transports/sm/sm.c  2000/10/16 11:32:39     1.23
@@ -1,7 +1,7 @@
/*
 *     Copyright 1988 by Rayan S. Zachariassen, all rights reserved.
 *     This will be free software, but only when it is finished.
- *     Copyright 1994-1997 by Matti Aarnio -- MIME processings
+ *     Copyright 1994-2000 by Matti Aarnio -- MIME processings
 */

#define DefCharset "ISO-8859-1"
@@ -51,7 +51,8 @@
#endif /* !SEEK_SET */

/* as in: SKIPWHILE(isascii,cp) */
-#define        SKIPWHILE(X,Y)  while (*Y != '\0' && isascii(*Y) && X(*Y)) { ++Y; }
+#define SKIPSPACE(Y) while (*Y == ' ' || *Y == '\t' || *Y == '\n') ++Y
+#define SKIPTEXT(Y)  while (*Y && *Y != ' ' && *Y != '\t' && *Y != '\n') ++Y

#define        FROM_   "From "

@@ -70,6 +71,7 @@
FILE   *logfp   = NULL;
int    maxwidth = 0;
int    can_8bit = 0;           /* Can do 8-bit stuff! */
+int    decode_qp = 0;
int    keep_header8 = 0;       /* Don't do "MIME-2" to the headers */

int    D_alloc = 0;            /* Memory debugging */
@@ -147,6 +149,8 @@
#define MO_WANTSFROM           0x10000 /* Wants "From:" -header */
#define MO_BSMTPHELO           0x20000 /* Add HELO/EHLO to the BSMTP */

+#define MO_XENVELOPES          0x40000 /* Write various X-Envelope-*: headers to mesage */
+
struct exmapinfo {
       int     origstatus;
       const char *statusmsg;
@@ -244,7 +248,7 @@
           verboselog = stdout;
           break;
         case '8':
-           can_8bit = 1;
+           can_8bit = decode_qp = 1;
           break;
         case 'H':
           keep_header8 = 1;
@@ -380,8 +384,14 @@
       const char *ds, **av, *s;
       int status;
       int content_kind, conversion_prohibited, ascii_clean = 0;
+       time_t now;
+       char *timestring;
       CONVERTMODE convertmode = _CONVERT_NONE;

+       now = time((time_t *)0);
+       timestring = ctime(&now);
+       *(timestring+strlen(timestring)-1) = '\0';
+
       if (lseek(dp->msgfd, (off_t)(dp->msgbodyoffset), SEEK_SET) < 0L)
               warning("Cannot seek to message body! (%m)", (char *)NULL);

@@ -639,7 +649,7 @@
           }
           if (mp->flags & MO_BEBSMTP) {
             if (rp->deliverby) {
-               fprintf(tafp," BY=%ld;", rp->deliverby);
+               fprintf(tafp," BY=%ld;", rp->deliverby - now);
               if (rp->deliverbyflgs & _DELIVERBY_R) fputc('R',tafp);
               if (rp->deliverbyflgs & _DELIVERBY_N) fputc('N',tafp);
               if (rp->deliverbyflgs & _DELIVERBY_T) fputc('T',tafp);
@@ -657,13 +667,8 @@
       /* Now continue with inside stuff -- well, normal UUCP stuff */

       if (mp->flags & (MO_UNIXFROM|MO_REMOTEFROM)) {
-         char *timestring;
-         time_t now;
         const char *uu = startrp->addr->link->user;

-         now = time((time_t *)0);
-         timestring = ctime(&now);
-         *(timestring+strlen(timestring)-1) = '\0';
         if (strcmp(startrp->addr->link->channel,"error")==0)
           uu = "<>";
         fprintf(tafp, "%s%s %s", FROM_, uu, timestring);
@@ -713,7 +718,7 @@
           }
           break;
         case 9:               /* QUOTED-PRINTABLE */
-           if (can_8bit) {
+           if (decode_qp) {
             /* Force(d) to decode Q-P while transfer.. */
             convertmode = _CONVERT_8BIT;
             /*  UPGRADE TO 8BIT !  */
@@ -745,6 +750,23 @@
           uu = "";
         append_header(startrp,"Return-Path: <%.999s>", uu);
       }
+
+       if (mp->flags & MO_XENVELOPES) {
+         const char *uu;
+         char **hdrs;
+         do {
+           hdrs = has_header(startrp,"X-Envelope-To:");
+           if (hdrs) delete_header(startrp, hdrs);
+         } while (hdrs);
+         for (rp = startrp; rp != endrp; rp = rp->next) {
+           uu = rp->addr->user;
+           if (strcmp(rp->addr->link->channel,"error")==0)
+             uu = "";
+           append_header(rp,"X-Envelope-To: <%.999s> (uid %s)",
+                         uu, rp->addr->misc);
+         }
+       }
+
       if (mp->flags & MO_CRLF) {
         fwriteheaders(startrp, tafp, "\r\n", convertmode, maxwidth, NULL);
         fprintf(tafp, "\r\n");
@@ -944,7 +966,7 @@

         for (;;) {
#if !(defined(HAVE_MMAP) && defined(TA_USE_MMAP))
-           if ((i = cfgets(let_buffer, sizeof(let_buffer), mfp)) == EOF)
+           if ((i = csfgets(let_buffer, sizeof(let_buffer), mfp)) == EOF)
             break;
#else
           const char *let_buffer = s, *s2 = s;
@@ -1228,7 +1250,7 @@
         }
         entry = (char*)cp;
         strcpy(entry, buf);
-         SKIPWHILE(!isspace, cp);
+         SKIPTEXT(cp);
         if (isascii(*cp) && isspace(*cp)) {
           if (*cp == '\n') {
             fprintf(stderr, "%s: %s: bad entry: %s",
@@ -1250,60 +1272,64 @@
       m.name = entry;
       m.flags = MO_UNIXFROM;
       ++cp;
-       SKIPWHILE(isspace, cp);
+       SKIPSPACE(cp);
       /* process mailer option flags */
-       for (;isascii(*cp) && !isspace(*cp); ++cp) {
+       for (;*cp && *cp != ' ' && *cp != '\t' && *cp != '\n'; ++cp) {
+         int no = 0;
         switch (*cp) {
+         case '7':     m.flags |= MO_STRIPHIBIT;       break;
+         case '8':     can_8bit = 1;                   break;
+         case '9':     decode_qp = 1;                  break;
+         case 'A': no=*cp; break;      /* arpanet-compatibility */
+         case 'b':     m.flags |= (MO_BSMTP|MO_HIDDENDOT); break;
+         case 'B':     if (m.flags & MO_BESMTP) /* -BB */
+                           m.flags |= MO_BEDSMTP;
+                       else
+                           m.flags |= MO_BESMTP|MO_BSMTP|MO_HIDDENDOT;
+                       break;
+         case 'C': no=*cp; break; /* canonicalize remote hostnames */
         case 'D':             /* this mailer wants a Date: line */
               m.flags |= MO_WANTSDATE;        break;
+         case 'e':     m.flags |= MO_XENVELOPES;       break;
+         case 'E':     m.flags |= MO_ESCAPEFROM;       break;
+         case 'f':     m.flags |= MO_FFROMFLAG;        break;
         case 'F':             /* this mailer wants a From: line */
               m.flags |= MO_WANTSFROM;        break;
-         case '7':     m.flags |= MO_STRIPHIBIT;       break;
-         case 'E':     m.flags |= MO_ESCAPEFROM;       break;
+         case 'h': no=*cp; break; /* preserve upper case in host names */
+         case 'H':     m.flags |= MO_BSMTPHELO;        break;
+         case 'I': no=*cp; break; /* talking to a clone of I */
+         case 'l': no=*cp; break; /* this is a local mailer */
+         case 'L': no=*cp; break; /* limit line length */
+         case 'm':     m.flags |= MO_MANYUSERS;        break;
+         case 'M': no=*cp; break; /* this mailer wants a Message-Id: line */
+         case 'n':     m.flags &= ~MO_UNIXFROM;        break;
+         case 'p': no=*cp; break; /* use SMTP return path */
         case 'P':     m.flags |= MO_RETURNPATH;       break;
+         case 'r':     m.flags |= MO_RFROMFLAG;        break;
         case 'R':     m.flags |= MO_CRLF;             break;
+         case 's':     m.flags |= MO_STRIPQUOTES;      break;
         case 'S':     m.flags |= MO_NORESETUID;       break;
+         case 'u': no=*cp; break; /* preserve upper case in user names */
         case 'U':     m.flags |= MO_REMOTEFROM;       break;
+         case 'x': no=*cp; break; /* this mailer wants a Full-Name: line */
         case 'X':     m.flags |= MO_HIDDENDOT;        break;
-         case 'f':     m.flags |= MO_FFROMFLAG;        break;
-         case 'm':     m.flags |= MO_MANYUSERS;        break;
-         case 'n':     m.flags &= ~MO_UNIXFROM;        break;
-         case 'r':     m.flags |= MO_RFROMFLAG;        break;
-         case 's':     m.flags |= MO_STRIPQUOTES;      break;
-         case 'H':     m.flags |= MO_BSMTPHELO;        break;
-         case 'b':     m.flags |= (MO_BSMTP|MO_HIDDENDOT); break;
-         case 'B':     if (m.flags & MO_BESMTP) /* -BB */
-                           m.flags |= MO_BEDSMTP;
-                       else
-                           m.flags |= MO_BESMTP|MO_BSMTP|MO_HIDDENDOT;
-                       break;
-         case 'A':             /* arpanet-compatibility */
-         case 'C':             /* canonicalize remote hostnames */
-         case 'I':             /* talking to a clone of I */
-         case 'L':             /* limit line length */
-         case 'M':             /* this mailer wants a Message-Id: line */
-         case 'e':             /* expensive mailer */
-         case 'h':             /* preserve upper case in host names */
-         case 'l':             /* this is a local mailer */
-         case 'p':             /* use SMTP return path */
-         case 'u':             /* preserve upper case in user names */
-         case 'x':             /* this mailer wants a Full-Name: line */
-           fprintf(stderr,
-                   "%s: the '%c' sendmail mailer option does not make sense in this environment\n",
-                   progname, *cp);
-           break;
-         case '-':             /* ignore */
-           break;
+
+         case '-':     break;  /* ignore */
         default:
           fprintf(stderr,
                   "%s: unknown sendmail mailer option '%c'\n",
                   progname, *cp);
           break;
         }
+         if (no) {
+           fprintf(stderr,
+                   "%s: the '%c' sendmail mailer option does not make sense in this environment\n",
+                   progname,no);
+         }
       }
-       SKIPWHILE(isspace, cp);
+       SKIPSPACE(cp);
       m.command = (char*) cp;
-       SKIPWHILE(!isspace, cp);
+       SKIPTEXT(cp);
       if ((char*)cp == m.command) {
               fprintf(stderr,"%s: bad entry for %s\n",progname, m.name);
               return NULL;
@@ -1319,16 +1345,16 @@
         sprintf(nmc, "%s/%s", mailbin, m.command);
         m.command = nmc;
       }
-       SKIPWHILE(isspace, cp);
+       SKIPSPACE(cp);
       i = 0;
       while (isascii(*cp) && !isspace(*cp) && i < MD_ARGVMAX) {
         if (*cp == '\0')
           break;
         m.argv[i++] = (char*) cp;
-         SKIPWHILE(!isspace, cp);
-         if (isascii(*cp)) {
+         SKIPTEXT(cp);
+         if (*cp) {
           *cp++ = '\0';
-           SKIPWHILE(isspace, cp);
+           SKIPSPACE(cp);
         }
       }
       if (i == 0) {
@@ -1391,7 +1417,7 @@
         for (i=0; i < readalready; ++i)
           if (128 & (let_buffer[i])) {
             lseek(mfd, dp->msgbodyoffset, SEEK_SET);
-             /* We propably have not read everything of the file! */
+             /* We probably have not read everything of the file! */
             readalready = 0;
             return 0;         /* Not clean ! */
           }
Index: transports/smtp/Makefile.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/smtp/Makefile.in,v
retrieving revision 1.10
retrieving revision 1.12
diff -u -r1.10 -r1.12
--- transports/smtp/Makefile.in 2000/07/29 20:01:08     1.10
+++ transports/smtp/Makefile.in 2000/10/26 11:02:31     1.12
@@ -29,7 +29,7 @@
LIBDEB=                $(TOPDIR)/libs/libtag
LINTLIB=       ../libta/llib-llibta.ln

-smtp-a:        smtp mprobe
+smtp-a:        smtp mprobe getmxrr-test

smtp:  $(OBJS) version.o $(LIBDEB)
       -rm -f smtp
@@ -56,11 +56,13 @@
smtptls.o:   $(srcdir)/smtptls.c $(srcdir)/smtp.h
appendlet.o: $(srcdir)/appendlet.c $(srcdir)/smtp.h

-install:       smtp mprobe
+install:       smtp mprobe getmxrr-test
       $(INSTALL) -m 0755 smtp $(MAILBIN)/ta/smtp.x
       mv $(MAILBIN)/ta/smtp.x $(MAILBIN)/ta/smtp
       $(INSTALL) -m 0755 mprobe $(MAILBIN)/mprobe.x
       mv $(MAILBIN)/mprobe.x $(MAILBIN)/mprobe
+       $(INSTALL) -m 0755 getmxrr-test $(MAILBIN)/getmxrr-test.x
+       mv $(MAILBIN)/getmxrr-test.x $(MAILBIN)/getmxrr-test

clean:
       -rm -f smtp mprobe *~ *.o *.out make.log *.third *.3rd
Index: transports/smtp/appendlet.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/smtp/appendlet.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- transports/smtp/appendlet.c 2000/02/02 19:59:01     1.8
+++ transports/smtp/appendlet.c 2000/10/16 11:32:39     1.9
@@ -147,7 +147,7 @@
         lastwasnl = 0;
         for (;;) {
#if !(defined(HAVE_MMAP) && defined(TA_USE_MMAP))
-           i = cfgets(let_buffer, sizeof(let_buffer), mfp);
+           i = csfgets(let_buffer, sizeof(let_buffer), mfp);
           if (i < 0)
             break;
           /* It MAY be malformed -- if it has a ZBUFSIZ*8 length
Index: transports/smtp/smtp.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/smtp/smtp.c,v
retrieving revision 1.188
retrieving revision 1.199
diff -u -r1.188 -r1.199
--- transports/smtp/smtp.c      2000/08/28 21:22:33     1.188
+++ transports/smtp/smtp.c      2000/11/12 16:51:47     1.199
@@ -66,6 +66,9 @@
#endif
int close_after_data = 0;

+int lmtp_mode = 0;             /* RFC 2033: LMTP mode */
+
+
#ifdef HAVE_OPENSSL
int demand_TLS_mode = 0;       /* Demand TLS */
int tls_available = 0;         /* local client code running ok */
@@ -87,7 +90,7 @@
       static char id = 0;

       /* The `id' is pseudo-random character inteded to lessen
-          the propablility of reused PID matching same prefix-
+          the probablility of reused PID matching same prefix-
          string between two SMTP sessions, and thus making the
          resulting output  sort(1)able in flat ascii mode.
          Timeorder would not be valid, perhaps, but
@@ -189,6 +192,7 @@
         if (now > tmout && SS->smtpfp && sffileno(SS->smtpfp) >= 0) {
           /* Timed out, and have a writable SMTP connection active.. */
           /* Lets write a NOOP there. */
+           SS->rcptstates = 0;
           i = smtpwrite(SS, 0, "NOOP", 0, NULL);
           if (i != EX_OK && SS->smtpfp != NULL) {
             /* No success ?  QUIT + close! (if haven't closed yet..) */
@@ -387,10 +391,11 @@
       eocmdline = cmdline;

       memset(&SS,0,sizeof(SS));
-       SS.main_esmtp_on_banner = -1;
+       SS.main_esmtp_on_banner = -1; /* Presume existing per spec */
       SS.servport      = -1;
       SS.smtp_bufsize  = 64*1024;
       SS.ehlo_sizeval  = -1;
+       smtp_flush(&SS);

       for (i = 0; argv[i] != NULL; ++i)
         eocmdline = strlen(argv[i])+ argv[i] + 1;
@@ -432,7 +437,7 @@
       SS.remotemsg[0] = '\0';
       SS.remotehost[0] = '\0';
       while (1) {
-         c = getopt(argc, argv, "c:deh:l:p:rsvxDEF:L:HPS:T:VWZ:678");
+         c = getopt(argc, argv, "c:deh:l:p:rsvxDEF:L:HMPS:T:VWZ:678");
         if (c == EOF)
           break;
         switch (c) {
@@ -479,15 +484,21 @@
           break;
         case 'E':             /* don't do EHLO, unless target system
                                  has "ESMTP" on its banner */
-           SS.main_esmtp_on_banner = 0;
+           SS.main_esmtp_on_banner = 0; /* Do test for it */
           break;
         case 'F':             /* Send all SMTP sessions to that host,
                                  possibly set also '-x' to avoid MXes! */
           punthost = strdup(optarg);
           break;
+         case 'H':
+           keep_header8 = 1;
+           break;
         case 'L':             /* Specify which local identity to use */
           localidentity = strdup(optarg);
           break;
+         case 'M':
+           lmtp_mode = 1;
+           break;
         case 'T':             /* specify Timeout in seconds */
           if (CISTREQN(optarg,"conn=",5)) {
             timeout_conn = parse_interval(optarg+5,NULL);
@@ -542,15 +553,16 @@
         case 'W':             /* Enable RFC974 WKS checks */
           checkwks = 1;
           break;
-         case 'H':
-           keep_header8 = 1;
-           break;
         case '8':
           force_8bit = 1;
           force_7bit = 0;
           break;
         case '7':
-           force_7bit = 1;
+           if (force_7bit) /* Double-7 locks the ESMTP away, can
+                              then be turned into 'force-8' mode
+                              without ESMTP */
+             SS.main_esmtp_on_banner = -2;
+           ++force_7bit;
           force_8bit = 0;
           break;
         case 'Z':  /* Dummy option to carry HUGE parameter string for
@@ -582,6 +594,12 @@
       if (SS.servport < 0)
         SS.servport = IPPORT_SMTP;

+       if (lmtp_mode && SS.servport == 25) {
+         fprintf(stderr,
+                 "%s: LMTP mode is not allowed without explicite port specifier with value other than 25\n", argv[0]);
+         exit(EX_USAGE);
+       }
+
       if (optind < argc) {
         host = strdup(argv[optind]);
         strncpy(SS.remotehost, (char*)host, sizeof(SS.remotehost));
@@ -696,9 +714,10 @@
              In theory we could use same host via MX, but...     */
           if (host && !STREQ(s,(char*)host)) {
             if (SS.smtpfp) {
-               if (!getout && !zmalloc_failure)
+               if (!getout && !zmalloc_failure) {
+                 SS.rcptstates = 0;
                 smtpstatus = smtpwrite(&SS, 0, "QUIT", -1, NULL);
-               else
+               } else
                 smtpstatus = EX_OK;
               smtpclose(&SS, 0);
               notary_setwtt(NULL);
@@ -793,8 +812,10 @@
         ctlclose((struct ctldesc *)dp);
       } /* while (!getout) ... */

-       if (SS.smtpfp && !getout)
+       if (SS.smtpfp && !getout) {
+         SS.rcptstates = 0;
         smtpstatus = smtpwrite(&SS, 0, "QUIT", -1, NULL);
+       }

       /* Close the channel -- if it is open anymore .. */
       if (SS.smtpfp) {
@@ -838,10 +859,6 @@

         for (rp = rphead = dp->recipients; rp != NULL; rp = rp->next) {

-           /* Set this special flag so that we can retry EX_IOERR and
-              EX_TEMPFAIL status cases more easily.. */
-           rp->notifyflgs |= _DSN__TEMPFAIL_NO_UNLOCK;
-
           if (rp->next == NULL
               || rp->addr->link   != rp->next->addr->link
               || rp->newmsgheader != rp->next->newmsgheader) {
@@ -899,9 +916,6 @@

               for (;rphead && rphead != rp->next; rphead = rphead->next) {
                 if (rphead->lockoffset) {
-                   /* Clear this special flag so that we can now diagnose
-                      them.. */
-                   rphead->notifyflgs &= ~ _DSN__TEMPFAIL_NO_UNLOCK;

                   notaryreport(rphead->addr->user, FAILED, NULL, NULL);
                   diagnostic(rphead, EX_TEMPFAIL,
@@ -915,13 +929,10 @@
               time(&endtime);
               notary_setxdelay((int)(endtime-starttime));
               while (rphead != rp->next) {
-                 /* SMTP open -- meaning (propably) that we got reject
+                 /* SMTP open -- meaning (probably) that we got reject
                    from the remote server */
                 /* NOTARY: address / action / status / diagnostic */
                 if (rphead->lockoffset) {
-                   /* Clear this special flag so that we can now diagnose
-                      them.. */
-                   rphead->notifyflgs &= ~ _DSN__TEMPFAIL_NO_UNLOCK;

                   notaryreport(rp->addr->user,FAILED,
                                "5.0.0 (Target status indeterminable)",
@@ -1021,7 +1032,7 @@
         }

         if (conv_prohibit == 7)
-           force_7bit = 1;
+           SS->ehlo_capabilities &= ~ESMTP_8BITMIME;

         if (force_7bit)       /* Mark off the 8BIT MIME capability.. */
           SS->ehlo_capabilities &= ~ESMTP_8BITMIME;
@@ -1106,7 +1117,6 @@
       }


-       SS->rcptstates = 0;
       mail_from_failed = 0;

    more_recipients:
@@ -1114,6 +1124,7 @@
         startrp = more_rp;
         more_rp = NULL;
       }
+       SS->rcptstates = 0;

       /* We are starting a new pipelined phase */
       smtp_flush(SS); /* Flush in every case */
@@ -1125,9 +1136,6 @@
         size = -1;
       SS->msize = size;

-       SS->prevcmdstate = 99;
-       SS->cmdstate     = SMTPSTATE_MAILFROM;
-
       if (STREQ(startrp->addr->link->channel,"error"))
         sprintf(SMTPbuf, "MAIL From:<>");
       else
@@ -1159,7 +1167,7 @@
       r = smtpwrite(SS, 1, SMTPbuf, pipelining, NULL);
       if (!SS->smtpfp || sffileno(SS->smtpfp) < 0) r = EX_TEMPFAIL; /* ALWAYS! */
       if (r != EX_OK) {
-         /* If we err here, we propably are in SYNC mode... */
+         /* If we err here, we probably are in SYNC mode... */
         /* Uh ??  Many new sendmail's have a pathological error mode:
               MAIL FROM...
               451 cannot preopen /etc/aliases.db
@@ -1192,12 +1200,14 @@

         SS->cmdstate     = SMTPSTATE_RCPTTO; /* 1 + MAILFROM.. */

-         if (SS->smtpfp)
+         if (SS->smtpfp) {
+           SS->rcptstates = 0;
           if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
             if ( ! mail_from_failed ) {
               mail_from_failed = 1;
               goto more_recipients;
             }
+         }

         for (rp = startrp; rp && rp != endrp; rp = rp->next) {
           /* NOTARY: address / action / status / diagnostic */
@@ -1212,12 +1222,8 @@
       mail_from_failed = 0;
       nrcpt = 0;
       rcpt_cnt = 0;
-       SS->rcptstates = 0;
-       for (rp = startrp; rp && rp != endrp; rp = rp->next) {

-         /* Set this special flag so that we can retry EX_IOERR and
-            EX_TEMPFAIL status cases more easily.. */
-         rp->notifyflgs |= _DSN__TEMPFAIL_NO_UNLOCK;
+       for (rp = startrp; rp && rp != endrp; rp = rp->next) {

         if (++rcpt_cnt >= SS->rcpt_limit) {
           more_rp = rp->next;
@@ -1298,9 +1304,11 @@

         SS->cmdstate     = SMTPSTATE_DATA; /* 1 + RCPTTO.. */

-         if (SS->smtpfp)
+         if (SS->smtpfp) {
+           SS->rcptstates = 0;
           if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
-             r = EX_TEMPFAIL;
+             r = EX_TEMPFAIL ;
+         }

         if (r == EX_OK && more_rp)
           /* we have more recipients,
@@ -1364,9 +1372,11 @@
               notaryreport(rp->addr->user,FAILED,NULL,NULL);
               diagnostic(rp, r, 0, "%s", SS->remotemsg);
             }
-           if (SS->smtpfp)
+           if (SS->smtpfp) {
+             SS->rcptstates = 0;
             if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
               r = EX_TEMPFAIL;
+           }
           return r;
         }

@@ -1392,9 +1402,8 @@
               notaryreport(rp->addr->user,FAILED,NULL,NULL);
               diagnostic(rp, r, 0, "%s", SS->remotemsg);
             }
-           if (SS->smtpfp)
-             if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
-               r = EX_TEMPFAIL;
+           smtpclose(SS, 1);
+           r = EX_TEMPFAIL;
           return r;
         }
         time(&endtime);
@@ -1428,6 +1437,7 @@
           if (SS->smtpfp &&
               (SS->rcptstates & RCPTSTATE_400) &&
               (SS->rcptstates & FROMSTATE_OK)) {
+             SS->rcptstates = 0;
             smtpwrite(SS, 0, "QUIT", -1, NULL);
             smtpclose(SS,1);
             if (logfp)
@@ -1439,6 +1449,7 @@
             r = EX_TEMPFAIL;
           }
           if (SS->smtpfp) {
+             SS->rcptstates = 0;
             if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
               r = EX_TEMPFAIL;
           }
@@ -1460,9 +1471,8 @@
               notaryreport(rp->addr->user,FAILED,NULL,NULL);
               diagnostic(rp, r, 0, "%s", SS->remotemsg);
             }
-           if (SS->smtpfp)
-             if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
-               r = EX_TEMPFAIL;
+           smtpclose(SS, 1);
+           r = EX_TEMPFAIL;
           return r;
         }
         timeout = timeout_dot;
@@ -1527,9 +1537,11 @@
           }
         if (SS->verboselog)
           fprintf(SS->verboselog,"Writing headers after DATA failed\n");
-         if (SS->smtpfp)
+         if (SS->smtpfp) {
+           SS->rcptstates = 0;
           if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
             r = EX_TEMPFAIL;
+         }

         if (SS->chunkbuf) free(SS->chunkbuf);

@@ -1590,10 +1602,23 @@

       SS->cmdstate = SMTPSTATE_DATADOT;

-       if (SS->chunking) {
+
+       if (lmtp_mode) SS->rcptstates = 0;
+
+       if (SS->chunking) { /* BDAT mode */
+
         r = bdat_flush(SS, 1);
-       } else {
-         r = smtpwrite(SS, 1, ".", 0, NULL);
+
+       } else { /* Ordinary DATA-dot mode */
+
+         r = smtpwrite(SS, 1, ".", lmtp_mode, NULL);
+
+         /* Special case processing: If we are in LMTP's dot-of-DATA
+            phase, always use  smtp_sync()  to handle our diagnostics. */
+
+         if (lmtp_mode && r == EX_OK)
+           r = smtp_sync(SS, EX_OK, 0); /* BLOCKING! */
+
       }

       timeout = tout;
@@ -1653,8 +1678,7 @@
             rp->notifyflgs &= ~ _DSN_NOTIFY_SUCCESS;
           /* Remote wasn't DSN speaker, and we have NOTIFY=SUCCESS,
              then we say, we "relayed" the message */
-           if (!(SS->ehlo_capabilities & ESMTP_DSN) &&
-               (rp->notifyflgs & _DSN_NOTIFY_SUCCESS))
+           if (rp->notifyflgs & _DSN_NOTIFY_SUCCESS)
             reldel = "relayed";
           notaryreport(rp->addr->user, reldel, NULL, NULL);
           diagnostic(rp, r, 0, "%s", SS->remotemsg);
@@ -1667,6 +1691,7 @@
       if (SS->smtpfp &&
           (SS->rcptstates & RCPTSTATE_400) &&
           (SS->rcptstates & FROMSTATE_OK)) {
+         SS->rcptstates = 0;
         smtpwrite(SS, 0, "QUIT", -1, NULL);
         smtpclose(SS,1);
         fprintf(logfp, "%s#\t(closed SMTP channel - tempfails for RCPTs; 'too many recipients per session' ??  rc=%d)\n", logtag(), rp ? rp->status : -999);
@@ -1675,6 +1700,7 @@
         close_after_data = 1;
       }
       if (SS->smtpfp && close_after_data) {
+         SS->rcptstates = 0;
         smtpwrite(SS, 0, "QUIT", -1, NULL);
         smtpclose(SS,1);
         fprintf(logfp, "%s#\t(closed SMTP channel - ``close_after_data'' mode.", logtag());
@@ -1688,9 +1714,11 @@

       SS->cmdstate = SMTPSTATE_DATADOTRSET;

-       if (r != EX_OK && SS->smtpfp && !getout)
+       if (r != EX_OK && SS->smtpfp && !getout) {
+         SS->rcptstates = 0;
         if (smtpwrite(SS, 0, "RSET", 0, NULL) == EX_OK)
           r = EX_TEMPFAIL;
+       }

       if (SS->chunkbuf) free(SS->chunkbuf);

@@ -1753,7 +1781,7 @@
         while (*s && *s != 'e' && *s != 'E') ++s;
         if (!s) return;
         if (CISTREQN(s,"ESMTP",5)) {
-           SS->esmtp_on_banner = 1;
+           SS->esmtp_on_banner = 1; /* Found it */
           return;
         }
         ++s;
@@ -1776,7 +1804,7 @@

       do {

-         SS->esmtp_on_banner = SS->main_esmtp_on_banner;
+         SS->esmtp_on_banner = SS->main_esmtp_on_banner; /* -1: presume it, 0: test for it */
         SS->ehlo_capabilities = 0;
         SS->ehlo_sizeval = 0;
         SS->rcpt_limit = 100; /* Max number of recipients per message */
@@ -1784,17 +1812,17 @@
         i = smtpconn(SS, host, noMX);
         if (i != EX_OK)
           continue;
-
-         SS->prevcmdstate = 99;
-         SS->cmdstate     = SMTPSTATE_MAILFROM; /* well, reusing this key */

-         if (SS->esmtp_on_banner) {
+         if (lmtp_mode || (SS->esmtp_on_banner > -2 && force_7bit < 2)) {
           /* Either it is not tested, or it is explicitely
              desired to be tested, and was found! */
           if (SS->myhostname)
             sprintf(SMTPbuf, "EHLO %.200s", SS->myhostname);
           else
             sprintf(SMTPbuf, "EHLO %.200s", myhostname);
+
+           if (lmtp_mode) SMTPbuf[0] = 'L';
+
           i = smtp_ehlo(SS, SMTPbuf);

#ifdef HAVE_OPENSSL
@@ -1802,7 +1830,7 @@
           if (logfp)
             fprintf(logfp, "%s#\tEHLO rc=%d demand_TLS_mode=%d tls_available=%d%s\n", logtag(), i, demand_TLS_mode, tls_available, (SS->ehlo_capabilities & ESMTP_STARTTLS) ? " STARTTLS":"");
           if (SS->verboselog)
-             fprintf(SS->verboselog, "%s#\tEHLO rc=%d demand_TLS_mode=%d tls_available=%d%s\n", logtag(), i, demand_TLS_mode, tls_available, (SS->ehlo_capabilities & ESMTP_STARTTLS) ? " STARTTLS":"");
+             fprintf(SS->verboselog, "--> EHLO rc=%d demand_TLS_mode=%d tls_available=%d%s\n", i, demand_TLS_mode, tls_available, (SS->ehlo_capabilities & ESMTP_STARTTLS) ? " STARTTLS":"");

           if ((i == EX_OK) && demand_TLS_mode && tls_available &&
               !(SS->ehlo_capabilities & ESMTP_STARTTLS)) {
@@ -1821,6 +1849,7 @@
           if ((i == EX_OK) && tls_available &&
               (SS->ehlo_capabilities & ESMTP_STARTTLS)) {

+             SS->rcptstates = 0;
             i = smtpwrite(SS, 0, "STARTTLS", 0, NULL);
             if (i == EX_OK) {
               /* Wow, "STARTTLS" command started successfully! */
@@ -1902,9 +1931,10 @@
             /* The system *did* successfully respond to EHLO previously,
                why would it not do so now ??? */
             i = smtp_ehlo(SS, SMTPbuf);
+             /* ... like for connection failing ... */
           }
#endif /* - HAVE_OPENSSL */
-           if (i == EX_TEMPFAIL) {
+           if (i == EX_TEMPFAIL && !lmtp_mode) {
             /* There are systems, which hang up on us, when we
                greet them with an "EHLO".. Do here a normal "HELO".. */
             i = makereconn(SS);
@@ -1912,20 +1942,20 @@
               continue;
             i = EX_TEMPFAIL;
           }
-         }
+         } /* END "EHLO" connection */

-         if (SS->esmtp_on_banner && i == EX_OK ) {
+         if (SS->esmtp_on_banner > -2 && i == EX_OK ) {
           if (SS->verboselog)
             fprintf(SS->verboselog,
                     "  EHLO response flags = 0x%02x, rcptlimit=%d, sizeopt=%ld\n",
                     (int)SS->ehlo_capabilities, (int)SS->rcpt_limit,
                     (long)SS->ehlo_sizeval);
-         } else {
+         } else if (!lmtp_mode) {
           if (SS->myhostname)
             sprintf(SMTPbuf, "HELO %.200s", SS->myhostname);
           else
             sprintf(SMTPbuf, "HELO %.200s", myhostname);
-           i = smtpwrite(SS, 1, SMTPbuf, 0, NULL);
+           i = smtp_ehlo(SS, SMTPbuf);
           if (i != EX_OK && SS->smtpfp) {
             smtpclose(SS, 1);
             if (logfp)
@@ -1937,6 +1967,7 @@
             i = makereconn(SS);
             if (i != EX_OK)
               continue;;
+             SS->rcptstates = 0;
             i = smtpwrite(SS, 1, SMTPbuf, 0, NULL);
             if (i != EX_OK && SS->smtpfp) {
               smtpclose(SS, 1);
@@ -1983,7 +2014,8 @@
           if (SS->mxh[i].ai != NULL)
             freeaddrinfo(SS->mxh[i].ai);
         }
-         memset(SS->mxh, 0, sizeof(SS->mxh));
+         if (SS->verboselog)
+           fprintf(SS->verboselog, "memset(SS->mxh, 0, %d)\n",sizeof(SS->mxh));
       }

#ifdef BIND
@@ -2082,7 +2114,7 @@
         /* HOSTNAME; (non-literal) */

         if (SS->verboselog)
-           fprintf(SS->verboselog,"SMTP: Connecting to host: %.200s firstmx=%d mxcount=?\n",host,SS->firstmx);
+           fprintf(SS->verboselog,"SMTP: Connecting to host: %.200s firstmx=%d mxcount=? noMX=%d\n",host,SS->firstmx, noMX);
         hbuf[0] = '\0';
         errno = 0;

@@ -2106,6 +2138,8 @@
             report(SS,"MX-lookup: %s", host);

           SS->mxcount = 0;
+           memset(SS->mxh, 0, sizeof(SS->mxh));
+
           rc = getmxrr(SS, host, SS->mxh, MAXFORWARDERS, 0);

           if (rc == EX_OK)
@@ -2541,10 +2575,8 @@
             if (SS->esmtp_on_banner > 0)
               SS->esmtp_on_banner = 0;

-             SS->prevcmdstate = 99;
-             SS->cmdstate     = SMTPSTATE_MAILFROM;
-
             /* Wait for the initial "220-" greeting */
+             SS->rcptstates = 0;
             retval = smtpwrite(SS, 1, NULL, 0, NULL);
             if (retval != EX_OK)
               /*
@@ -2553,8 +2585,7 @@
                */
               break;          /* try another host address */
             return EX_OK;
-         case EX_TEMPFAIL:
-             retval = EX_TEMPFAIL;
+         default:
             break;
         }
       } /* end of for-loop */
@@ -2799,6 +2830,19 @@

       errnosave = errno = 0;

+       smtp_flush(SS);
+
+       if (sa->sa_family == AF_INET) {
+         struct sockaddr_in *si = (struct sockaddr_in*) sa;
+         unsigned long  ia = ntohl(si->sin_addr.s_addr);
+         int anet = ia >> 24;
+         if (anet <= 0 || anet >= 224) {
+           close(sk);
+           errno = EADDRNOTAVAIL;
+           return EX_UNAVAILABLE;
+         }
+       }
+
       if (connect(sk, sa, addrsiz) < 0 &&
           (errno == EWOULDBLOCK || errno == EINPROGRESS)) {

@@ -2996,13 +3040,13 @@
       cp    = SS->remotemsg + strlen(SS->remotemsg);
       cpend = SS->remotemsg + sizeof(SS->remotemsg) -1;

-       if (SS->prevcmdstate >= 99) /* magic limit.. */
-         SS->remotemsgs[SS->cmdstate] = cp = SS->remotemsg;
+       if (SS->prevcmdstate >= SMTPSTATE99) /* magic limit.. */
+         SS->remotemsgs[(int)SS->cmdstate] = cp = SS->remotemsg;
       if (SS->cmdstate > SS->prevcmdstate)
-         SS->remotemsgs[SS->cmdstate] = cp;
+         SS->remotemsgs[(int)SS->cmdstate] = cp;

       if (!append)
-         cp = SS->remotemsgs[SS->cmdstate];
+         cp = SS->remotemsgs[(int)SS->cmdstate];

       SS->prevcmdstate = SS->cmdstate;

@@ -3093,6 +3137,11 @@
       }
       SS->pipeindex   = 0;
       SS->pipereplies = 0;
+
+       SS->rcptstates  = 0;
+
+       SS->prevcmdstate = SMTPSTATE99;
+       SS->cmdstate     = SMTPSTATE_MAILFROM;
}


@@ -3110,6 +3159,7 @@
         sprintf(lbuf, "BDAT %d", SS->chunksize);

       r = smtpwrite(SS, 1, lbuf, 1 /* ALWAYS "pipeline" */, NULL);
+
       if (r != EX_OK)
         return r;

@@ -3128,11 +3178,12 @@
         }
       }
       SS->chunksize = 0;
+       sfsync(SS->smtpfp);

       if (SS->smtpfp && !sferror(SS->smtpfp)) {
-         if (lastflg || ! SS->pipelining)
-           r = smtp_sync(SS, r, 0);
-         else
+         if (lastflg || ! SS->pipelining) {
+           r = smtp_sync(SS, r, 0); /* blocking     */
+         } else
           r = smtp_sync(SS, r, 1); /* non-blocking */
       } else {
         r = EX_TEMPFAIL;
@@ -3313,10 +3364,11 @@
       int r, nonblocking;
{
       char *s, *eof, *eol;
-       volatile int idx  = 0, code = 0;
-       volatile int rc   = EX_OK, len;
-       volatile int err  = 0;
-       int          infd;
+       int idx  = 0, nextidx, code = 0;
+       int rc   = EX_OK, len;
+       int err  = 0;
+       int infd;
+       int i, found_any;
       char buf[512];
       char *p;
       char *status = NULL;
@@ -3331,15 +3383,66 @@
         SS->continuation_line = 0;
         SS->first_line = 1;
       }
+
+       if (!nonblocking && SS->smtpfp && sffileno(SS->smtpfp) >= 0)
+         sfsync(SS->smtpfp);                   /* Flush output */
+
+       /*
+          We have TWO exceptions of the rule about "one reply per
+          pipereplies count"; Namely "BDAT nn LAST" MAY yield zero
+          or more replies in LMTP mode, and its sender has *no* clue
+          about when that may happen.  While DATA's "dot" knows how
+          many it needs to pick, things are cleaner when we treat it
+          similarly to "BDAT nn LAST".
+
+          To recognize when this is the case:
+              lmtp_mode && (idx == (SS->pipeindex-1)) &&
+              SS->cmdstate >= SMTPSTATE_DATADOT
+
+          At the begin of the loop we must check if there are any
+          nondiagnosed recipients left.  If none are, we exit the loop.
+
+       */
+
+
+       for (idx = SS->pipereplies; idx < SS->pipeindex; idx = nextidx) {
+
+         struct rcpt *datarp = NULL;
+
+         nextidx = idx+1;
+
+         /* Collect MULTIPLE missing replies IF WE ARE 1) IN LMTP MODE,
+            2) at the last item of commands, 3) we are at the DOT of
+            DATA or at BDAT LAST phase. */

-       for (idx = SS->pipereplies; idx < SS->pipeindex; ++idx) {
+         found_any = 0;
+         if (lmtp_mode && (idx == (SS->pipeindex-1)) &&
+             SS->cmdstate >= SMTPSTATE_DATADOT) {
+
+           for (i = 0; i < idx; ++i) {
+             datarp = SS->pipercpts[i];
+             if (datarp && datarp->lockoffset) {
+               found_any = 1;
+               nextidx = idx;
+               /*
+                  if (SS->verboselog)
+                  fprintf(SS->verboselog,
+                  " lmtp: Data-dot/bdat-last; i=%d datarp=('%s' '%s' '%s')\n",
+                  i, datarp->addr->channel, datarp->addr->host,
+                  datarp->addr->user);
+               */
+               break;
+             }
+           }
+           if (!found_any)
+             break;
+
+         } /* Special LMTP BDAT LAST/DATA mode */
+
      rescan_line_0: /* processed some continuation line */
         s = eol;
      rescan_line:   /* Got additional input */

-         if (!nonblocking && SS->smtpfp && sffileno(SS->smtpfp) >= 0)
-           sfsync(SS->smtpfp);                 /* Flush output */
-
         eof = SS->pipebuf + SS->pipebufsize;
         for (eol = s; eol < eof; ++eol)
           if (*eol == '\n') break;
@@ -3375,6 +3478,7 @@
             if (err < 0) {
               if (logfp)
                 fprintf(logfp,"%s#\tTimeout (%d sec) while waiting responses from remote (errno=%d)\n",logtag(),timeout,en);
+               if (SS->smtpfp)
               if (SS->verboselog)
                 fprintf(SS->verboselog,"Timeout (%d sec) while waiting responses from remote\n",timeout);
               break;
@@ -3388,8 +3492,9 @@
           if (len < 0)
             err = errno;

+#ifdef HAVE_OPENSSL
         have_some_data:
-
+#endif
           if (len < 0) {
             /* Some error ?? How come ?
                We have select() confirmed input! */
@@ -3464,12 +3569,15 @@
         p = eol-1;              /* The '\n' at the end of the line    */
         if (p > s && p[-1] == '\r') --p; /* "\r\n" ?                  */
         *p = 0;
+
+         if (SS->within_ehlo)
+           ehlo_check(SS, s+4);
+         if (!SS->esmtp_on_banner && SS->esmtp_on_banner > -2)
+           esmtp_banner_check(SS, s+4);

-         if (logfp != NULL) {
-           if (debug)
-             putc('\n',logfp);
+         if (logfp != NULL)
           fprintf(logfp, "%sr\t%s\n", logtag(), s);
-         }
+
         if (SS->verboselog)
           fprintf(SS->verboselog,"%s\n",s);

@@ -3490,7 +3598,7 @@

         SS->cmdstate = SS->pipestates[idx];
         if (idx == 0 && SS->first_line)
-           SS->prevcmdstate = 99;
+           SS->prevcmdstate = SMTPSTATE99;

         if (SS->first_line)
           rmsgappend(SS, 0, "\r<<- %s",
@@ -3509,7 +3617,7 @@
         if (SS->continuation_line)
           goto rescan_line_0;
         else
-           SS->pipereplies = idx +1; /* Final line, mark this as processed! */
+           SS->pipereplies = nextidx; /* Final line, mark this as processed! */


         /* If write-fd has closed(shut down), we shall turn all
@@ -3520,13 +3628,25 @@
           code -= 100; /* SOFTEN IT! */

         rc = code_to_status(code, &status);
+
+         notarystatsave(SS,s,status);
+
+         /* if (SS->verboselog)
+            fprintf(SS->verboselog,
+            " lmtp_mode=%d code=%d rc=%d idx=%d datarp=%p pipercpts[idx]=%p pipecmds[idx]='%s'\n",
+            lmtp_mode, code, rc, idx, datarp, SS->pipercpts[idx],
+            SS->pipecmds[idx] ? SS->pipecmds[idx] : "<nil>");
+         */
+
         if (code >= 400) {
           /* Errors */

           /* MAIL From:<*>: ... */
           /* DATA: 354/ 451/554/ 500/501/503/421 */
           /* RCPT To:<*>: 250/251/ 550/551/552/553/450/451/452/455/ 500/501/503/421 */
+
           if (SS->pipercpts[idx] != NULL) {
+
             if (SS->rcptstates & (FROMSTATE_400|FROMSTATE_500)) {
               /* If "MAIL From:<..>" tells non-200 report, and
                  causes "RCPT To:<..>" commands to yield "400/500",
@@ -3544,18 +3664,21 @@
             /* Diagnose the errors, we report successes AFTER the DATA phase.. */
             time(&endtime);
             notary_setxdelay((int)(endtime-starttime));
-             notarystatsave(SS,s,status);
             notaryreport(SS->pipercpts[idx]->addr->user,FAILED,NULL,NULL);

             diagnostic(SS->pipercpts[idx], rc, 0, "%s", SS->remotemsg);

-           } else {
+           } else { /* SS->pipercpts[idx] == NULL
+                       --> MAIL FROM or DATA/BDAT */
+
+             /* No diagnostic() calls for  MAIL FROM:<>, nor for
+                DATA/BDAT phases (except in LMTP mode) */

-             /* No diagnostic()s for  MAIL FROM:<> nor for DATA/BDAT phases */

-             if (idx == 0 && SS->pipecmds[idx] != NULL &&
-                 STREQN(SS->pipecmds[idx],"MAIL", 4)) {
+             if ((idx == 0) && (SS->pipecmds[idx] != NULL) &&
+                 (STREQN(SS->pipecmds[idx],"MAIL", 4))) {
               /* We are working on MAIL From:<...> command here */
+
               if (code >= 500)
                 SS->rcptstates |= FROMSTATE_500;
               else if (code >= 400)
@@ -3563,7 +3686,21 @@
               else
                 SS->rcptstates |= FROMSTATE_OK;
             } else {
+
               /* "DATA" or "BDAT" phase */
+
+               if (lmtp_mode && datarp) {
+                 /* LMTP is different animal..  We do  diagnostic() for all
+                    recipients who have been reported as RCPTSTATE_OK */
+
+                 notary_setxdelay((int)(endtime-starttime));
+                 notaryreport(datarp->addr->user, FAILED, NULL, NULL);
+                 diagnostic(datarp, rc, 0, "%s", SS->remotemsg);
+                 SS->rcptstates |= ((code >= 500) ?
+                                    RCPTSTATE_500 : RCPTSTATE_400);
+
+               } /* LMTP mode */
+
               if (code >= 500) {
                 if (SS->rcptstates & (FROMSTATE_400|FROMSTATE_500)) {
                   /* The FROM failed already, make us 'soft' */
@@ -3583,9 +3720,13 @@
                 SS->rcptstates |= DATASTATE_400;
               }
             }
-           }
-         } else {
+
+           } /* SS->pipercpts[idx] == NULL */
+
+         } else { /* code < 400 */
+
           /* Ok results */
+
           if (SS->pipercpts[idx] != NULL) {
             if (SS->rcptstates & (FROMSTATE_400|FROMSTATE_500)) {
               /* MAIL FROM gave error, we won't believe OK on
@@ -3599,13 +3740,32 @@
               SS->pipercpts[idx]->status = EX_OK;
if (SS->verboselog) fprintf(SS->verboselog,"[Some OK - code=%d, idx=%d, pipeindex=%d]\n",code,idx,SS->pipeindex-1);
             }
-           } else {
-             if (idx > 0)
-               SS->rcptstates |= DATASTATE_OK;
-             /* Should we do same as we do above ?  Don't believe in OK
-                in case MAIL FROM failed ? */
+           } else { /* MAIL FROM or DATA/BDAT */
+
+             if (idx == 0)
+               SS->rcptstates |= FROMSTATE_OK;
+
+             /* DATA/BDAT phase */
+             if (lmtp_mode && datarp) {
+               /* LMTP is different animal..  We do  diagnostic() for all
+                  recipients who have been reported as RCPTSTATE_OK */
+               time(&endtime);
+               notary_setxdelay((int)(endtime-starttime));
+               notaryreport(datarp->addr->user, "delivered", NULL, NULL);
+               diagnostic(datarp, rc, 0, "%s", SS->remotemsg);
+               SS->rcptstates |= RCPTSTATE_OK;
+
+               if (SS->verboselog)
+                 fprintf(SS->verboselog, " LMTP diagnostic() done; rc=%d code=%d datarp->lockoffset=%d%s\n", rc, code, datarp->lockoffset, datarp->lockoffset ? " **NOT ZERO!**":"");
+             } /* LMTP mode */
+
+             if (idx > 0) {
+               if (SS->rcptstates & RCPTSTATE_OK)
+                 SS->rcptstates |= DATASTATE_OK;
+             }
           }
-         }
+         } /* end if 'code' interpretation */
+
         if (! nonblocking) {
           if (SS->pipecmds[idx] != NULL)
             free(SS->pipecmds[idx]);
@@ -3655,10 +3815,12 @@
       }
       if (rc == EX_OK) {
         /* Study the DATA STATES! */
-         if (SS->rcptstates & DATASTATE_400)
-           rc = EX_TEMPFAIL;
-         if (SS->rcptstates & DATASTATE_500)
-           rc = EX_UNAVAILABLE;
+         if (SS->rcptstates & DATASTATE_OK)
+           rc = EX_OK; /* Some ok! */
+         else if (SS->rcptstates & DATASTATE_400)
+           rc = EX_TEMPFAIL; /* Some TEMPFAIL */
+         else if (SS->rcptstates & DATASTATE_500)
+           rc = EX_UNAVAILABLE; /* All hard failures */
       }

       if (rc != EX_OK && logfp)
@@ -3670,12 +3832,13 @@
}

/* */
-void
+int
pipeblockread(SS)
SmtpState *SS;
{
       int infd = SS->smtpfd;
       char buf[512];
+       int rc = EX_OK;

       /* BLOCKALARM; */
       if (SS->block_written && has_readable(infd)) {
@@ -3706,14 +3869,43 @@
         }
         /* Continue the processing... */
       }
-       if (SS->pipebufsize != 0)
-         smtp_sync(SS, EX_OK, 1); /* NON-BLOCKING! */
+       if (SS->pipebufsize)
+         rc = smtp_sync(SS, EX_OK, 1); /* NON-BLOCKING! */
       /* ENABLEALARM; */
+       return rc;
}


-int dflag = 0;
+void
+smtppipestowage(SS, strbuf, syncrp)
+       SmtpState *SS;
+       const char *strbuf;
+       struct rcpt *syncrp;
+{
+       if (SS->pipespace <= SS->pipeindex) {
+         SS->pipespace += 8;
+         if (SS->pipecmds == NULL) {
+           SS->pipecmds  = (char**)malloc(SS->pipespace * sizeof(char*));
+           SS->pipercpts = (struct rcpt **)malloc(SS->pipespace *
+                                                  sizeof(struct rcpt*));
+           SS->pipestates = (int*)malloc(SS->pipespace * sizeof(int));
+         } else {
+           SS->pipecmds  = (char**)realloc((void**)SS->pipecmds,
+                                           SS->pipespace * sizeof(char*));
+           SS->pipercpts = (struct rcpt **)realloc((void**)SS->pipercpts,
+                                                   SS->pipespace *
+                                                   sizeof(struct rcpt*));
+           SS->pipestates  = (int*)realloc((void*)SS->pipestates,
+                                           SS->pipespace * sizeof(int));
+         }
+       }

+       SS->pipecmds  [SS->pipeindex] = strbuf ? strdup(strbuf) : NULL;
+       SS->pipercpts [SS->pipeindex] = syncrp; /* RCPT or NULL */
+       SS->pipestates[SS->pipeindex] = SS->cmdstate;
+       SS->pipeindex += 1;
+}
+
int
smtpwrite(SS, saverpt, strbuf, pipelining, syncrp)
       SmtpState *SS;
@@ -3722,54 +3914,24 @@
       int pipelining;
       struct rcpt *syncrp;
{
-       register char *s;
-       volatile char *cp;
-       int response, infd, rc;
-       volatile int r = 0, i;
-       char *se;
-       char *status = NULL;
-       char buf[2*8192]; /* XX: static buffer - used in several places */
-       char ch;
+       char buf[8192];
+       int r, r2 = EX_OK;
+       volatile int err = 0;

       gotalarm = 0; /* smtp_sfwrite() may set it.. */
-
-       infd = SS->smtpfd;
-
-       if (pipelining > 0) {
-         if (SS->pipespace <= SS->pipeindex) {
-           SS->pipespace += 8;
-           if (SS->pipecmds == NULL) {
-             SS->pipecmds  = (char**)malloc(SS->pipespace * sizeof(char*));
-             SS->pipercpts = (struct rcpt **)malloc(SS->pipespace *
-                                                    sizeof(struct rcpt*));
-             SS->pipestates = (int*)malloc(SS->pipespace * sizeof(int));
-           } else {
-             SS->pipecmds  = (char**)realloc((void**)SS->pipecmds,
-                                             SS->pipespace * sizeof(char*));
-             SS->pipercpts = (struct rcpt **)realloc((void**)SS->pipercpts,
-                                                     SS->pipespace *
-                                                     sizeof(struct rcpt*));
-             SS->pipestates  = (int*)realloc((void*)SS->pipestates,
-                                             SS->pipespace * sizeof(int));
-           }
-         }
-         SS->pipecmds  [SS->pipeindex] = strdup(strbuf);
-         SS->pipercpts [SS->pipeindex] = syncrp; /* RCPT or NULL */
-         SS->pipestates[SS->pipeindex] = SS->cmdstate;
-         SS->pipeindex += 1;

-       } /* ... end of if(pipelining) */
+       smtppipestowage(SS, strbuf, syncrp);

       if (strbuf != NULL) {
         int len = strlen(strbuf) + 2;
-         volatile int err = 0;

         if (pipelining > 0) {
           /* We are asynchronous! */
           SS->smtp_outcount += len; /* Where will we grow to ? */

           /* Read possible responses into response buffer.. */
-           pipeblockread(SS);
+           r2 = pipeblockread(SS);
+           /* FIXME: If we are seeing some errors ??? */

           memcpy(buf,strbuf,len-2);
           memcpy(buf+len-2,"\r\n",2);
@@ -3815,7 +3977,7 @@
             notaryreport(NULL,FAILED,"5.4.2 (timeout on cmd write)",
                          "smtp; 500 (timeout on cmd write)");
           } else {
-             se = strerror(errno);
+             char *se = strerror(errno);
             sprintf(SS->remotemsg, "smtp; 500 (write to server error: %s)", se);
             time(&endtime);
             notary_setxdelay((int)(endtime-starttime));
@@ -3845,12 +4007,8 @@
           return EX_TEMPFAIL;
#endif
         }
-         if (logfp != NULL) {
-           if (dflag) abort();
+         if (logfp)
           fprintf(logfp, "%sw\t%s\n", logtag(), strbuf);
-           if (!pipelining)
-             dflag = 1;
-         }
       }

       if (SS->smtpfp && sffileno(SS->smtpfp) >= 0) {
@@ -3868,230 +4026,19 @@
           strcpy(SS->remotemsg,
                  "\rWrite Failure; expecting initial greeting??");
       }
-
-       if (debug) {
-         fprintf(logfp, "%s#\tAttempting to read reply\n",logtag());
-       }
-
-       if (statusreport && strbuf != NULL) {
-         report(SS,"%s", strbuf);
-       }
-
-       if (pipelining != 0) {
-         /* With "QUIT" this is negative value, and we are not
-            in reality interested of the return value... */
-
-         /* Read possible reponses into response buffer.. */
-         pipeblockread(SS);
-
-         return EX_OK;
-       }
-
-       i = 2;  /* state variable, beginning of new line */
-       cp = buf;
-
-       do {
-
-         fd_set rdset;
-         struct timeval tv;
-
-       do_reread:
-
-         tv.tv_sec = timeout;
-         tv.tv_usec = 0;
-
-         if (sffileno(SS->smtpfp) < 0  &&  timeout > 300) {
-           /* Earlier write failure has bitten us, and we
-              arrived into DOT-WAIT, or some such.. */
-           /* Cut this wait down to 5 minutes */
-           tv.tv_sec = 300;
-         }
-
-         _Z_FD_ZERO(rdset);
-         _Z_FD_SET(infd,rdset);
-
-         gotalarm = 0;
-
-         r = select(infd+1, &rdset, NULL, NULL, &tv);
-         if (r < 0 && errno == EINTR) goto do_reread;
-         if (r > 0) {
-           r = smtp_nbread(SS, (char*)cp, sizeof(buf) - (cp - buf));
-           if (r < 0 && errno == EINTR) goto do_reread;
-         } else { /* == 0 */
-           if (r == 0)
-             gotalarm = 1;
-           r = -1;
-         }
-         if (r > 0) {
-           if (SS->verboselog)
-             fwrite((char*)cp,r,1,SS->verboselog);
-           s = (char*)cp;
-           cp += r;
-           for ( ; s < cp; ++s ) {
-             switch (i) {
-               /* i == 0 means we're on last line */
-             case 1:           /* looking for \n */
-               if (*s != '\n')
-                 break;
-               *s = '\0';
-
-               rmsgappend(SS, 1, "\r->> %s", buf);
-
-               if (SS->within_ehlo)
-                 ehlo_check(SS,&buf[4]);
-               if (!strbuf && !SS->esmtp_on_banner)
-                 esmtp_banner_check(SS,&buf[4]);
-               if (logfp != NULL) {
-                 if (debug)
-                   putc('\n',logfp);
-                 fprintf(logfp, "%sr\t%s\n", logtag(), buf);
-               }
-
-               if (s + 1 < cp) /* Compress the buffer */
-                 memcpy(buf, s+1, cp-s-1);
-               cp = buf + (cp-s-1);
-               s = buf;
-               --s;            /* incremented in for() stmt */
-               /* fall through */
-             case 2:           /* saw \n, 1st char on line */
-             case 3:           /* 2nd char on line */
-             case 4:           /* 3rd char on line */
-               if ((i == 1) || ('0' <= *s && *s <= '9'))
-                 ++i;
-               else
-                 /* silently look for num. code lines */
-                 i = 1;
-               break;
-             case 5:           /* 4th char on line */
-               i = (*s == '-');
-               break;
-             }
-           }
-         } else if (r == -1) {
-           if (gotalarm) {
-             time(&endtime);
-             notary_setxdelay((int)(endtime-starttime));
-             if (SS->smtpfp && sffileno(SS->smtpfp) < 0) {
-               sprintf(SS->remotemsg,
-                       "smtp; 466 (Timeout on SMTP write, and response read)");
-               notaryreport(NULL,FAILED,
-                            "5.4.2 (smtp transaction write+read timeout)",
-                            SS->remotemsg);
-             } else {
-               if (strbuf == NULL)
-                 sprintf(SS->remotemsg,
-                         "smtp; 466 (Timeout on initial SMTP response read)");
-               else
-                 sprintf(SS->remotemsg,
-                         "smtp; 466 (Timeout on SMTP response read, Cmd: %s)",
-                         strbuf);
-               notaryreport(NULL,FAILED,
-                            "5.4.2 (smtp transaction read timeout)",
-                            SS->remotemsg);
-             }
-           } else {
-             se = strerror(errno);
-             if (strbuf == NULL)
-               sprintf(SS->remotemsg,
-                       "smtp; 500 (Error on initial SMTP response read: %s)",se);

-             else
-               sprintf(SS->remotemsg,
-                       "smtp; 500 (Error on SMTP response read: %s, Cmd: %s)",
-                       se, strbuf);
-             time(&endtime);
-             notary_setxdelay((int)(endtime-starttime));
-             notaryreport(NULL,FAILED,"5.4.2 (smtp transaction read timeout)",SS->remotemsg);
-           }
+       /* ------------------------------------------------ */
+       /* _________  Now begins reply collection _________ */

-           dflag = 0;
-           if (SS->verboselog)
-             fprintf(SS->verboselog,"%s\n",SS->remotemsg);
-           smtpclose(SS, 1);
-           if (logfp)
-             fprintf(logfp, "%s#\t(closed SMTP channel - bad response on smtpwrite() )\n", logtag());
-           return EX_TEMPFAIL;
-         } else {
-           /* read() returned 0 .. usually meaning EOF .. */
-           sprintf(SS->remotemsg, "smtp; 500 (Server hung up on us! Cmd: %s)",
-                   strbuf == NULL ? "(null cmd)" : strbuf);
-           time(&endtime);
-           notary_setxdelay((int)(endtime-starttime));
-           notaryreport(NULL,FAILED,"5.4.2 (server hung-up on us)",SS->remotemsg);
-           dflag = 0;
-           if (SS->verboselog)
-             fprintf(SS->verboselog,"%s\n",SS->remotemsg);
-           smtpclose(SS, 1);
-           if (logfp)
-             fprintf(logfp, "%s#\t(closed SMTP channel - hangup on smtpwrite() )\n", logtag());
-           return EX_TEMPFAIL;
-         }
-         /* Exit if the last thing we read was a LF and we're on the
-            last line (in case of multiline response).  This
-            also takes care of the required CRLF termination */
-       } while (cp < buf+sizeof buf && !(i == 0 && *(cp-1) == '\n'));
+       if (pipelining) {
+         /* With "QUIT" this is negative value, and we are
+            not in reality interested of the return value... */

-       if (cp >= (buf+sizeof buf)) {
-         strcpy(SS->remotemsg,"smtp; 500 (SMTP Response overran input buffer!)");
-         time(&endtime);
-         notary_setxdelay((int)(endtime-starttime));
-         notaryreport(NULL,"X-BUG","5.5.0 (SMTP-response overran input buffer!)",SS->remotemsg);
-         dflag = 0;
-         if (SS->verboselog)
-           fprintf(SS->verboselog,"%s\n",SS->remotemsg);
-         smtpclose(SS, 1);
-         if (logfp)
-           fprintf(logfp, "%s#\t(closed SMTP channel - response overrun on smtpwrite() )\n", logtag());
-         return EX_TEMPFAIL;
+         /* Read possible responses into response buffer.. */
+         return pipeblockread(SS);
       }
-       *--cp = '\0';   /* kill the LF */
-       if ((cp - buf) < 3) {
-         /* A '354<CRLR>' could be treated as ok... */
-         sprintf(SS->remotemsg, "smtp; 500 (SMTP response '%s' unexpected!)", buf);
-         time(&endtime);
-         notary_setxdelay((int)(endtime-starttime));
-         notaryreport(NULL,"X-BUG","5.5.0 (SMTP response unexpected)",SS->remotemsg);
-         dflag = 0;
-         if (SS->verboselog)
-           fprintf(SS->verboselog,"%s\n",SS->remotemsg);
-         smtpclose(SS, 1);
-         if (logfp)
-           fprintf(logfp, "%s#\t(closed SMTP channel - unexpected response on smtpwrite() )\n", logtag());
-         return EX_TEMPFAIL;
-       }
-       --cp;
-       /* trim trailing whitespace */
-       while (isascii((*cp)&0xFF) && isspace((*cp)&0xFF))
-         --cp;
-       *++cp = '\0';
-       for (i = 0; i < 4; ++i)         /* can't happen, right? wrong... */
-         if (buf[i] == ' ' || buf[i] == '\r' || buf[i] == '\n')
-           break;
-       if (i == 4) --i;
-       ch = buf[i];
-       buf[i] = '\0';
-       response = atoi(buf);
-       if (logfp != NULL)
-         fprintf(logfp, "%sr\t%s%c%s\n", logtag(), buf, ch, &buf[i+1]);
-       buf[i] = ch;
-
-       if (SS->within_ehlo)
-         ehlo_check(SS,&buf[4]);
-       if (!strbuf && !SS->esmtp_on_banner)
-         esmtp_banner_check(SS,&buf[4]);
-
-       rmsgappend(SS, 1, "\r->> %s", buf);
-
-       dflag = 0;
-
-       if (response >= 400)
-         notaryreport(NULL,FAILED,NULL,NULL);

-       rc = code_to_status(response, &status);
-
-       if (saverpt)
-         notarystatsave(SS,buf,status);
-       return rc;
+       return smtp_sync(SS, EX_OK, pipelining);
}


@@ -4101,8 +4048,9 @@
       const char *strbuf;
{
       int rc;
-       SS->within_ehlo = 1;
+       SS->within_ehlo = (SS->esmtp_on_banner > -2);
       SS->ehlo_capabilities = 0;
+       SS->rcptstates = 0;
       rc = smtpwrite(SS, 1, strbuf, 0, NULL);
       SS->within_ehlo = 0;
       return rc;
@@ -4190,6 +4138,7 @@
       if (SS->remotehost[0] == '\0')
         return 0;

+       memset(SS->mxh, 0, sizeof(SS->mxh));
       SS->mxh[0].host = NULL;
       SS->mxcount = 0;
       SS->firstmx = 0;
Index: transports/smtp/smtp.h
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/smtp/smtp.h,v
retrieving revision 1.19
retrieving revision 1.21
diff -u -r1.19 -r1.21
--- transports/smtp/smtp.h      2000/07/31 00:00:52     1.19
+++ transports/smtp/smtp.h      2000/10/12 20:00:49     1.21
@@ -312,6 +312,16 @@
  void *SS;            /* Ptr to SS context                    */
};

+
+typedef enum {
+  SMTPSTATE_MAILFROM = 0,
+  SMTPSTATE_RCPTTO   = 1,
+  SMTPSTATE_DATA     = 2,
+  SMTPSTATE_DATADOT  = 3,
+  SMTPSTATE_DATADOTRSET = 4,
+  SMTPSTATE99        = 99
+} SMTPSTATES;
+
typedef struct {
  int  ehlo_capabilities;      /* Capabilities of the remote system */
  int  esmtp_on_banner;
@@ -361,15 +371,17 @@

  int rcptcnt;                 /* PIPELINING variables */
  int rcptstates;
+
#define RCPTSTATE_OK   0x001  /* At least one OK   state   */
-#define RCPTSTATE_400  0x002  /* At least one TEMP failure */
-#define RCPTSTATE_500  0x004  /* At least one PERM failure */
-#define FROMSTATE_OK   0x008  /* MAIL FROM --> 2XX code */
-#define FROMSTATE_400  0x010  /* MAIL FROM --> 4XX code */
-#define FROMSTATE_500  0x020  /* MAIL FROM --> 5XX code */
-#define DATASTATE_OK   0x040  /* DATA/BDAT --> 2/3XX code */
-#define DATASTATE_400  0x080  /* DATA/BDAT --> 4XX code */
-#define DATASTATE_500  0x100  /* DATA/BDAT --> 5XX code */
+#define FROMSTATE_OK   0x002  /* MAIL FROM --> 2XX code */
+#define DATASTATE_OK   0x004  /* DATA/BDAT --> 2/3XX code */
+#define RCPTSTATE_400  0x010  /* At least one TEMP failure */
+#define FROMSTATE_400  0x020  /* MAIL FROM --> 4XX code */
+#define DATASTATE_400  0x040  /* DATA/BDAT --> 4XX code */
+#define RCPTSTATE_500  0x100  /* At least one PERM failure */
+#define FROMSTATE_500  0x200  /* MAIL FROM --> 5XX code */
+#define DATASTATE_500  0x400  /* DATA/BDAT --> 5XX code */
+
  int state;
  int alarmcnt;
  int column;
@@ -382,12 +394,7 @@
  char remotemsg[2*ZBUFSIZ];
  char *remotemsgs[5];

-  int  cmdstate, prevcmdstate;
-#define SMTPSTATE_MAILFROM 0
-#define SMTPSTATE_RCPTTO   1
-#define SMTPSTATE_DATA     2
-#define SMTPSTATE_DATADOT  3
-#define SMTPSTATE_DATADOTRSET 4
+  SMTPSTATES cmdstate, prevcmdstate;

  char remotehost[MAXHOSTNAMELEN+1];
  char ipaddress[200];
@@ -451,6 +458,7 @@
extern void smtp_flush __((SmtpState *SS));
extern int  smtp_sync  __((SmtpState *SS, int, int));
extern int  smtpwrite  __((SmtpState *SS, int saverpt, const char *buf, int pipelining, struct rcpt *syncrp));
+extern void smtppipestowage  __((SmtpState *SS, const char *buf, struct rcpt *syncrp));
extern int  process    __((SmtpState *SS, struct ctldesc*, int, const char*, int));

extern int  check_7bit_cleanness __((struct ctldesc *dp));
@@ -476,7 +484,7 @@
extern int  has_readable __((int));
extern int  bdat_flush __((SmtpState *SS, int lastflg));
extern void smtpclose __((SmtpState *SS, int failure));
-extern void pipeblockread __((SmtpState *SS));
+extern int  pipeblockread __((SmtpState *SS));
extern ssize_t smtp_sfwrite __((Sfio_t *, const void *, size_t, Sfdisc_t *));
extern int  zsfsetfd     __((Sfio_t *, int));
extern int  smtp_nbread  __((SmtpState *, void *, int));
Index: transports/smtp/smtptls.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/transports/smtp/smtptls.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- transports/smtp/smtptls.c   2000/08/22 12:48:29     1.28
+++ transports/smtp/smtptls.c   2000/10/16 11:32:39     1.29
@@ -603,20 +603,21 @@
    if (s) *s = 0;
    s = (void*) buf;

-#define SKIPWHILE(X,Y)  while (*Y != '\0' && isascii(*Y) && X(*Y)) { ++Y; }
+#define SKIPSPACE(Y) while (*Y == ' ' || *Y == '\t' || *Y == '\n') ++Y
+#define SKIPTEXT(Y ) while (*Y && !(*Y == ' ' || *Y == '\t' || *Y == '\n')) ++Y

-    SKIPWHILE(isspace, s);
+    SKIPSPACE(s);
    if (!*s || *s == '#' || *s == ';')
      continue; /* First non-whitespace char is comment start (or EOL) */

-    SKIPWHILE( isspace, s);
+    SKIPSPACE(s);
    n = s;
-    SKIPWHILE(!isspace, s);
+    SKIPTEXT(s);
    if (*s) *s++ = 0;

-    SKIPWHILE( isspace, s);
+    SKIPSPACE(s);
    a1 = s;
-    SKIPWHILE(!isspace, s);
+    SKIPTEXT(s);
    if (*s) *s++ = 0;


Index: utils/policy-builder.sh.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/policy-builder.sh.in,v
retrieving revision 1.20
retrieving revision 1.22
diff -u -r1.20 -r1.22
--- utils/policy-builder.sh.in  2000/01/17 14:09:17     1.20
+++ utils/policy-builder.sh.in  2000/10/31 17:49:50     1.22
@@ -4,11 +4,13 @@
#
# This merges following files from $MAILVAR/db/ directory:
#      smtp-policy.src
-#      localnames              ('= _localnames')
-#      smtp-policy.relay       ('= _full_rights')
-#      smtp-policy.mx          ('= _relaytarget')
-#      smtp-policy.spam        ('= _bulk_mail')
-#      smtp-policy.spam.manual ('= _bulk_mail')
+#      localnames               ('= _localnames')
+#      smtp-policy.relay.manual ('= _full_rights')
+#      smtp-policy.relay        ('= _full_rights')
+#      smtp-policy.mx.manual    ('= _relaytarget')
+#      smtp-policy.mx           ('= _relaytarget')
+#      smtp-policy.spam         ('= _bulk_mail')
+#      smtp-policy.spam.manual  ('= _bulk_mail')
#
# These all together are used to produce files:  smtp-policy.$DBEXT
# The produced database retains the first instance of any given key.
@@ -115,21 +117,36 @@
  # (well, actually it could also list e.g.: ".our.domain" if it would
  #  be fine to allow relaying from anybody whose IP address reverses to
  #  domain suffix ".our.domain")
+  if [ -f smtp-policy.relay.manual ] ; then
+    echo "# -------------------------"
+    echo "# smtp-policy.relay.manual:"
+    cat smtp-policy.relay.manual | \
+    awk '/^#/{next;}
+       {printf "%s = _full_rights\n",$0;next;}'
+  fi
  if [ -f smtp-policy.relay ] ; then
    echo "# ------------------"
    echo "# smtp-policy.relay:"
    cat smtp-policy.relay | \
    awk '/^#/{next;}
-       {printf "%s  %s %s %s %s %s %s %s %s = _full_rights\n",$1,$2,$3,$4,$5,$6,$7,$8,$9;next;}'
+       {printf "%s = _full_rights\n",$0;next;}'
  fi

+  # smtp-policy.mx.manual
+  # (Lists domains that are allowed to use us as inbound MX relay for them)
+  if [ -f smtp-policy.mx.manual ] ; then
+    echo "# ----------------------"
+    echo "# smtp-policy.mx.manual:"
+    cat smtp-policy.mx.manual | \
+    awk '/^#/{next;} NF >= 1 {printf "%s = _relaytarget\n",$0;}'
+  fi
  # smtp-policy.mx
  # (Lists domains that are allowed to use us as inbound MX relay for them)
  if [ -f smtp-policy.mx ] ; then
    echo "# ---------------"
    echo "# smtp-policy.mx:"
    cat smtp-policy.mx | \
-    awk '/^#/{next;} NF >= 1 {printf "%s = _relaytarget\n",$1;}'
+    awk '/^#/{next;} NF >= 1 {printf "%s = _relaytarget\n",$0;}'
  fi

  # smtp-policy.spam
@@ -146,11 +163,11 @@
       cat smtp-policy.spam.manual
      fi ) | tr "[A-Z]" "[a-z]" | sed 's/^@//g' | sort | uniq | \
    awk '/^\[/{ # an address block to reject
-           printf "%s  %s %s %s %s %s %s %s %s rejectnet +\n",$1,$2,$3,$4,$5,$6,$7,$8,$9;
+           printf "%s  rejectnet +\n",$0;
           next;
       }
       NF > 0 { # All other cases are usernames with their domains
-           printf "%s  %s %s %s %s %s %s %s %s = _bulk_mail\n",$1,$2,$3,$4,$5,$6,$7,$8,$9;
+           printf "%s  = _bulk_mail\n",$0;
       }'
  fi

Index: utils/rotate-logs.sh.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/rotate-logs.sh.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- utils/rotate-logs.sh.in     2000/05/24 01:19:14     1.2
+++ utils/rotate-logs.sh.in     2000/09/26 21:37:35     1.3
@@ -12,7 +12,7 @@

cd $LOGDIR

-FILES="router scheduler smtpserver smtp"
+FILES="router scheduler smtpserver smtp mailbox"

for x in $FILES
do
Index: utils/smtpserver-log-parser.pl.in
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/smtpserver-log-parser.pl.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- utils/smtpserver-log-parser.pl.in   1999/12/30 15:36:50     1.1
+++ utils/smtpserver-log-parser.pl.in   2000/10/10 21:00:58     1.2
@@ -21,7 +21,7 @@

#
#  You wonder why this utility was written ?
-#  Well, "technical monitoring with tail -f" is something which propably
+#  Well, "technical monitoring with tail -f" is something which probably
#  is not allowed for people in Telecom Carrier business in Finland, thus
#  we have to have a way to select only cases containing *errors* (or other
#  interesting things), while basic flow goes by unseen...
Index: utils/makedb/dblook.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/makedb/dblook.c,v
retrieving revision 1.10
retrieving revision 1.16
diff -u -r1.10 -r1.16
--- utils/makedb/dblook.c       2000/09/07 10:03:47     1.10
+++ utils/makedb/dblook.c       2000/10/17 14:18:42     1.16
@@ -48,7 +48,7 @@
const char *av0, *err;
int errn;
{
-  fprintf(stderr,"Usage: %s [-dump] dbtype database.name [key]\n",av0);
+  fprintf(stderr,"Usage: %s [-dump|-policydump] dbtype database.name [key]\n",av0);
  fprintf(stderr,"  Dbtypes are:");
#ifdef HAVE_NDBM_H
  fprintf(stderr," ndbm");
@@ -85,23 +85,93 @@
}


-void dumpit(fp, keyptr, keylen, datptr, datlen)
+#define _POLICYTEST_INTERNAL_
+#include "policy.h"
+
+
+/* KK() and KA() macroes are at "policy.h" */
+
+static char *showkey __((const char *key));
+static char *showkey(key)
+const char *key;
+{
+    static char buf[256];
+
+    if (key[1] != P_K_IPv4 && key[1] != P_K_IPv6) {
+       if (strlen(key+2) > (sizeof(buf) - 20))
+           sprintf(buf,"%s", "<too long name>");
+       else
+           sprintf(buf,"%s", key+2);
+    } else
+      if (key[1] == P_K_IPv4)
+       sprintf(buf,"[%u.%u.%u.%u]/%d",
+               key[2] & 0xff, key[3] & 0xff, key[4] & 0xff, key[5] & 0xff,
+               key[6] & 0xff);
+      else
+       sprintf(buf,"[ipv6.%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]/%d",
+               key[2] & 0xff, key[3] & 0xff, key[4] & 0xff, key[5] & 0xff,
+               key[6] & 0xff, key[7] & 0xff, key[8] & 0xff, key[9] & 0xff,
+               key[10] & 0xff, key[11] & 0xff, key[12] & 0xff, key[13] & 0xff,
+               key[14] & 0xff, key[15] & 0xff, key[16] & 0xff, key[17] & 0xff,
+               key[18] & 0xff);
+    return buf;
+}
+
+
+
+static char *showattr __((const char *key));
+static char *showattr(key)
+const char *key;
+{
+    static char buf[500];
+    char *name = KA(key[1]);
+    if (key[1] == P_A_ALIAS) name = "=";
+    sprintf(buf, "%s",  name);
+    return buf;
+}
+
+static void showpolicydata(fp, dp, len)
+     FILE *fp;
+     unsigned char *dp;
+     int len;
+{
+  fprintf(fp, " %s \"%s\"", showattr(dp), dp+2);
+}
+
+
+void dumpit(fp, flag, keyptr, keylen, datptr, datlen)
     FILE *fp;
+     int flag;
     void *keyptr, *datptr;
     int keylen, datlen;
{
-  if (((char*)keyptr)[imax(0, keylen - 1)] == 0)
-    fwrite(keyptr, 1, imax(0, keylen - 1), fp);
-  else
-    fwrite(keyptr, 1, keylen, fp);
-  if (datptr != NULL) {
-    putc('\t',fp);
-    if (((char*)datptr)[imax(0, datlen - 1)] == 0)
-      fwrite(datptr, 1, imax(0, datlen - 1), fp);
+  if (flag == 1) {
+    if (((char*)keyptr)[imax(0, keylen - 1)] == 0)
+      fwrite(keyptr, 1, imax(0, keylen - 1), fp);
    else
-      fwrite(datptr, 1, datlen, fp);
+      fwrite(keyptr, 1, keylen, fp);
+    if (datptr != NULL) {
+      putc('\t',fp);
+      if (((char*)datptr)[imax(0, datlen - 1)] == 0)
+       fwrite(datptr, 1, imax(0, datlen - 1), fp);
+      else
+       fwrite(datptr, 1, datlen, fp);
+    }
+    putc('\n',fp);
+  } else {
+    unsigned char *dp = datptr;
+
+    fprintf(fp, "%s\t", showkey(keyptr));
+
+    while (datlen > 0) {
+      int len = *dp;
+      if (len > datlen) len = datlen;
+      showpolicydata(fp, dp, len);
+      datlen -= len;
+      dp += len;
+    }
+    putc('\n',fp);
  }
-  putc('\n',fp);
}

int
@@ -119,6 +189,10 @@
    dumpflag = 1;
    ++argv;
  }
+  if (strcmp(argv[1],"-policydump") == 0) {
+    dumpflag = 2;
+    ++argv;
+  }

  dbasename = argv[2];
#ifdef HAVE_NDBM_H
@@ -137,7 +211,7 @@
      key = dbm_firstkey(Ndbmfile);
      while (key.dptr != NULL) {
       result = dbm_fetch(Ndbmfile, key);
-       dumpit(stdout, key.dptr, key.dsize, result.dptr, result.dsize);
+       dumpit(stdout, dumpflag, key.dptr, key.dsize, result.dptr, result.dsize);
       key = dbm_nextkey(Ndbmfile);
      }
    } else {
@@ -166,7 +240,7 @@
    gdbmfile = gdbm_open(dbasename, 0, GDBM_READER, 0644, NULL);

    if (!gdbmfile) {
-      fprintf(stderr,"Failed to open '%s' GDBM-dbase\n",dbasename);
+      fprintf(stderr,"Failed to open '%s' GDBM-dbase (do remember to add file suffix!)\n",dbasename);
      return 1;
    }

@@ -174,7 +248,7 @@
      key = gdbm_firstkey(gdbmfile);
      while (key.dptr != NULL) {
       result = gdbm_fetch(gdbmfile, key);
-       dumpit(stdout, key.dptr, key.dsize, result.dptr, result.dsize);
+       dumpit(stdout, dumpflag, key.dptr, key.dsize, result.dptr, result.dsize);
       if (result.dptr) free(result.dptr);
       nextkey = gdbm_nextkey(gdbmfile, key);
       free(key.dptr);
@@ -210,7 +284,7 @@
    db_open(dbasename, DB_BTREE, DB_RDONLY, 0644, NULL, NULL, &dbfile);

    if (!dbfile) {
-      fprintf(stderr,"Failed to open '%s' BTREE-dbase\n",dbasename);
+      fprintf(stderr,"Failed to open '%s' BTREE-dbase (try with whole filename?)\n",dbasename);
      return 1;
    }

@@ -226,7 +300,7 @@
      rc = (curs->c_get)(curs, &key, &result, DB_FIRST);
      if (rc) fprintf(stderr,"cursor errno=%d (%s)\n",rc, strerror(rc));
      while ( rc == 0 ) {
-       dumpit(stdout, key.data, key.size, result.data, result.size);
+       dumpit(stdout, dumpflag, key.data, key.size, result.data, result.size);
       rc = (curs->c_get)(curs, &key, &result, DB_NEXT);
      }
      (curs->c_close)(curs);
@@ -260,7 +334,7 @@
    db_open(dbasename, DB_HASH, DB_RDONLY, 0644, NULL, NULL, &dbfile);

    if (!dbfile) {
-      fprintf(stderr,"Failed to open '%s' BHASH-dbase\n",dbasename);
+      fprintf(stderr,"Failed to open '%s' BHASH-dbase (try with whole filename)\n",dbasename);
      return 1;
    }

@@ -275,7 +349,7 @@
      memset(&result, 0, sizeof(key));
      rc = (curs->c_get)(curs, &key, &result, DB_FIRST);
      while ( rc == 0 ) {
-       dumpit(stdout, key.data, key.size, result.data, result.size);
+       dumpit(stdout, dumpflag, key.data, key.size, result.data, result.size);
       rc = (curs->c_get)(curs, &key, &result, DB_NEXT);
      }
      (curs->c_close)(curs);
@@ -308,7 +382,7 @@
    dbfile = dbopen(dbasename, O_RDONLY, 0644, DB_BTREE, NULL);

    if (!dbfile) {
-      fprintf(stderr,"Failed to open '%s' BTREE-dbase\n",dbasename);
+      fprintf(stderr,"Failed to open '%s' BTREE-dbase (use whole filenames?)\n",dbasename);
      return 1;
    }

@@ -317,7 +391,7 @@
      memset(&result, 0, sizeof(key));
      rc = (dbfile->seq)(dbfile, &key, &result, R_FIRST);
      while ( rc == 0 ) {
-       dumpit(stdout, key.data, key.size, result.data, result.size);
+       dumpit(stdout, dumpflag, key.data, key.size, result.data, result.size);
       rc = (dbfile->seq)(dbfile, &key, &result, R_NEXT);
      }
    } else {
@@ -347,7 +421,7 @@
    dbfile = dbopen(dbasename, O_RDONLY, 0644, DB_HASH, NULL);

    if (!dbfile) {
-      fprintf(stderr,"Failed to open '%s' BHASH-dbase\n",dbasename);
+      fprintf(stderr,"Failed to open '%s' BHASH-dbase (use whole filenames?)\n",dbasename);
      return 1;
    }

@@ -356,7 +430,7 @@
      memset(&result, 0, sizeof(key));
      rc = (dbfile->seq)(dbfile, &key, &result, R_FIRST);
      while ( rc == 0 ) {
-       dumpit(stdout, key.data, key.size, result.data, result.size);
+       dumpit(stdout, dumpflag, key.data, key.size, result.data, result.size);
       rc = (dbfile->seq)(dbfile, &key, &result, R_NEXT);
      }
    } else {
Index: utils/mxverify/gai_strerror.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/mxverify/gai_strerror.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- utils/mxverify/gai_strerror.c       2000/01/24 11:23:31     1.1
+++ utils/mxverify/gai_strerror.c       2000/10/19 20:35:58     1.2
@@ -1,14 +1,11 @@
/*
       Libc fill-in for ZMailer using IPv6 API
-       by Matti Aarnio <[email protected]> 1997, 2000
+       by Matti Aarnio <[email protected]> 1997

       The original Craig Metz code is deeply Linux specific,
       this adaptation tries to be way more generic..
*/

-#include "config.h"
-#ifndef HAVE_GAI_STRERROR
-
#include <stdio.h>
#include <sys/types.h>
#include <netdb.h>
@@ -29,7 +26,7 @@

*/

-const char *gai_strerror(errnum)
+char *gai_strerror(errnum)
int errnum;
{
  static char buffer[24];
@@ -63,5 +60,3 @@
      return buffer;
  }
}
-
-#endif
Index: utils/mxverify/getaddrinfo.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/mxverify/getaddrinfo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- utils/mxverify/getaddrinfo.c        2000/08/30 09:29:23     1.2
+++ utils/mxverify/getaddrinfo.c        2000/10/19 20:35:58     1.3
@@ -172,6 +172,7 @@
  int (*gaih)__((const char *name, const struct gaih_service *service,
                const struct addrinfo *req, struct addrinfo **pai,
                FILE *));
+  char *famname;
};

static struct addrinfo default_hints =
@@ -236,7 +237,7 @@
  (*pai)->ai_socktype = req->ai_socktype ? req->ai_socktype : SOCK_STREAM;
  (*pai)->ai_protocol = req->ai_protocol;
  (*pai)->ai_addrlen = sizeof (struct sockaddr_un);
-  (*pai)->ai_addr = (void *) (*pai) + sizeof (struct addrinfo);
+  (*pai)->ai_addr = (void*)((char *) (*pai) + sizeof (struct addrinfo));

#if HAVE_SA_LEN
  ((struct sockaddr_un *) (*pai)->ai_addr)->sun_len =
@@ -754,7 +755,7 @@
       (*pai)->ai_socktype = st2->socktype;
       (*pai)->ai_protocol = st2->protocol;
       (*pai)->ai_addrlen  = socklen;
-       (*pai)->ai_addr = (void *) (*pai) + sizeof(struct addrinfo);
+       (*pai)->ai_addr = (void *)((char*) (*pai) + sizeof(struct addrinfo));
#if HAVE_SA_LEN
       (*pai)->ai_addr->sa_len = socklen;
#endif /* SALEN */
@@ -780,8 +781,8 @@
         }

       if (c) {
-         (*pai)->ai_canonname = ((void *) (*pai) +
-                                 sizeof (struct addrinfo) + socklen);
+         (*pai)->ai_canonname = (void *)((char *) (*pai) +
+                                         sizeof (struct addrinfo) + socklen);
         strcpy ((*pai)->ai_canonname, c);

       } else
@@ -804,10 +805,10 @@

static struct gaih gaih[] = {
#if defined(INET6) && defined(AF_INET6)
-  { PF_INET6, gaih_inet },
+  { PF_INET6, gaih_inet, "INET6" },
#endif
-  { PF_INET,  gaih_inet  },
-  { PF_LOCAL, gaih_local },
+  { PF_INET,  gaih_inet, "INET"  },
+  { PF_LOCAL, gaih_local, "LOCAL" },
  { PF_UNSPEC, NULL }
};

@@ -876,7 +877,7 @@
       pg = g;
       i = g->gaih (name, pservice, hints, end, vlog);
       if (vlog)
-         fprintf(vlog," g->gaih[%d]('%s',...) rc=%d\n",g->family,name,i);
+         fprintf(vlog," g->gaih[%s]('%s',...) rc=%d\n",g->famname,name,i);

       if (i != 0) {
         /* EAI_NODATA is a more specific result as it says that
Index: utils/mxverify/mxverify-cgi.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/mxverify/mxverify-cgi.c,v
retrieving revision 1.4
retrieving revision 1.7
diff -u -r1.4 -r1.7
--- utils/mxverify/mxverify-cgi.c       2000/07/14 11:45:32     1.4
+++ utils/mxverify/mxverify-cgi.c       2000/10/23 13:06:27     1.7
@@ -19,18 +19,22 @@
#include <errno.h>
#include "zmsignal.h"
#include <string.h>
+#include <sysexits.h>

int timeout_conn = 30; /* 30 seconds for connection */
int timeout_tcpw = 20; /* 20 seconds for write      */
int timeout_tcpr = 60; /* 60 seconds for responses  */

+int plaintext = 0;
+int conn_ok   = 0;
+
/* Input by 'GET' method, domain-name at CGI URL */

-extern void mxverifyrun();
+extern int mxverifyrun();

int main(argc, argv)
int argc;
-char argv[];
+char *argv[];
{
  char *getstr = getenv("QUERY_STRING");
  /* We PRESUME that in all conditions our input is of
@@ -52,6 +56,15 @@
    } else
      err = 1;
  }
+
+  if (argc == 3) {
+    if (strcmp(argv[1],"-domain") == 0) {
+      err = 0;
+      getstr = argv[2];
+      plaintext = 1;
+    }
+  }
+
  if (!err) {
    char *s, *p;
    /* Turn '+' to space */
@@ -99,27 +112,39 @@
  setvbuf(stdout, NULL, _IOLBF, 0);
  setvbuf(stderr, NULL, _IOLBF, 0);

-  fprintf(stdout, "Content-Type: TEXT/HTML\nPragma: no-cache\n\n");
+  if (!plaintext) {
+    fprintf(stdout, "Content-Type: TEXT/HTML\nPragma: no-cache\n\n");
+    fprintf(stdout, "<HTML><HEAD><TITLE>\n");
+  }
+  fprintf(stdout, "MX-VERIFY-CGI run for ``%s''\n", getstr);
+  if (!plaintext) {
+    fprintf(stdout, "</TITLE></HEAD>\n<BODY BGCOLOR=\"WHITE\" TEXT=\"BLACK\" LINK=\"#0000EE\" VLINK=\"#551A8B\" ALINK=\"RED\">\n\n");

-  fprintf(stdout, "<HTML><HEAD><TITLE>\n");
-  fprintf(stdout, "MX-VERIFY-CGI run for ``%s''\n</TITLE></HEAD>\n", getstr);
-  fprintf(stdout, "<BODY BGCOLOR=\"WHITE\" TEXT=\"BLACK\" LINK=\"#0000EE\" VLINK=\"#551A8B\" ALINK=\"RED\">\n\n");
-
-  fprintf(stdout, "<H1>MX-VERIFY-CGI run for ``%s''</H1>\n", getstr);
-  fprintf(stdout, "<P>\n");
-  fprintf(stdout, "<HR>\n");
+    fprintf(stdout, "<H1>MX-VERIFY-CGI run for ``%s''</H1>\n", getstr);
+    fprintf(stdout, "<P>\n");
+    fprintf(stdout, "<HR>\n");
+  }

  if (!err)
-    mxverifyrun(getstr);
+    err = mxverifyrun(getstr);
  else {
+    if (plaintext) {
+      fprintf(stdout, "\n\nSorry, NO MX-VERIFY-CGI run with this input!\n");
+      exit(EX_USAGE);
+    }
    fprintf(stdout, "<P>\n");
    fprintf(stdout, "Sorry, NO MX-VERIFY-CGI run with this input!<P>\n");
  }
-
-  fprintf(stdout, "<P>\n");
-  fprintf(stdout, "<HR>\n");
-  fprintf(stdout, "</BODY></HTML>\n");
-  return 0;
+  if (!plaintext) {
+    fprintf(stdout, "<P>\n");
+    fprintf(stdout, "<HR>\n");
+    fprintf(stdout, "</BODY></HTML>\n");
+  }
+
+  if ((err & 127) == 0 && err != 0) err = 1; /* Make sure that after an exit()
+                                               the caller will see non-zero
+                                               exit code. */
+  return err;
}


@@ -345,11 +370,17 @@
         return EX_SOFTWARE;
       }

-       fprintf(stdout,"<H1>Doing resolver lookup for T=MX domain=``%s''</H1>\n",host);
+       if (plaintext)
+         fprintf(stdout,"Doing resolver lookup for T=MX domain=``%s''\n",host);
+       else
+         fprintf(stdout,"<H1>Doing resolver lookup for T=MX domain=``%s''</H1>\n",host);

       n = res_send((void*)&qbuf, qlen, (void*)&answer, sizeof answer);
       if (n < 0) {
-         fprintf(stdout,"<H1>ERROR:  No resolver response for domain=``%s''</H1>\n", host);
+         if (plaintext)
+           fprintf(stdout,"ERROR:  No resolver response for domain=``%s''\n", host);
+         else
+           fprintf(stdout,"<H1>ERROR:  No resolver response for domain=``%s''</H1>\n", host);
         return EX_TEMPFAIL;
       }

@@ -374,8 +405,13 @@
           fprintf(stdout,"<H1>ERROR:  DNS Server Failure: domain=``%s''</H1>\n", host);
           return EX_TEMPFAIL;
         case NOERROR:
-           fprintf(stdout,"<H1>BAD:  NO MX DATA: domain=``%s''  We SIMULATE!</H1>\n", host);
-           fprintf(stdout,"<H1>Do have at least one MX entry added!</H1>\n");
+           if (plaintext) {
+             fprintf(stdout,"Questionable:  NO MX DATA: domain=``%s''  We SIMULATE!\n", host);
+             fprintf(stdout,"Do have at least one MX entry added!\n");
+           } else {
+             fprintf(stdout,"<H1>Questionable:  NO MX DATA: domain=``%s''  We SIMULATE!</H1>\n", host);
+             fprintf(stdout,"<H1>Do have at least one MX entry added!</H1>\n");
+           }
           mx[0].host = host;
           mx[0].pref = 999999;
           mx[1].host = NULL;
@@ -461,14 +497,23 @@
       }


-       fprintf(stdout, "<P><H1>DNS yields following MX entries</H1>\n");
-       fprintf(stdout, "<PRE>\n");
+       if (!plaintext)
+         fprintf(stdout, "<P><H1>");
+       fprintf(stdout, "DNS yields following MX entries\n");
+       if (!plaintext)
+         fprintf(stdout, "</H1><PRE>\n");
       for (i = 0; i < nmx; ++i)
         fprintf(stdout,"  %s  IN MX %3d %s\n", host,mx[i].pref,mx[i].host);
-       fprintf(stdout, "</PRE>\n<P>\n");
+       if (!plaintext)
+         fprintf(stdout, "</PRE>\n<P>\n");
+       else
+         fprintf(stdout, "\n\n");

       if (nmx == 1) {
-         fprintf(stdout, "<H2>Only one MX record...<BR>Well, no backups, but as all systems are looking for MX record <I>in every case</I>, not bad..</H2>\n<P>\n");
+         if (plaintext)
+           fprintf(stdout, "Only one MX record...\nWell, no backups, but as all systems are looking for MX record *in every case*, not bad..\n\n");
+         else
+           fprintf(stdout, "<H2>Only one MX record...<BR>Well, no backups, but as all systems are looking for MX record <I>in every case</I>, not bad..</H2>\n<P>\n");
       }

       mx[nmx].host = NULL;
@@ -543,6 +588,17 @@

       errnosave = errno = 0;

+       if (sa->sa_family == AF_INET) {
+         struct sockaddr_in *si = (struct sockaddr_in*) sa;
+         unsigned long  ia = ntohl(si->sin_addr.s_addr);
+         int anet = ia >> 24;
+         if (anet <= 0 || anet == 127 ||  anet >= 224) {
+           close(sk);
+           errno = EADDRNOTAVAIL;
+           return EX_UNAVAILABLE;
+         }
+       }
+
       if (connect(sk, sa, addrsiz) < 0 &&
           (errno == EWOULDBLOCK || errno == EINPROGRESS)) {

@@ -608,7 +664,12 @@

       if (errnosave == 0 && !gotalarm) {
         *fdp = sk;
-         fprintf(stdout,"<CODE>[ CONNECTED! ]</CODE><BR>\n");
+         if (plaintext)
+           fprintf(stdout,"[ CONNECTED! ]\n");
+         else
+           fprintf(stdout,"<CODE>[ CONNECTED! ]</CODE><BR>\n");
+
+         ++conn_ok;

         return EX_OK;
       }
@@ -616,9 +677,12 @@
       close(sk);

       se = strerror(errnosave);
-       fprintf(stdout,"<H2>ERROR: Connect failure reason: %s</H2><BR>\n",se);
+       if (plaintext)
+         fprintf(stdout,"ERROR: Connect failure reason: %s\n(Still possibly all OK!)",se);
+       else
+         fprintf(stdout,"<H2>ERROR: Connect failure reason: %s</H2><BR>(Still possibly all OK!)<BR>\n",se);

-       return EX_UNAVAILABLE;
+       return 0;
}


@@ -692,12 +756,15 @@
     char *str;
{
       int i;
-       for (i = 0; i < len; ++i) {
-         if (str[i] == '\n')
-           fprintf(stdout, "\n");
-         else
-           fprintf(stdout, "&#%d;", str[i]);
-       }
+       if (plaintext)
+         fwrite(str, 1, len, stdout);
+       else
+         for (i = 0; i < len; ++i) {
+           if (str[i] == '\n')
+             fprintf(stdout, "\n");
+           else
+             fprintf(stdout, "&#%d;", str[i]);
+         }
}


@@ -802,7 +869,7 @@
}


-void smtptest(thatuser, ai)
+int smtptest(thatuser, ai)
     char *thatuser;
     struct addrinfo *ai;
{
@@ -824,14 +891,15 @@

       smtpgetc(-1);

+       sock = -1;
       rc = vcsetup(ai->ai_addr, &sock, myhostname, sizeof(myhostname));

-       if (rc != EX_OK) return; /* D'uh! */
+       if (rc != EX_OK || sock < 0) return rc; /* D'uh! */


-       fprintf(stdout, "<PRE>\n");
+       if (!plaintext)
+         fprintf(stdout, "<PRE>\n");

-
       /* Initial greeting */

       rc = readsmtp(sock); /* Read response.. */
@@ -848,7 +916,10 @@
       if (rc < 0 || rc > 299) goto end_test_1;

       sprintf(smtpline, "MAIL FROM:<>\r\n");
-       fprintf(stdout, " MAIL FROM:&lt;&gt;\n");
+       if (plaintext)
+         fprintf(stdout, " MAIL FROM:<>\n");
+       else
+         fprintf(stdout, " MAIL FROM:&lt;&gt;\n");
       rc = writesmtp(sock, smtpline);
       if (rc == ETIMEDOUT) wtout = 1;
       if (rc != EX_OK) goto end_test_1;
@@ -857,9 +928,15 @@

       if (thatdomain != thatuser) {
         sprintf(smtpline, "RCPT TO:<%s>\r\n", thatuser);
-         fprintf(stdout, " RCPT TO:&lt;");
+         if (plaintext)
+           fprintf(stdout, " RCPT TO:<");
+         else
+           fprintf(stdout, " RCPT TO:&lt;");
         htmlwrite(thatuser,strlen(thatuser));
-         fprintf(stdout,"&gt;\n");
+         if (plaintext)
+           fprintf(stdout,">\n");
+         else
+           fprintf(stdout,"&gt;\n");
         rc = writesmtp(sock, smtpline);
         if (rc == ETIMEDOUT) wtout = 1;
         if (rc != EX_OK) goto end_test_1;
@@ -868,9 +945,15 @@
       }

       sprintf(smtpline, "RCPT TO:<postmaster@%s>\r\n", thatdomain);
-       fprintf(stdout, " RCPT TO:&lt;postmaster@");
+       if (plaintext)
+         fprintf(stdout, " RCPT TO:<postmaster@");
+       else
+         fprintf(stdout, " RCPT TO:&lt;postmaster@");
       htmlwrite(thatdomain,strlen(thatdomain));
-       fprintf(stdout,"&gt;\n");
+       if (plaintext)
+         fprintf(stdout,">\n");
+       else
+         fprintf(stdout,"&gt;\n");
       rc = writesmtp(sock, smtpline);
       if (rc == ETIMEDOUT) wtout = 1;
       if (rc != EX_OK) goto end_test_1;
@@ -885,23 +968,35 @@
       sprintf(smtpline, "RSET\r\nQUIT\r\n");
       writesmtp(sock, smtpline);
       close(sock);
-       fprintf(stdout,"\n</PRE>\n");
-       /* fprintf(stdout, "RC = %d\n", rc); */
-       if (wtout)
-         fprintf(stdout,"<H2> WRITE TIMEOUT!</H2>\n");
-       else if (rc == 0)
-         fprintf(stdout,"<H2>Apparently OK!</H2>\n");
-       else
-         fprintf(stdout,"<H2>Something WRONG!! rc=%d</H2>\n", rc);
+       if (plaintext) {
+         fprintf(stdout,"\n\n");
+         /* fprintf(stdout, "RC = %d\n", rc); */
+         if (wtout)
+           fprintf(stdout," WRITE TIMEOUT!\n");
+         else if (rc == 0)
+           fprintf(stdout,"Apparently OK!\n");
+         else
+           fprintf(stdout,"Something WRONG!! rc=%d\n", rc);
+       } else {
+         fprintf(stdout,"\n</PRE>\n");
+         /* fprintf(stdout, "RC = %d\n", rc); */
+         if (wtout)
+           fprintf(stdout,"<H2> WRITE TIMEOUT!</H2>\n");
+         else if (rc == 0)
+           fprintf(stdout,"<H2>Apparently OK!</H2>\n");
+         else
+           fprintf(stdout,"<H2>Something WRONG!! rc=%d</H2>\n", rc);
+       }
+       return rc;
}


-void testmxsrv(thatdomain, hname)
+int testmxsrv(thatdomain, hname)
     char *thatdomain;
     char *hname;
{
       struct addrinfo req, *ai, *ai2, *a;
-       int i, i2;
+       int i, i2, rc = 0, rc2;

       memset(&req, 0, sizeof(req));
       req.ai_socktype = SOCK_STREAM;
@@ -940,14 +1035,24 @@
       if (i) {
         /* It is fucked up somehow.. */
         fprintf(stdout, "<H2> --- sorry, address lookup for ``%s'' failed;<BR> code = %s</H2>\n", hname, gai_strerror(i));
-         return;
+         return i;
       }
       if (!ai) {
-         fprintf(stdout,"Address lookup <B>did not</B> yield any addresses!\n");
-         return;
+         if (plaintext)
+           fprintf(stdout,"Address lookup _did not_ yield any addresses!\n");
+         else
+           fprintf(stdout,"Address lookup <B>did not</B> yield any addresses!\n");
+         return EX_DATAERR;
+       }
+
+       if (plaintext) {
+         fprintf(stdout,"Address lookup did yield following ones:\n\n");
+         fprintf(stdout,"\n");
+       } else {
+         fprintf(stdout,"Address lookup did yield following ones:\n<P>\n");
+         fprintf(stdout,"<PRE>\n");
       }
-       fprintf(stdout,"Address lookup did yield following ones:\n<P>\n");
-       fprintf(stdout,"<PRE>\n");
+
       for (a = ai; a; a = a->ai_next) {
         char buf[200];
         struct sockaddr_in *si;
@@ -971,7 +1076,12 @@

         fprintf(stdout,"  %s\n", buf);
       }
-       fprintf(stdout,"</PRE>\n");
+
+       if (plaintext)
+         fprintf(stdout,"\n");
+       else
+         fprintf(stdout,"</PRE>\n");
+
       for (a = ai; a; a = a->ai_next) {
         char buf[200];
         struct sockaddr_in *si;
@@ -992,31 +1102,58 @@
         } else
#endif
           sprintf(buf,"UNKNOWN-ADDR-FAMILY-%d", a->ai_family);
-         fprintf(stdout,"<P>\n");
-         fprintf(stdout,"<H2>Testing server at address: %s</H2>\n", buf);
-         fprintf(stdout,"<P>\n");
-         smtptest(thatdomain, a);
+         if (plaintext) {
+           fprintf(stdout,"\n");
+           fprintf(stdout," Testing server at address: %s\n", buf);
+           fprintf(stdout,"\n");
+         } else {
+           fprintf(stdout,"<P>\n");
+           fprintf(stdout,"<H2>Testing server at address: %s</H2>\n", buf);
+           fprintf(stdout,"<P>\n");
+         }
+         rc2 = smtptest(thatdomain, a);
+         if (!rc) rc = rc2;
       }
+       return rc;
}


-void mxverifyrun(thatuser)
+int mxverifyrun(thatuser)
     char *thatuser;
{
       struct mxdata mx[80+1];
-       int rc, i;
+       int rc, rc2, i;
       char *thatdomain = strchr(thatuser,'@');
       if (!thatdomain) thatdomain = thatuser; else ++thatdomain;

       rc = getmxrr(thatdomain, mx, 80, 0);
-       if (rc) return;
+       if (rc) return rc;

       for (i = 0; mx[i].host != NULL; ++i) {
-         fprintf(stdout, "<P>\n");
-         fprintf(stdout, "<HR>\n");
-         fprintf(stdout, "<P>\n");
-         fprintf(stdout,"<H1>Testing MX server: %s</H1>\n", mx[i].host);
-         fprintf(stdout,"<P>\n");
-         testmxsrv(thatuser, mx[i].host);
+         if (plaintext) {
+           fprintf(stdout, "\n");
+           fprintf(stdout, "-----------------------------------------------------------------------\n");
+           fprintf(stdout, "\n");
+           fprintf(stdout," Testing MX server: %s\n", mx[i].host);
+           fprintf(stdout,"\n");
+         } else {
+           fprintf(stdout, "<P>\n");
+           fprintf(stdout, "<HR>\n");
+           fprintf(stdout, "<P>\n");
+           fprintf(stdout,"<H1>Testing MX server: %s</H1>\n", mx[i].host);
+           fprintf(stdout,"<P>\n");
+         }
+         rc2 = testmxsrv(thatuser, mx[i].host);
+         if (!rc)  rc = rc2; /* Yield 'error' if any errs. */
       }
+
+       if (!rc && !conn_ok) {
+         /* No SUCCESSFULL connections anywhere,
+            either the network is in trouble towards
+            all destination system MX sites, or
+            the site really is in trouble... */
+         rc = 1;
+       }
+
+       return rc;
}
Index: utils/pop-proxy/pop-proxy.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/pop-proxy/pop-proxy.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- utils/pop-proxy/pop-proxy.c 1999/02/05 21:38:46     1.3
+++ utils/pop-proxy/pop-proxy.c 2000/10/10 21:00:58     1.4
@@ -379,7 +379,7 @@
       for (;;) {

         /* Do we need timeout monitoring ?
-            Propably not, but one never knows, thus we rig
+            Probably not, but one never knows, thus we rig
            an alarm of 10 minutes at each select call.
            If it expires, we close both sockets, and exit. */

Index: utils/vacation/vacation.c
===================================================================
RCS file: /home/mea/src/CVSROOT/zmailer/utils/vacation/vacation.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- utils/vacation/vacation.c   2000/08/17 20:44:46     1.14
+++ utils/vacation/vacation.c   2000/10/11 05:21:34     1.15
@@ -246,17 +246,6 @@
         exit(EX_NOUSER);
       }

-       /* verify recipient argument */
-#ifdef ZMAILER
-       if (argc == 0) {
-         p = getenv("USER");
-         if (p == NULL) {
-           usrerr("Zmailer error: USER environment variable not set");
-           exit(EX_USAGE+102);
-         }
-       }
-#endif /* ZMAILER */
-
#ifdef HAVE_NDBM_H
       if (dblog)
         db = dbm_open(VDB, O_RDWR | (iflag ? O_TRUNC|O_CREAT : 0),
@@ -610,6 +599,9 @@
       register struct ignore *cur;
       register int len;
       register char *p;
+
+       if (strcmp(from, "<>") == 0)
+               return(1);

       /*
        * This is mildly amusing, and I'm not positive it's right; trying