*** FAQ.OLD Mon Feb 28 10:08:03 1994 --- FAQ Thu Apr 14 10:16:16 1994 *************** *** 1,6 **** Sendmail Version 8 Frequently Asked Questions ! Version 8.2 of 2/28/94 This FAQ is specific to Version 8 of sendmail. --- 1,6 ---- Sendmail Version 8 Frequently Asked Questions ! Version 8.3 of 4/14/94 This FAQ is specific to Version 8 of sendmail. *************** *** 207,212 **** --- 207,218 ---- description to be a new program that does this local delivery. I understand that "procmail" works well, although I haven't used it myself. + + You might be interested in reading the paper ``HLFSD: Delivering + Email to your $HOME'' available in the Proceedings of the + USENIX System Administration (LISA VII) Conference (November + 1993). This is also available via public FTP from + ftp.cs.columbia.edu:/pub/hlfsd/{README.hlfsd,hlfsd.ps}. ---------------------------------------------------------------------- * Under V8, the "From " header gets mysteriously munged when I send to an alias. *** Files.base.OLD Fri Mar 4 17:29:30 1994 --- Files.base Wed Apr 13 10:26:01 1994 *************** *** 1,5 **** ! # @(#)Files.base 8.2 (Berkeley) 3/4/94 ! CHANGES-R5-R8 FAQ KNOWNBUGS Makefile --- 1,4 ---- ! # @(#)Files.base 8.5 (Berkeley) 4/13/94 FAQ KNOWNBUGS Makefile *************** *** 21,26 **** --- 20,26 ---- src/Makefile.AUX src/Makefile.BSD43 src/Makefile.BSDI + src/Makefile.CLIX src/Makefile.ConvexOS src/Makefile.DGUX src/Makefile.Dell *************** *** 31,36 **** --- 31,37 ---- src/Makefile.IRIX src/Makefile.Linux src/Makefile.Mach386 + src/Makefile.NCR3000 src/Makefile.NeXT src/Makefile.NetBSD src/Makefile.OSF1 *** Files.xdoc.OLD Sat Feb 26 09:18:19 1994 --- Files.xdoc Wed Apr 13 07:34:15 1994 *************** *** 1,4 **** ! # @(#)Files.xdoc 8.1 (Berkeley) 2/26/94 doc/intro/Makefile doc/intro/intro.me doc/intro/intro.ps --- 1,7 ---- ! # @(#)Files.xdoc 8.2 (Berkeley) 4/13/94 ! doc/changes/Makefile ! doc/changes/changes.me ! doc/changes/changes.ps doc/intro/Makefile doc/intro/intro.me doc/intro/intro.ps *** READ_ME.OLD Wed Jan 26 17:39:28 1994 --- READ_ME Wed Apr 13 07:34:56 1994 *************** *** 1,5 **** /*- ! * @(#)READ_ME 8.9 (Berkeley) 1/26/94 */ SENDMAIL RELEASE 8 --- 1,5 ---- /*- ! * @(#)READ_ME 8.10 (Berkeley) 4/13/94 */ SENDMAIL RELEASE 8 *************** *** 135,140 **** --- 135,169 ---- Be sure you remove ndbm.h and ndbm.o from the db distribution. These will cause problems with sendmail because sendmail already understands about NEWDB and NDBM coexisting. + + + +--------------------+ + | Host Name Services | + +--------------------+ + + If you compile with NAMED_BIND (the default) sendmail will use + DNS (the Domain Name System) for most host name lookups. If + you do not have DNS running at your site you may have to turn + this off to cause sendmail to use NIS and/or the /etc/hosts file. + In particular, on SunOS you have to choose to use DNS (which + you should do if you are attached to the Internet, otherwise + you lose MX records, which are required) or NIS -- there is no + way to try both. + + If you are using NIS and /etc/hosts, it is critical that you + list the long (fully qualified) name first in the /etc/hosts file + used to build the NIS database. For example, the line should read + + 128.32.149.68 mastodon.CS.Berkeley.EDU mastodon + + **** NOT **** + + 128.32.149.68 mastodon mastodon.CS.Berkeley.EDU + + If you use the wrong order, sendmail will conclude that your + canonical name is the short version and use that in messages. + The name "mastodon" doesn't mean much outside of Berkeley, + and so this creates incorrect and unreplyable messages. +-------------+ *** RELEASE_NOTES.OLD Fri Apr 8 08:37:56 1994 --- RELEASE_NOTES Tue Apr 19 07:27:58 1994 *************** *** 1,9 **** SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.6.8.1 (Berkeley) 3/21/94 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. 8.6.8/8.6.6 94/03/21 SECURITY: it was possible to read any file as root using the --- 1,130 ---- SENDMAIL RELEASE NOTES ! @(#)RELEASE_NOTES 8.6.9.2 (Berkeley) 4/19/94 This listing shows the version of the sendmail binary, the version of the sendmail configuration files, the date of release, and a summary of the changes in that release. + + 8.6.9/8.6.9 94/04/19 + Do all mail delivery completely disconnected from any terminal. + This provides consistency with daemon delivery and + may have some security implications. + Make sure that malloc doesn't get called with zero size, + since that fails on some systems. Reported by Ed + Hill of the University of Iowa. + Fix multi-line values for $e (SMTP greeting message). Reported + by Mike O'Connor of Ford Motor Company. + Avoid syserr if no NIS domain name is defined, but the map it + is trying to open is optional. From Win Bent of USC. + Changes for picky compilers from Ed Gould of Digital Equipment. + Hesiod support for UDB from Todd Miller of the University of + Colorado. Use "hesiod" as the service name in the U + option. + Fix a problem that failed to set the "authentic" host name (that + is, the one derived from the socket info) if you called + sendmail -bs from inetd. Based on code contributed by + Todd Miller (this problem was also reported by Guy Helmer + of Dakota State University). This also fixes a related + problem reported by Liudvikas Bukys of Rochester University. + Parameterize "nroff -h" in all the Makefiles so people with + variant versions can use them easily. Suggested by + Peter Collinson of Hillside Systems. + SMTP "MAIL" commands with multiple ESMTP parameters required two + spaces between parameters instead of one. Reported by + Valdis Kletnieks of Virginia Tech. + Reduce the number of system calls during message collection by + using global timeouts around the collect() loop. This + code was contributed by Eric Wassenaar. + If the initial hostname name gathering results in a name + without a dot (usually caused by NIS misconfiguration) + and BIND is compiled in, directly access DNS to get + the canonical name. This should make life easier for + Solaris systems. If it still can't be resolved, and + if the name server is listed as "required", try again + in 30 seconds. If that also fails, exit immediately to + avoid bogus "config error: mail loops back to myself" + messages. + Improve the "MAIL DELETED BECAUSE OF LACK OF DISK SPACE" error + message to explain how much space was available and + sound a bit less threatening. Suggested by Stan Janet + of the National Institute of Standards and Technology. + If mail is delivered to an alias that has an owner, deliver any + requested return-receipt immediately, and strip the + Return-Receipt-To: header from the subsequent message. + This prevents a certain class of denial of service + attack, arguably gives more reasonable semantics, and + moves things more towards what will probably become a + network standard. Suggested by Christopher Davis of + Kapor Enterprises. + Add a "noreceipts" privacy flag to turn off all return receipts + without recompiling. + Avoid printing ESMTP parameters as part of the error message + if there are errors during parsing. This change is + purely cosmetic. + Avoid sending out error messages during the collect phase of + SMTP; there is an MVS mailer from UCLA that gets + confused by this. Of course, I think it's their bug.... + Check for the $j macro getting undefined, losing a dot, or getting + lost from $=w in the daemon before accepting a connection; + if it is, it dumps state, prints a LOG_ALERT message, + and drops core for debugging. This is an attempt to + track down a bug that I thought was long since gone. + If you see this, please forward the log fragment to + sendmail@CS.Berkeley.EDU. + Change OLD_NEWDB from a #ifdef to a #if so it can be turned off + with -DOLD_NEWDB=0 on the command line. From Christophe + Wolfhugel. + Instead of trying to truncate the listen queue for the server + SMTP port when the load average is too high, just close + the port completely and reopen it later as needed. + This ensures that the other end gets a quick "connection + refused" response, and that the connection can be + recovered later. In particular, some socket emulations + seem to get confused if you tweak the listen queue + size around and can never start listening to connections + again. The down side is that someone could start up + another daemon process in the interim, so you could + have multiple daemons all not listening to connections; + this could in turn cause the sendmail.pid file to be + incorrect. A better approach might be to accept the + connection and give a 421 code, but that could break + other mailers in mysterious ways and have paging behaviour + implications. + Fix a glitch in TCP-level debugging that caused flag 16.101 to + set debugging on the wrong socket. From Eric Wassenaar. + When creating a df* temporary file, be sure you truncate any + existing data in the file -- otherwise system crashes + and the like could result in extra data being sent. + DOC: Replace the CHANGES-R5-R8 readme file with a paper in the + doc directory. This includes some additional + information. + CONFIG: change UUCP rules to never add $U! or $k! on the front + of recipient envelope addresses. This should have been + handled by the $&h trick, but broke if people were + mixing domainized and UUCP addresses. They should + probably have converted all the way over to uucp-uudom + instead of uucp-{new,old}, but the failure mode was to + loop the mail, which was bad news. + Portability fixes: + Newer BSDI systems (several people). + Older BSDI systems from Christophe Wolfhugel. + Intergraph CLIX, from Paul Southworth of CICNet. + UnixWare, from Evan Champion. + NetBSD from Adam Glass. + Solaris from Quentin Campbell of the University of + Newcastle upon Tyne. + IRIX from Dean Cookson and Bill Driscoll of Mitre + Corporation. + NCR 3000 from Kevin Darcy of Chrysler Corporation. + SunOS (it has setsid() and setvbuf() calls) from + Jonathan Kamens of OpenVision Technologies. + HP-UX from Tor Lillqvist. + New Files: + src/Makefile.CLIX + src/Makefile.NCR3000 + doc/changes/Makefile + doc/changes/changes.me + doc/changes/changes.ps 8.6.8/8.6.6 94/03/21 SECURITY: it was possible to read any file as root using the *** cf/README.OLD Sat Mar 12 08:49:57 1994 --- cf/README Thu Apr 14 15:31:15 1994 *************** *** 4,10 **** Eric Allman ! @(#)README 8.27 (Berkeley) 3/12/94 This document describes the sendmail configuration files being used --- 4,10 ---- Eric Allman ! @(#)README 8.28 (Berkeley) 4/14/94 This document describes the sendmail configuration files being used *************** *** 140,146 **** ALIAS_FILE [/etc/aliases] The location of the text version of the alias file(s). It can be a comma-separated ! list of names. HELP_FILE [/usr/lib/sendmail.hf] The name of the file containing information printed in response to the SMTP HELP command. --- 140,150 ---- ALIAS_FILE [/etc/aliases] The location of the text version of the alias file(s). It can be a comma-separated ! list of names (but be sure you quote values with ! comments in them -- for example, use ! define(`ALIAS_FILE', `a,b') ! to get "a" and "b" both listed as alias files; ! otherwise the define() primitive only sees "a"). HELP_FILE [/usr/lib/sendmail.hf] The name of the file containing information printed in response to the SMTP HELP command. *** cf/m4/version.m4.OLD Thu Apr 14 10:24:40 1994 --- cf/m4/version.m4 Mon Apr 18 22:17:40 1994 *************** *** 32,39 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.6.6.1 (Berkeley) 3/13/94') # divert(0) # Configuration version number ! DZ8.6.6 --- 32,39 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! VERSIONID(`@(#)version.m4 8.6.9.1 (Berkeley) 4/18/94') # divert(0) # Configuration version number ! DZ8.6.9 *** cf/mailer/uucp.m4.OLD Wed Feb 16 07:58:07 1994 --- cf/mailer/uucp.m4 Thu Apr 14 16:03:20 1994 *************** *** 42,48 **** ### UUCP Mailer specification ### ##################################### ! VERSIONID(`@(#)uucp.m4 8.15 (Berkeley) 2/16/94') # # There are innumerable variations on the UUCP mailer. It really --- 42,48 ---- ### UUCP Mailer specification ### ##################################### ! VERSIONID(`@(#)uucp.m4 8.16 (Berkeley) 4/14/94') # # There are innumerable variations on the UUCP mailer. It really *************** *** 50,64 **** # # old UUCP mailer (two names) ! Muucp, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ! Muucp-old, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS # smart UUCP mailer (handles multiple addresses) (two names) ! Msuucp, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ! Muucp-new, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ifdef(`_MAILER_smtp_', --- 50,64 ---- # # old UUCP mailer (two names) ! Muucp, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ! Muucp-old, P=UUCP_MAILER_PATH, F=CONCAT(DFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS # smart UUCP mailer (handles multiple addresses) (two names) ! Msuucp, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ! Muucp-new, P=UUCP_MAILER_PATH, F=CONCAT(mDFMhuU, UUCP_MAILER_FLAGS), S=12, R=22/42, M=UUCP_MAX_SIZE, A=UUCP_MAILER_ARGS ifdef(`_MAILER_smtp_', *************** *** 94,102 **** R! $+ $: $k ! $1 in case $U undefined # ! # envelope and header recipient rewriting # S22 # don't touch list:; syntax R$* :; <@> $@ $1 :; --- 94,117 ---- R! $+ $: $k ! $1 in case $U undefined # ! # envelope recipient rewriting # S22 + + # don't touch list:; syntax + R$* :; <@> $@ $1 :; + + R$* < @ $* . > $1 < @ $2 > strip trailing dots + R$* < @ $j > $1 strip local name + R<@ $- . UUCP > : $+ $1 ! $2 convert to UUCP format + R<@ $+ > : $+ $1 ! $2 convert to UUCP format + R$* < @ $- . UUCP > $2 ! $1 convert to UUCP format + R$* < @ $+ > $2 ! $1 convert to UUCP format + + # + # header recipient rewriting + # + S42 # don't touch list:; syntax R$* :; <@> $@ $1 :; *** contrib/xla/xla.c.OLD Sat May 22 11:01:44 1993 --- contrib/xla/xla.c Sun Apr 17 07:36:06 1994 *************** *** 1,5 **** /* ! * (C) Copyright 1993, Herve Schauer Consultants * * This module written by Christophe.Wolfhugel@hsc-sec.fr * is to be used under the same conditions and terms (and absence --- 1,5 ---- /* ! * (C) Copyright 1993-94, Herve Schauer Consultants * * This module written by Christophe.Wolfhugel@hsc-sec.fr * is to be used under the same conditions and terms (and absence *************** *** 7,12 **** --- 7,16 ---- * * ABSOLUTELY NO WARRANTY. USE AT YOUR OWN RISKS. * + * Version: 940417, applied a patch from Paul Graham + * (lockfile syntax in xla.c did not reflect anymore the + * new one used by sendmail, now fine). + * */ *************** *** 100,106 **** XlaFname = NULL; XlaNext = 0; XlaPid = 0; ! memset(&XlaRules[0], 0, sizeof(XLARULE) * MAXLARULES); } --- 104,110 ---- XlaFname = NULL; XlaNext = 0; XlaPid = 0; ! memset((char *) &XlaRules[0], 0, sizeof(XLARULE) * MAXLARULES); } *************** *** 198,204 **** syserr("xla_create_file: open failed"); return; } ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_create_file: can't set lock"); --- 202,208 ---- syserr("xla_create_file: open failed"); return; } ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_create_file: can't set lock"); *************** *** 250,256 **** syserr("xla_smtp_ok: open failed"); return(TRUE); } ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_smtp_ok: can't set lock"); --- 254,260 ---- syserr("xla_smtp_ok: open failed"); return(TRUE); } ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_smtp_ok: can't set lock"); *************** *** 304,310 **** return(TRUE); } XlaPid = getpid(); ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_host_ok: can't set lock"); --- 308,314 ---- return(TRUE); } XlaPid = getpid(); ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_host_ok: can't set lock"); *************** *** 372,378 **** syserr("xla_noqueue_ok: open failed"); return(TRUE); } ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_noqueue_ok: can't set lock"); --- 376,382 ---- syserr("xla_noqueue_ok: open failed"); return(TRUE); } ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_noqueue_ok: can't set lock"); *************** *** 441,447 **** syserr("xla_host_end: open failed"); return; } ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_host_end: can't set lock"); --- 445,451 ---- syserr("xla_host_end: open failed"); return; } ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_host_end: can't set lock"); *************** *** 502,508 **** syserr("xla_all_end: open failed"); return; } ! if (!lockfile(fd, XlaFname, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_all_end: can't set lock"); --- 506,512 ---- syserr("xla_all_end: open failed"); return; } ! if (!lockfile(fd, XlaFname, NULL, LOCK_EX)) { close(fd); XlaFname = NULL; syserr("xla_all_end: can't set lock"); *** doc/op/op.me.OLD Mon Mar 21 23:33:11 1994 --- doc/op/op.me Thu Apr 14 10:40:52 1994 *************** *** 30,36 **** .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.34 (Berkeley) 3/3/94 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' --- 30,36 ---- .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" ! .\" @(#)op.me 8.36 (Berkeley) 4/14/94 .\" .\" eqn op.me | pic | troff -me .eh 'SMM:08-%''Sendmail Installation and Operation Guide' *************** *** 69,75 **** Mammoth Project eric@CS.Berkeley.EDU .sp ! Version 8.34 .sp For Sendmail Version 8.6 .)l --- 69,75 ---- Mammoth Project eric@CS.Berkeley.EDU .sp ! Version 8.36 .sp For Sendmail Version 8.6 .)l *************** *** 1206,1211 **** --- 1206,1214 ---- it just means that the message has been delivered to the recipient's mailbox. .)f + This header can be disabled with the + .q noreceipts + privacy flag. .sh 3 "Errors-To:" .pp If errors occur anywhere during processing, *************** *** 3856,3861 **** --- 3859,3865 ---- novrfy Disallow VRFY entirely restrictmailq Restrict mailq command restrictqrun Restrict \-q command line flag + noreceipts Ignore Return-Receipt-To: header goaway Disallow essentially all SMTP status queries authwarnings Put X-Authentication-Warning: headers in messages .)b *************** *** 4103,4109 **** .i sendmail to relinquish its setuid permissions. The options that will not cause this are ! b, d, e, E, i, L, m, o, p, r, s, v, C, and 7. Also, M (define macro) when defining the r or s macros is also considered .q safe . --- 4107,4113 ---- .i sendmail to relinquish its setuid permissions. The options that will not cause this are ! b, d, e, i, L, m, o, p, r, s, v, C, and 7. Also, M (define macro) when defining the r or s macros is also considered .q safe . *************** *** 6887,6893 **** .\"Eric Allman .\"Britton-Lee, Inc. .\".sp ! .\"Version 8.34 .\".ce 0 .bp 2 .rs --- 6891,6897 ---- .\"Eric Allman .\"Britton-Lee, Inc. .\".sp ! .\"Version 8.36 .\".ce 0 .bp 2 .rs *** src/Makefile.AIX.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.AIX Tue Apr 12 07:41:11 1994 *************** *** 7,13 **** # # This has been tested on AIX 3.1.5 and 3.2.3e. # ! # @(#)Makefile.AIX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on AIX 3.1.5 and 3.2.3e. # ! # @(#)Makefile.AIX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 79,95 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 79,97 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.AUX.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.AUX Tue Apr 12 07:41:11 1994 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.AUX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.AUX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 71,87 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 71,89 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.BSD43.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.BSD43 Tue Apr 12 07:41:11 1994 *************** *** 11,17 **** # It should also work on UMIPS-BSD from MIPS, if you still have # any lying around. # ! # @(#)Makefile.BSD43 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 11,17 ---- # It should also work on UMIPS-BSD from MIPS, if you still have # any lying around. # ! # @(#)Makefile.BSD43 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 89,105 **** echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 89,107 ---- echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.CLIX.OLD Wed Apr 13 10:26:59 1994 --- src/Makefile.CLIX Tue Apr 12 08:43:02 1994 *************** *** 0 **** --- 1,115 ---- + # + # This makefile is for clipper-based Intergraph systems running CLIX. + # It and the defines supporting it in the source tree should be considered + # alpha-quality and used at own risk. + # + # Porting done for CICNet, Inc., on behalf the Michigan State Department + # of Natural Resources. + # + # --Paul Southworth + # + # @(#)Makefile.CLIX 8.1 (Berkeley) 4/12/94 + # + + # make sure the shell constructs below use the right shell + SHELL= /bin/sh + + # use O=-O (usual) or O=-g (debugging) + O= -O + + CC= gcc + + # define the database mechanism used for alias lookups: + # -DNDBM -- use new DBM + # -DNEWDB -- use new Berkeley DB + # -DNIS -- include NIS support + # The really old (V7) DBM library is no longer supported. + # See READ_ME for a description of how these flags interact. + # + DBMDEF= -DNDBM + + # environment definitions (e.g., -D_AIX3) + ENVDEF= -DCLIX + + # see also conf.h for additional compilation flags + + # include directories + INCDIRS= -I/usr/include + + # library directories + LIBDIRS= + + # libraries required on your system + LIBS= -lnsl -lbsd + + # location of sendmail binary (usually /usr/sbin or /usr/lib) + BINDIR= ${DESTDIR}/usr/lib + + # location of sendmail.st file (usually /var/log or /usr/lib) + STDIR= ${DESTDIR}/usr/lib + + # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) + HFDIR= ${DESTDIR}/usr/lib + + # additional .o files needed + OBJADD= getusershell.o + + ################### end of user configuration flags ###################### + + CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} + + OBJS= alias.o arpadate.o clock.o collect.o conf.o convtime.o daemon.o \ + deliver.o domain.o envelope.o err.o headers.o macro.o main.o \ + map.o mci.o parseaddr.o queue.o readcf.o recipient.o \ + savemail.o srvrsmtp.o stab.o stats.o sysexits.o \ + trace.o udb.o usersmtp.o util.o version.o ${OBJADD} + + LINKS= ${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq + BINOWN= root + BINGRP= mail + BINMODE=6555 + INSTALL=cp + + ALL= sendmail # aliases.0 mailq.0 newaliases.0 sendmail.0 + + all: ${ALL} + + sendmail: ${BEFORE} ${OBJS} + ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + + NROFF= nroff -h + + aliases.0: aliases.5 + ${NROFF} -mandoc aliases.5 > aliases.0 + + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + + newaliases.0: newaliases.1 + ${NROFF} -mandoc newaliases.1 > newaliases.0 + + sendmail.0: sendmail.8 + ${NROFF} -mandoc sendmail.8 > sendmail.0 + + install: install-sendmail #install-docs + + install-sendmail: sendmail + #${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} sendmail ${BINDIR} + ${INSTALL} sendmail ${BINDIR} + chmod ${BINMODE} ${BINDIR}/sendmail + for i in ${LINKS}; do rm -f $$i; ln -s ${BINDIR}/sendmail $$i; done + #${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ + # ${STDIR}/sendmail.st + ${INSTALL} /dev/null ${STDIR}/sendmail.st + #${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR} + ${INSTALL} sendmail.hf ${HFDIR} + + # doesn't actually install them -- you may want to install pre-nroff versions + install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0 + + clean: + rm -f ${OBJS} sendmail #aliases.0 mailq.0 newaliases.0 sendmail.0 + + # dependencies + # gross overkill, and yet still not quite enough.... + ${OBJS}: sendmail.h conf.h *** src/Makefile.ConvexOS.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.ConvexOS Tue Apr 12 07:41:11 1994 *************** *** 7,13 **** # # This has been tested on CxOS 11.0 beta 1 and 10.x. # ! # @(#)Makefile.ConvexOS 8.2 (Berkeley) 3/5/94 # --- 7,13 ---- # # This has been tested on CxOS 11.0 beta 1 and 10.x. # ! # @(#)Makefile.ConvexOS 8.3 (Berkeley) 4/11/94 # *************** *** 71,87 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 71,89 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.DGUX.OLD Sat Mar 5 11:50:25 1994 --- src/Makefile.DGUX Tue Apr 12 07:41:11 1994 *************** *** 1,7 **** # # Tested on DG/UX 5.4.2 by A. Bryan Curnutt . # ! # @(#)Makefile.DGUX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 1,7 ---- # # Tested on DG/UX 5.4.2 by A. Bryan Curnutt . # ! # @(#)Makefile.DGUX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 67,83 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 67,85 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.Dell.OLD Sat Mar 5 11:50:25 1994 --- src/Makefile.Dell Tue Apr 12 07:41:12 1994 *************** *** 9,15 **** # -- I haven't tested this myself. It may # work on other SVR4 ports. # ! # @(#)Makefile.Dell 8.2 (Berkeley) 3/5/94 # # make sure the shell constructs below use the right shell --- 9,15 ---- # -- I haven't tested this myself. It may # work on other SVR4 ports. # ! # @(#)Makefile.Dell 8.3 (Berkeley) 4/11/94 # # make sure the shell constructs below use the right shell *************** *** 79,95 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 79,97 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.DomainOS.OLD Tue Mar 8 10:00:08 1994 --- src/Makefile.DomainOS Tue Apr 12 09:27:04 1994 *************** *** 7,13 **** # # This has been tested on DomainOS 10.3.5 # ! # @(#)Makefile.DomainOS 8.3 (Berkeley) 3/8/94 # # --- 7,13 ---- # # This has been tested on DomainOS 10.3.5 # ! # @(#)Makefile.DomainOS 8.5 (Berkeley) 4/12/94 # # *************** *** 49,55 **** BINDIR= ${DESTDIR}/usr/lib # location of sendmail.st file (usually /var/log or /usr/lib) ! STDIR= ${DESTDIR}/usr/adm # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) HFDIR= ${DESTDIR}/usr/lib --- 49,55 ---- BINDIR= ${DESTDIR}/usr/lib # location of sendmail.st file (usually /var/log or /usr/lib) ! STDIR= ${DESTDIR}/usr/lib # location of sendmail.hf file (usually /usr/share/misc or /usr/lib) HFDIR= ${DESTDIR}/usr/lib *************** *** 89,105 **** echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 89,107 ---- echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.Dynix.OLD Sat Mar 5 11:50:25 1994 --- src/Makefile.Dynix Tue Apr 12 07:41:12 1994 *************** *** 11,17 **** # instead. I compiled it with gcc 1.40a. The -lseq is to pick # up getopt.'' # ! # @(#)Makefile.Dynix 8.2 (Berkeley) 3/5/94 # CC= gcc --- 11,17 ---- # instead. I compiled it with gcc 1.40a. The -lseq is to pick # up getopt.'' # ! # @(#)Makefile.Dynix 8.3 (Berkeley) 4/11/94 # CC= gcc *************** *** 79,95 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 79,97 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.HP-UX.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.HP-UX Tue Apr 12 07:41:12 1994 *************** *** 7,13 **** # # This has been tested on HP-UX 8.07 on 7xx series. # ! # @(#)Makefile.HP-UX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on HP-UX 8.07 on 7xx series. # ! # @(#)Makefile.HP-UX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 72,88 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 72,90 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.IRIX.OLD Fri Mar 11 13:01:34 1994 --- src/Makefile.IRIX Tue Apr 12 07:41:12 1994 *************** *** 7,13 **** # # This has been tested on IRIX 4.0.4. # ! # @(#)Makefile.IRIX 8.3 (Berkeley) 3/11/94 # SHELL= /bin/sh --- 7,13 ---- # # This has been tested on IRIX 4.0.4. # ! # @(#)Makefile.IRIX 8.4 (Berkeley) 4/11/94 # SHELL= /bin/sh *************** *** 73,89 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 73,91 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.Linux.OLD Wed Mar 9 12:52:19 1994 --- src/Makefile.Linux Tue Apr 12 07:41:13 1994 *************** *** 11,17 **** # Makefile is likely to require a lot of customization. Read it over # carefully before proceeding. # ! # @(#)Makefile.Linux 8.6 (Berkeley) 3/9/94 # # use O=-O (usual) or O=-g (debugging) --- 11,17 ---- # Makefile is likely to require a lot of customization. Read it over # carefully before proceeding. # ! # @(#)Makefile.Linux 8.7 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 90,96 **** ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ${NROFF} -mandoc newaliases.1 > newaliases.0 --- 90,96 ---- ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ${NROFF} -mandoc newaliases.1 > newaliases.0 *** src/Makefile.Mach386.OLD Sat Mar 5 11:50:25 1994 --- src/Makefile.Mach386 Tue Apr 12 07:41:13 1994 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.Mach386 8.2 (Berkeley) 3/5/94 # CC= gcc --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.Mach386 8.3 (Berkeley) 4/11/94 # CC= gcc *************** *** 73,89 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 73,91 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.NCR3000.OLD Wed Apr 13 10:27:14 1994 --- src/Makefile.NCR3000 Sat Apr 16 07:27:56 1994 *************** *** 7,13 **** # # NCR 3000 support from Kevin Darcy . # ! # @(#)Makefile.NCR3000 8.1 (Berkeley) 4/13/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # NCR 3000 support from Kevin Darcy . # ! # @(#)Makefile.NCR3000 8.2 (Berkeley) 4/16/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 37,43 **** LIBDIRS=-L/usr/ucblib # libraries required on your system ! LIBS= -lc -lelf -lucb -ldbm -lnet -lnsl # location of sendmail binary (usually /usr/sbin or /usr/lib) BINDIR= ${DESTDIR}/usr/ucblib --- 37,43 ---- LIBDIRS=-L/usr/ucblib # libraries required on your system ! LIBS= -lsocket -lc -lelf -lucb -ldbm -lnet -lnsl # location of sendmail binary (usually /usr/sbin or /usr/lib) BINDIR= ${DESTDIR}/usr/ucblib *** src/Makefile.NeXT.OLD Sat Mar 5 11:50:25 1994 --- src/Makefile.NeXT Tue Apr 12 07:41:13 1994 *************** *** 7,13 **** # # This has been tested on NeXT 2.1. # ! # @(#)Makefile.NeXT 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on NeXT 2.1. # ! # @(#)Makefile.NeXT 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 80,96 **** echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 80,98 ---- echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs No differences encountered *** src/Makefile.OSF1.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.OSF1 Tue Apr 12 07:41:13 1994 *************** *** 7,13 **** # # This has been tested on OSF/1 1.3 # ! # @(#)Makefile.OSF1 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on OSF/1 1.3 # ! # @(#)Makefile.OSF1 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 73,89 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDADD} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 73,91 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDADD} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.PTX.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.PTX Tue Apr 12 07:41:13 1994 *************** *** 9,15 **** # # From Tim "Pinball Wizard" Wright . # ! # @(#)Makefile.PTX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 9,15 ---- # # From Tim "Pinball Wizard" Wright . # ! # @(#)Makefile.PTX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 78,91 **** sendmail: $& ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 INSTALL=install --- 78,96 ---- sendmail: $& ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 + mailq.0: mailq.1 + ${NROFF} -mandoc mailq.1 > mailq.0 + newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 INSTALL=install *** src/Makefile.RISCos.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.RISCos Tue Apr 12 07:41:14 1994 *************** *** 7,13 **** # # For Mips RISC/os 4.52. # ! # @(#)Makefile.RISCos 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # For Mips RISC/os 4.52. # ! # @(#)Makefile.RISCos 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 83,99 **** echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 83,101 ---- echo "#include " > dirent.h echo "#define dirent direct" >> dirent.h + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.SCO.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.SCO Tue Apr 12 14:18:59 1994 *************** *** 7,13 **** # # This has been tested on SCO. # ! # @(#)Makefile.SCO 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on SCO. # ! # @(#)Makefile.SCO 8.4 (Berkeley) 4/12/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 46,52 **** HFDIR= ${DESTDIR}/usr/lib # additional .o files needed ! OBJADD= fsync.o ################### end of user configuration flags ###################### --- 46,52 ---- HFDIR= ${DESTDIR}/usr/lib # additional .o files needed ! OBJADD= ################### end of user configuration flags ###################### *************** *** 70,86 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 70,88 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.SVR4.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.SVR4 Tue Apr 12 07:41:14 1994 *************** *** 9,15 **** # -- I haven't tested this myself. It may # work on other SVR4 ports. # ! # @(#)Makefile.SVR4 8.2 (Berkeley) 3/5/94 # # make sure the shell constructs below use the right shell --- 9,15 ---- # -- I haven't tested this myself. It may # work on other SVR4 ports. # ! # @(#)Makefile.SVR4 8.3 (Berkeley) 4/11/94 # # make sure the shell constructs below use the right shell *************** *** 79,95 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 79,97 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.Solaris.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.Solaris Tue Apr 12 14:19:18 1994 *************** *** 7,13 **** # # This has been tested on Solaris 2.1 and 2.2. # ! # @(#)Makefile.Solaris 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Solaris 2.1 and 2.2. # ! # @(#)Makefile.Solaris 8.5 (Berkeley) 4/12/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 32,38 **** # see also conf.h for additional compilation flags # include directories ! INCDIRS=-I/usr/sww/include/db -I. # library directories LIBDIRS=-L/usr/sww/lib --- 32,38 ---- # see also conf.h for additional compilation flags # include directories ! INCDIRS=-I/usr/sww/include/db # library directories LIBDIRS=-L/usr/sww/lib *************** *** 52,57 **** --- 52,60 ---- # additional .o files needed OBJADD= + # things to be made before compilation begins + BEFORE= sysexits.h + ################### end of user configuration flags ###################### CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} *************** *** 75,91 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 78,99 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + sysexits.h: /usr/ucbinclude/sysexits.h + ln -s /usr/ucbinclude/sysexits.h + + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.SunOS.OLD Sat Mar 5 11:50:26 1994 --- src/Makefile.SunOS Tue Apr 12 07:41:14 1994 *************** *** 10,16 **** # create empty files stdlib.h and stddef.h in your # compile directory. # ! # @(#)Makefile.SunOS 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 10,16 ---- # create empty files stdlib.h and stddef.h in your # compile directory. # ! # @(#)Makefile.SunOS 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 77,93 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 77,95 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.SunOS.4.0.3.OLD Sat Mar 5 11:50:27 1994 --- src/Makefile.SunOS.4.0.3 Tue Apr 12 07:41:14 1994 *************** *** 8,14 **** # You may find you need to find versions of some routines # such as strcasecmp in order to link this on SunOS 4.0.3. # ! # @(#)Makefile.SunOS.4.0.3 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 8,14 ---- # You may find you need to find versions of some routines # such as strcasecmp in order to link this on SunOS 4.0.3. # ! # @(#)Makefile.SunOS.4.0.3 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 79,95 **** stddef.h stdlib.h: cp /dev/null $@ aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 79,97 ---- stddef.h stdlib.h: cp /dev/null $@ + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.SunOS.5.x.OLD Sat Mar 5 11:50:27 1994 --- src/Makefile.SunOS.5.x Tue Apr 12 14:19:18 1994 *************** *** 7,13 **** # # This has been tested on Solaris 2.3. # ! # @(#)Makefile.SunOS.5.x 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Solaris 2.3. # ! # @(#)Makefile.SunOS.5.x 8.5 (Berkeley) 4/12/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 32,38 **** # see also conf.h for additional compilation flags # include directories ! INCDIRS=-I/usr/sww/include/db -I. # library directories LIBDIRS=-L/usr/sww/lib --- 32,38 ---- # see also conf.h for additional compilation flags # include directories ! INCDIRS=-I/usr/sww/include/db # library directories LIBDIRS=-L/usr/sww/lib *************** *** 52,57 **** --- 52,60 ---- # additional .o files needed OBJADD= + # things to be made before compilation begins + BEFORE= sysexits.h + ################### end of user configuration flags ###################### CFLAGS= -I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF} *************** *** 75,91 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 78,99 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${OBJS} ${LIBDIRS} ${LIBS} + sysexits.h: /usr/ucbinclude/sysexits.h + ln -s /usr/ucbinclude/sysexits.h + + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.Titan.OLD Sat Mar 5 11:50:27 1994 --- src/Makefile.Titan Tue Apr 12 07:41:15 1994 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.Titan 8.2 (Berkeley) 3/5/94 # # put the compiler in BSD mode --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.Titan 8.3 (Berkeley) 4/11/94 # # put the compiler in BSD mode *************** *** 80,96 **** stddef.h stdlib.h: cp /dev/null $@ aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 80,98 ---- stddef.h stdlib.h: cp /dev/null $@ + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.ULTRIX.OLD Sat Mar 5 11:50:27 1994 --- src/Makefile.ULTRIX Tue Apr 12 07:41:15 1994 *************** *** 7,13 **** # # This has been tested on Ultrix 4.2A and 4.3A. # ! # @(#)Makefile.ULTRIX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Ultrix 4.2A and 4.3A. # ! # @(#)Makefile.ULTRIX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 73,89 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 73,91 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.UMAX.OLD Sat Mar 5 11:50:27 1994 --- src/Makefile.UMAX Tue Apr 12 07:41:15 1994 *************** *** 7,13 **** # # This has been tested on Encore UMAX V # ! # @(#)Makefile.UMAX 8.2 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 7,13 ---- # # This has been tested on Encore UMAX V # ! # @(#)Makefile.UMAX 8.3 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 80,96 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs --- 80,98 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 install: install-sendmail install-docs *** src/Makefile.dist.OLD Sat Mar 5 11:50:24 1994 --- src/Makefile.dist Tue Apr 12 07:41:15 1994 *************** *** 5,11 **** # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.11 (Berkeley) 3/5/94 # # use O=-O (usual) or O=-g (debugging) --- 5,11 ---- # old make program (I recommend that you get and port the new make if you # are going to be doing any signficant work on sendmail). # ! # @(#)Makefile.dist 8.12 (Berkeley) 4/11/94 # # use O=-O (usual) or O=-g (debugging) *************** *** 71,87 **** sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} aliases.0: aliases.5 ! nroff -h -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! nroff -h -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! nroff -h -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! nroff -h -mandoc sendmail.8 > sendmail.0 INSTALL=install --- 71,89 ---- sendmail: ${BEFORE} ${OBJS} ${CC} -o sendmail ${LDOPTS} ${OBJS} ${LIBDIRS} ${LIBS} + NROFF= nroff -h + aliases.0: aliases.5 ! ${NROFF} -mandoc aliases.5 > aliases.0 mailq.0: mailq.1 ! ${NROFF} -mandoc mailq.1 > mailq.0 newaliases.0: newaliases.1 ! ${NROFF} -mandoc newaliases.1 > newaliases.0 sendmail.0: sendmail.8 ! ${NROFF} -mandoc sendmail.8 > sendmail.0 INSTALL=install *** src/READ_ME.OLD Sun Mar 13 09:38:25 1994 --- src/READ_ME Sun Apr 17 07:05:53 1994 *************** *** 30,36 **** # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)READ_ME 8.58 (Berkeley) 3/13/94 # This directory contains the source files for sendmail. --- 30,36 ---- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # ! # @(#)READ_ME 8.61 (Berkeley) 4/17/94 # This directory contains the source files for sendmail. *************** *** 136,142 **** get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd. DO NOT use the version from the Net2 distribution! However, if you are on BSD/386 or 386BSD-based systems, use the one that already exists ! on your system. You may need to define OLD_NEWDB to do this.] [NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and ndbm.h from the appropriate include directories if you want to get --- 136,142 ---- get the latest version from FTP.CS.Berkeley.EDU in /ucb/4bsd. DO NOT use the version from the Net2 distribution! However, if you are on BSD/386 or 386BSD-based systems, use the one that already exists ! on your system. You may need to #define OLD_NEWDB 1 to do this.] [NOTE WELL: it is CRITICAL that you remove ndbm.o from libdb.a and ndbm.h from the appropriate include directories if you want to get *************** *** 250,255 **** --- 250,259 ---- vprintf(3). Note that the resulting fake implementation is not very elegant and may not even work on some architectures. + NEEDFSYNC Define this if your standard C library does not define + fsync(2). This will try to simulate the operation using + fcntl(2); if that is not available it does nothing, which + isn't great, but at least it compiles and runs. HASGETUSERSHELL Define this to 1 if you have getusershell(3) in your standard C library. If this is not defined, or is defined to be 0, sendmail will scan the /etc/shells file (no *************** *** 296,306 **** SFS_USTAT (1) if you have the ustat(2) system call, SFS_4ARGS (2) if you have a four-argument statfs(2) system call (and the include file is ), ! and SFS_VFS (3), SFS_MOUNT (4), or SFS_STATFS (5) if ! you have the two-argument statfs(2) system call, with ! includes in , , or ! respectively. The default if nothing is defined is ! SFS_NONE. ERRLIST_PREDEFINED If set, assumes that some header file defines sys_errlist. This may be needed if you get type conflicts on this --- 300,310 ---- SFS_USTAT (1) if you have the ustat(2) system call, SFS_4ARGS (2) if you have a four-argument statfs(2) system call (and the include file is ), ! and SFS_VFS (3), SFS_MOUNT (4), SFS_STATFS (5) or ! SFS_STATVFS (6) if you have the two-argument statfs(2) ! system call, with includes in , , ! , or respectively. The ! default if nothing is defined is SFS_NONE. ERRLIST_PREDEFINED If set, assumes that some header file defines sys_errlist. This may be needed if you get type conflicts on this *************** *** 341,346 **** --- 345,354 ---- Normally defined in the Makefile. NEWDB Include support for Berkeley "db" package (hash & btree) for aliases and maps. Normally defined in the Makefile. + OLD_NEWDB If non-zero, the version of NEWDB you have is the old + one that does not include the "fd" call. This call was + added in version 1.5 of the Berkeley DB code. If you + use -DOLD_NEWDB=0 it forces you to use the new interface. NIS Define this to get NIS (YP) support for aliases and maps. Normally defined in the Makefile. USERDB Include support for the User Information Database. Implied *************** *** 575,581 **** other system files, such as /etc/passwd, unless you use the new db format throughout your system. You should normally just use the version of db supplied in your release. You may need ! to use -DOLD_NEWDB to make this work -- this turns off some new interface calls (for file locking) that are not in older versions of db. You'll get compile errors if you need this flag and don't have it set. --- 583,589 ---- other system files, such as /etc/passwd, unless you use the new db format throughout your system. You should normally just use the version of db supplied in your release. You may need ! to use -DOLD_NEWDB=1 to make this work -- this turns off some new interface calls (for file locking) that are not in older versions of db. You'll get compile errors if you need this flag and don't have it set. *************** *** 861,864 **** Eric Allman ! (Version 8.58, last update 3/13/94 09:38:06) --- 869,872 ---- Eric Allman ! (Version 8.61, last update 4/17/94 07:05:32) *** src/alias.c.OLD Mon Feb 28 10:04:58 1994 --- src/alias.c Thu Apr 14 09:42:54 1994 *************** *** 36,42 **** # include #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.24 (Berkeley) 2/28/94"; #endif /* not lint */ --- 36,42 ---- # include #ifndef lint ! static char sccsid[] = "@(#)alias.c 8.25 (Berkeley) 4/14/94"; #endif /* not lint */ *************** *** 144,154 **** if (!bitnset(M_USR_UPPER, a->q_mailer->m_flags)) makelower(obuf); owner = aliaslookup(obuf, e); ! if (owner != NULL) { ! if (strpbrk(owner, ",:/|\"") != NULL) ! owner = obuf; ! a->q_owner = newstr(owner); } } /* --- 144,163 ---- if (!bitnset(M_USR_UPPER, a->q_mailer->m_flags)) makelower(obuf); owner = aliaslookup(obuf, e); ! if (owner == NULL) ! return; ! ! /* reflect owner into envelope sender */ ! if (strpbrk(owner, ",:/|\"") != NULL) ! owner = obuf; ! a->q_owner = newstr(owner); ! ! /* announce delivery to this alias; NORECEIPT bit set later */ ! if (e->e_xfp != NULL) { ! fprintf(e->e_xfp, "Message delivered to mailing list %s\n", ! a->q_paddr); ! e->e_flags |= EF_SENDRECEIPT; } } /* *** src/collect.c.OLD Mon Jan 31 17:01:17 1994 --- src/collect.c Mon Apr 18 15:17:16 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.9 (Berkeley) 1/31/94"; #endif /* not lint */ # include --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)collect.c 8.14 (Berkeley) 4/18/94"; #endif /* not lint */ # include *************** *** 63,68 **** --- 63,71 ---- ** The from person may be set. */ + char *CollectErrorMessage; + bool CollectErrno; + collect(smtpmode, requeueflag, e) bool smtpmode; bool requeueflag; *************** *** 76,81 **** --- 79,87 ---- extern char *hvalue(); extern bool isheader(), flusheol(); + CollectErrorMessage = NULL; + CollectErrno = 0; + /* ** Create the temp file name and create the file. */ *************** *** 82,88 **** e->e_df = queuename(e, 'd'); e->e_df = newstr(e->e_df); ! if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT, FileMode)) == NULL) { syserr("Cannot create %s", e->e_df); NoReturn = TRUE; --- 88,94 ---- e->e_df = queuename(e, 'd'); e->e_df = newstr(e->e_df); ! if ((tf = dfopen(e->e_df, O_WRONLY|O_CREAT|O_TRUNC, FileMode)) == NULL) { syserr("Cannot create %s", e->e_df); NoReturn = TRUE; *************** *** 96,101 **** --- 102,110 ---- if (smtpmode) message("354 Enter mail, end with \".\" on a line by itself"); + /* set global timer to monitor progress */ + sfgetset(TimeOuts.to_datablock); + /* ** Try to read a UNIX-style From line */ *************** *** 287,303 **** inputerr = TRUE; } if (fflush(tf) != 0) tferror(tf, e); if (fsync(fileno(tf)) < 0 || fclose(tf) < 0) { ! syserr("cannot sync message data to disk (%s)", e->e_df); finis(); } ! /* An EOF when running SMTP is an error */ ! if (inputerr && (OpMode == MD_SMTP || OpMode == MD_DAEMON)) { char *host; char *problem; --- 296,325 ---- inputerr = TRUE; } + /* reset global timer */ + sfgetset((time_t) 0); + if (fflush(tf) != 0) tferror(tf, e); if (fsync(fileno(tf)) < 0 || fclose(tf) < 0) { ! tferror(tf, e); finis(); } ! if (CollectErrorMessage != NULL && Errors <= 0) { + if (CollectErrno != 0) + { + errno = CollectErrno; + syserr(CollectErrorMessage, e->e_df); + finis(); + } + usrerr(CollectErrorMessage); + } + else if (inputerr && (OpMode == MD_SMTP || OpMode == MD_DAEMON)) + { + /* An EOF when running SMTP is an error */ char *host; char *problem; *************** *** 314,321 **** # ifdef LOG if (LogLevel > 0 && feof(InChannel)) syslog(LOG_NOTICE, ! "collect: %s on connection from %s, sender=%s: %m\n", ! problem, host, e->e_from.q_paddr); # endif if (feof(InChannel)) usrerr("451 collect: %s on connection from %s, from=%s", --- 336,343 ---- # ifdef LOG if (LogLevel > 0 && feof(InChannel)) syslog(LOG_NOTICE, ! "collect: %s on connection from %s, sender=%s: %s\n", ! problem, host, e->e_from.q_paddr, errstring(errno)); # endif if (feof(InChannel)) usrerr("451 collect: %s on connection from %s, from=%s", *************** *** 401,414 **** FILE *fp; { register char *p = buf; - bool printmsg = TRUE; char junkbuf[MAXLINE]; while (strchr(p, '\n') == NULL) { ! if (printmsg) ! usrerr("553 header line too long"); ! printmsg = FALSE; if (sfgets(junkbuf, MAXLINE, fp, TimeOuts.to_datablock, "long line flush") == NULL) return (FALSE); --- 423,434 ---- FILE *fp; { register char *p = buf; char junkbuf[MAXLINE]; while (strchr(p, '\n') == NULL) { ! CollectErrorMessage = "553 header line too long"; ! CollectErrno = 0; if (sfgets(junkbuf, MAXLINE, fp, TimeOuts.to_datablock, "long line flush") == NULL) return (FALSE); *************** *** 435,448 **** FILE *tf; register ENVELOPE *e; { if (errno == ENOSPC) { (void) freopen(e->e_df, "w", tf); ! fputs("\nMAIL DELETED BECAUSE OF LACK OF DISK SPACE\n\n", tf); ! usrerr("452 Out of disk space for temp file"); } else ! syserr("collect: Cannot write %s", e->e_df); (void) freopen("/dev/null", "w", tf); } /* --- 455,497 ---- FILE *tf; register ENVELOPE *e; { + CollectErrno = errno; if (errno == ENOSPC) { + struct stat st; + long avail; + long bsize; + + NoReturn = TRUE; + if (fstat(fileno(tf), &st) < 0) + st.st_size = 0; (void) freopen(e->e_df, "w", tf); ! if (st.st_size <= 0) ! fprintf(tf, "\n*** Mail could not be accepted"); ! else if (sizeof st.st_size > sizeof (long)) ! fprintf(tf, "\n*** Mail of at least %qd bytes could not be accepted\n", ! st.st_size); ! else ! fprintf(tf, "\n*** Mail of at least %ld bytes could not be accepted\n", ! st.st_size); ! fprintf(tf, "*** at %s due to lack of disk space for temp file.\n", ! MyHostName); ! avail = freespace(QueueDir, &bsize); ! if (avail > 0) ! { ! if (bsize > 1024) ! avail *= bsize / 1024; ! else if (bsize < 1024) ! avail /= 1024 / bsize; ! fprintf(tf, "*** Currently, %ld kilobytes are available for mail temp files.\n", ! avail); ! } ! CollectErrorMessage = "452 Out of disk space for temp file"; } else ! { ! CollectErrorMessage = "cannot write message body to disk (%s)"; ! } (void) freopen("/dev/null", "w", tf); } /* *** src/conf.c.OLD Thu Apr 7 18:28:23 1994 --- src/conf.c Mon Apr 18 15:30:12 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.82 (Berkeley) 3/6/94"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)conf.c 8.89 (Berkeley) 4/18/94"; #endif /* not lint */ # include "sendmail.h" *************** *** 147,152 **** --- 147,153 ---- "restrictmailq", PRIV_RESTRICTMAILQ, "restrictqrun", PRIV_RESTRICTQRUN, "authwarnings", PRIV_AUTHWARNINGS, + "noreceipts", PRIV_NORECEIPTS, "goaway", PRIV_GOAWAY, NULL, 0, }; *************** *** 668,684 **** # define FSHIFT 5 # endif ! # if defined(__alpha) # define FSHIFT 10 # endif ! # if (LA_TYPE == LA_INT) || (LA_TYPE == LA_SHORT) ! # define FSHIFT 8 ! # endif #endif ! #if ((LA_TYPE == LA_INT) || (LA_TYPE == LA_SHORT)) && !defined(FSCALE) ! # define FSCALE (1 << FSHIFT) #endif getla() --- 669,685 ---- # define FSHIFT 5 # endif ! # if defined(__alpha) || defined(IRIX) # define FSHIFT 10 # endif + #endif ! #ifndef FSHIFT ! # define FSHIFT 8 #endif ! #ifndef FSCALE ! # define FSCALE (1 << FSHIFT) #endif getla() *************** *** 721,726 **** --- 722,730 ---- _PATH_UNIX, LA_AVENRUN); return (-1); } + #ifdef IRIX + Nl[X_AVENRUN].n_value &= 0x7fffffff; + #endif } if (tTd(3, 20)) printf("getla: symbol address = %#x\n", Nl[X_AVENRUN].n_value); *************** *** 1115,1122 **** --- 1119,1128 ---- { if (count++ > 1000) { + #ifdef LOG syslog(LOG_ALERT, "reapchild: waitpid loop: pid=%d, status=%x", pid, status); + #endif break; } } *************** *** 1308,1314 **** #ifdef TIOCNOTTY int fd; ! fd = open("/dev/tty", 2); if (fd >= 0) { (void) ioctl(fd, (int) TIOCNOTTY, (char *) 0); --- 1314,1320 ---- #ifdef TIOCNOTTY int fd; ! fd = open("/dev/tty", O_RDWR, 0); if (fd >= 0) { (void) ioctl(fd, (int) TIOCNOTTY, (char *) 0); *************** *** 1324,1329 **** --- 1330,1353 ---- #endif /* + ** FSYNC -- dummy fsync + */ + + #ifdef NEEDFSYNC + + fsync(fd) + int fd; + { + # ifdef O_SYNC + return fcntl(fd, F_SETFL, O_SYNC); + # else + /* nothing we can do */ + return 0; + # endif + } + + #endif + /* ** DGUX_INET_ADDR -- inet_addr for DG/UX ** ** Data General DG/UX version of inet_addr returns a struct in_addr *************** *** 1591,1596 **** --- 1615,1621 ---- #define SFS_VFS 3 /* use implementation */ #define SFS_MOUNT 4 /* use implementation */ #define SFS_STATFS 5 /* use implementation */ + #define SFS_STATVFS 6 /* use implementation */ #ifndef SFS_TYPE # define SFS_TYPE SFS_NONE *************** *** 1608,1613 **** --- 1633,1641 ---- #if SFS_TYPE == SFS_MOUNT # include #endif + #if SFS_TYPE == SFS_STATVFS + # include + #endif long freespace(dir, bsize) *************** *** 1626,1635 **** # define f_bavail fd_bfreen # define FSBLOCKSIZE fs.fd_bsize # else struct statfs fs; ! # define FSBLOCKSIZE fs.f_bsize ! # if defined(_SCO_unix_) || defined(IRIX) || defined(apollo) ! # define f_bavail f_bfree # endif # endif # endif --- 1654,1668 ---- # define f_bavail fd_bfreen # define FSBLOCKSIZE fs.fd_bsize # else + # if SFS_TYPE == SFS_STATVFS + struct statvfs fs; + # define FSBLOCKSIZE fs.f_bsize + # else struct statfs fs; ! # define FSBLOCKSIZE fs.f_bsize ! # if defined(_SCO_unix_) || defined(IRIX) || defined(apollo) ! # define f_bavail f_bfree ! # endif # endif # endif # endif *** src/conf.h.OLD Fri Apr 8 09:07:43 1994 --- src/conf.h Sun Apr 17 07:05:52 1994 *************** *** 31,37 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)conf.h 8.96 (Berkeley) 3/11/94 */ /* --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)conf.h 8.104 (Berkeley) 4/17/94 */ /* *************** *** 182,188 **** */ # ifdef IRIX ! # include # define HASSETREUID 1 /* has setreuid(2) call */ # define HASINITGROUPS 1 /* has initgroups(3) call */ # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ --- 182,188 ---- */ # ifdef IRIX ! # define SYSTEM5 1 /* this is a System-V derived system */ # define HASSETREUID 1 /* has setreuid(2) call */ # define HASINITGROUPS 1 /* has initgroups(3) call */ # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ *************** *** 191,196 **** --- 191,197 ---- # define setpgid BSDsetpgrp # define GIDSET_T gid_t # define SFS_TYPE SFS_4ARGS /* four argument statfs() call */ + # define LA_TYPE LA_INT # endif *************** *** 255,260 **** --- 256,266 ---- typedef int pid_t; extern char *getenv(); + # else + /* 4.1.x specifics */ + # define HASSETSID 1 /* has Posix setsid(2) call */ + # define HASSETVBUF 1 /* we have setvbuf(3) in libc */ + # endif # endif #endif *************** *** 394,410 **** #ifdef __bsdi__ # define HASUNSETENV 1 /* has the unsetenv(3) call */ # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ - # define SFS_TYPE SFS_MOUNT /* use statfs() impl */ - # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 - # define HASSETPROCTITLE 1 /* setproctitle is in libc */ - # else - # define SETPROCTITLE 1 - # endif # include # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ # ifndef LA_TYPE # define LA_TYPE LA_SUBR # endif #endif --- 400,421 ---- #ifdef __bsdi__ # define HASUNSETENV 1 /* has the unsetenv(3) call */ # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ # include # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ + # define SFS_TYPE SFS_MOUNT /* use statfs() impl */ # ifndef LA_TYPE # define LA_TYPE LA_SUBR # endif + # if defined(_BSDI_VERSION) && _BSDI_VERSION >= 199312 + /* version 1.1 or later */ + # define HASSETPROCTITLE 1 /* setproctitle is in libc */ + # undef SETPROCTITLE /* so don't redefine it in conf.c */ + # else + /* version 1.0 or earlier */ + # ifndef OLD_NEWDB + # define OLD_NEWDB 1 /* old version of newdb library */ + # endif + # endif #endif *************** *** 420,425 **** --- 431,439 ---- #if defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) # define HASUNSETENV 1 /* has unsetenv(3) call */ # define HASSETSID 1 /* has the setsid(2) POSIX syscall */ + # ifdef __NetBSD__ + # define HASUNAME 1 /* has uname(2) syscall */ + # endif # include # define ERRLIST_PREDEFINED /* don't declare sys_errlist */ # ifndef LA_TYPE *************** *** 502,507 **** --- 516,522 ---- #ifdef _SCO_unix_4_2 # define _SCO_unix_ # define HASSETREUID 1 /* has setreuid(2) call */ + # define NEEDFSYNC 1 /* needs the fsync(2) call stub */ # define _PATH_UNIX "/unix" # ifndef _PATH_SENDMAILCF # define _PATH_SENDMAILCF "/usr/lib/sendmail.cf" *************** *** 818,825 **** --- 833,901 ---- #endif + /* + ** UnixWare + ** + ** From Evan Champion . + */ + #ifdef UNIXWARE + # define SYSTEM5 1 + # ifndef HASGETUSERSHELL + # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ + # endif + # define GIDSET_T int + # define SLEEP_T int + # define SFS_TYPE SFS_STATVFS + # define LA_TYPE LA_ZERO + # undef WIFEXITED + # undef WEXITSTATUS + # define _PATH_UNIX "/unix" + # ifndef _PATH_SENDMAILCF + # define _PATH_SENDMAILCF "/usr/ucblib/sendmail.cf" + # endif + # ifndef _PATH_SENDMAILPID + # define _PATH_SENDMAILPID "/usr/ucblib/sendmail.pid" + # endif + # define SYSLOG_BUFSIZE 128 + #endif + + /* + ** Intergraph CLIX 3.1 + ** + ** From Paul Southworth + */ + + #ifdef CLIX + # define SYSTEM5 1 /* looks like System V */ + # ifndef HASGETUSERSHELL + # define HASGETUSERSHELL 0 /* does not have getusershell(3) call */ + # endif + # define DEV_BSIZE 512 /* device block size not defined */ + # define GIDSET_T gid_t + # undef LOG /* syslog not available */ + # define NEEDFSYNC 1 /* no fsync in system library */ + # define GETSHORT _getshort + #endif + + + /* + ** NCR 3000 Series (SysVr4) + ** + ** From From: Kevin Darcy . + */ + + #ifdef NCR3000 + # define __svr4__ + # undef BSD + # define LA_AVENRUN "avenrun" + #endif + + + + + /********************************************************************** ** End of Per-Operating System defines **********************************************************************/ *************** *** 925,930 **** --- 1001,1010 ---- #ifndef HASFLOCK # define HASFLOCK 0 /* assume no flock(2) support */ + #endif + + #ifndef OLD_NEWDB + # define OLD_NEWDB 0 /* assume newer version of newdb */ #endif *** src/daemon.c.OLD Sun Mar 13 09:21:18 1994 --- src/daemon.c Mon Apr 18 06:48:24 1994 *************** *** 37,45 **** #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.39 (Berkeley) 3/13/94 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.39 (Berkeley) 3/13/94 (without daemon mode)"; #endif #endif /* not lint */ --- 37,45 ---- #ifndef lint #ifdef DAEMON ! static char sccsid[] = "@(#)daemon.c 8.48 (Berkeley) 4/18/94 (with daemon mode)"; #else ! static char sccsid[] = "@(#)daemon.c 8.48 (Berkeley) 4/18/94 (without daemon mode)"; #endif #endif /* not lint */ *************** *** 109,118 **** getrequests() { int t; - int on = 1; bool refusingconnections = TRUE; FILE *pidf; int socksize; extern void reapchild(); /* --- 109,120 ---- getrequests() { int t; bool refusingconnections = TRUE; FILE *pidf; int socksize; + #ifdef XDEBUG + bool j_has_dot; + #endif extern void reapchild(); /* *************** *** 145,206 **** printf("getrequests: port 0x%x\n", DaemonAddr.sin.sin_port); /* get a socket for the SMTP connection */ ! DaemonSocket = socket(DaemonAddr.sa.sa_family, SOCK_STREAM, 0); ! if (DaemonSocket < 0) ! { ! /* probably another daemon already */ ! syserr("getrequests: can't create socket"); ! severe: ! # ifdef LOG ! if (LogLevel > 0) ! syslog(LOG_ALERT, "problem creating SMTP socket"); ! # endif /* LOG */ ! finis(); ! } - /* turn on network debugging? */ - if (tTd(15, 101)) - (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on); - - (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof on); - (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, sizeof on); - - #ifdef SO_RCVBUF - if (TcpRcvBufferSize > 0) - { - if (setsockopt(DaemonSocket, SOL_SOCKET, SO_RCVBUF, - (char *) &TcpRcvBufferSize, - sizeof(TcpRcvBufferSize)) < 0) - syserr("getrequests: setsockopt(SO_RCVBUF)"); - } - #endif - - switch (DaemonAddr.sa.sa_family) - { - # ifdef NETINET - case AF_INET: - socksize = sizeof DaemonAddr.sin; - break; - # endif - - # ifdef NETISO - case AF_ISO: - socksize = sizeof DaemonAddr.siso; - break; - # endif - - default: - socksize = sizeof DaemonAddr; - break; - } - - if (bind(DaemonSocket, &DaemonAddr.sa, socksize) < 0) - { - syserr("getrequests: cannot bind"); - (void) close(DaemonSocket); - goto severe; - } - (void) setsignal(SIGCHLD, reapchild); /* write the pid to the log file for posterity */ --- 147,154 ---- printf("getrequests: port 0x%x\n", DaemonAddr.sin.sin_port); /* get a socket for the SMTP connection */ ! socksize = opendaemonsocket(TRUE); (void) setsignal(SIGCHLD, reapchild); /* write the pid to the log file for posterity */ *************** *** 219,225 **** --- 167,181 ---- fclose(pidf); } + #ifdef XDEBUG + { + char jbuf[MAXHOSTNAMELEN]; + expand("\201j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv); + j_has_dot = strchr(jbuf, '.') != NULL; + } + #endif + if (tTd(15, 1)) printf("getrequests: %d\n", DaemonSocket); *************** *** 233,247 **** CurrentLA = getla(); if (refuseconnections()) { ! if (!refusingconnections) { ! /* don't queue so peer will fail quickly */ ! (void) listen(DaemonSocket, 0); ! refusingconnections = TRUE; } setproctitle("rejecting connections: load average: %d", CurrentLA); ! sleep(5); continue; } --- 189,204 ---- CurrentLA = getla(); if (refuseconnections()) { ! if (DaemonSocket >= 0) { ! /* close socket so peer will fail quickly */ ! (void) close(DaemonSocket); ! DaemonSocket = -1; } + refusingconnections = TRUE; setproctitle("rejecting connections: load average: %d", CurrentLA); ! sleep(15); continue; } *************** *** 248,263 **** if (refusingconnections) { /* start listening again */ ! if (listen(DaemonSocket, ListenQueueSize) < 0) ! { ! syserr("getrequests: cannot listen"); ! (void) close(DaemonSocket); ! goto severe; ! } setproctitle("accepting connections"); refusingconnections = FALSE; } /* wait for a connection */ do { --- 205,238 ---- if (refusingconnections) { /* start listening again */ ! (void) opendaemonsocket(FALSE); setproctitle("accepting connections"); refusingconnections = FALSE; } + #ifdef XDEBUG + /* check for disaster */ + { + register STAB *s; + char jbuf[MAXHOSTNAMELEN]; + + expand("\201j", jbuf, &jbuf[sizeof jbuf - 1], CurEnv); + if ((s = stab(jbuf, ST_CLASS, ST_FIND)) == NULL || + !bitnset('w', s->s_class)) + { + dumpstate("daemon lost $j"); + syslog(LOG_ALERT, "daemon process doesn't have $j in $=w; see syslog"); + abort(); + } + else if (j_has_dot && strchr(jbuf, '.') == NULL) + { + dumpstate("daemon $j lost dot"); + syslog(LOG_ALERT, "daemon process $j lost dot; see syslog"); + abort(); + } + } + #endif + /* wait for a connection */ do { *************** *** 349,354 **** --- 324,441 ---- /*NOTREACHED*/ } /* + ** OPENDAEMONSOCKET -- open the SMTP socket + ** + ** Deals with setting all appropriate options. DaemonAddr must + ** be set up in advance. + ** + ** Parameters: + ** firsttime -- set if this is the initial open. + ** + ** Returns: + ** Size in bytes of the daemon socket addr. + ** + ** Side Effects: + ** Leaves DaemonSocket set to the open socket. + ** Exits if the socket cannot be created. + */ + + #define MAXOPENTRIES 10 /* maximum number of tries to open connection */ + + int + opendaemonsocket(firsttime) + bool firsttime; + { + int on = 1; + int socksize; + int ntries = 0; + int saveerrno; + + if (tTd(15, 2)) + printf("opendaemonsocket()\n"); + + do + { + if (ntries > 0) + sleep(5); + if (firsttime || DaemonSocket < 0) + { + DaemonSocket = socket(DaemonAddr.sa.sa_family, SOCK_STREAM, 0); + if (DaemonSocket < 0) + { + /* probably another daemon already */ + saveerrno = errno; + syserr("opendaemonsocket: can't create server SMTP socket"); + severe: + # ifdef LOG + if (LogLevel > 0) + syslog(LOG_ALERT, "problem creating SMTP socket"); + # endif /* LOG */ + DaemonSocket = -1; + continue; + } + + /* turn on network debugging? */ + if (tTd(15, 101)) + (void) setsockopt(DaemonSocket, SOL_SOCKET, + SO_DEBUG, (char *)&on, + sizeof on); + + (void) setsockopt(DaemonSocket, SOL_SOCKET, + SO_REUSEADDR, (char *)&on, sizeof on); + (void) setsockopt(DaemonSocket, SOL_SOCKET, + SO_KEEPALIVE, (char *)&on, sizeof on); + + #ifdef SO_RCVBUF + if (TcpRcvBufferSize > 0) + { + if (setsockopt(DaemonSocket, SOL_SOCKET, + SO_RCVBUF, + (char *) &TcpRcvBufferSize, + sizeof(TcpRcvBufferSize)) < 0) + syserr("getrequests: setsockopt(SO_RCVBUF)"); + } + #endif + + switch (DaemonAddr.sa.sa_family) + { + # ifdef NETINET + case AF_INET: + socksize = sizeof DaemonAddr.sin; + break; + # endif + + # ifdef NETISO + case AF_ISO: + socksize = sizeof DaemonAddr.siso; + break; + # endif + + default: + socksize = sizeof DaemonAddr; + break; + } + + if (bind(DaemonSocket, &DaemonAddr.sa, socksize) < 0) + { + saveerrno = errno; + syserr("getrequests: cannot bind"); + (void) close(DaemonSocket); + goto severe; + } + } + if (!firsttime && listen(DaemonSocket, ListenQueueSize) < 0) + { + saveerrno = errno; + syserr("getrequests: cannot listen"); + (void) close(DaemonSocket); + goto severe; + } + return socksize; + } while (ntries++ < MAXOPENTRIES && transienterror(saveerrno)); + finis(); + } + /* ** CLRDAEMON -- reset the daemon connection ** ** Parameters: *************** *** 740,746 **** if (tTd(16, 101)) { int on = 1; ! (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on); } if (CurEnv->e_xfp != NULL) --- 827,833 ---- if (tTd(16, 101)) { int on = 1; ! (void) setsockopt(s, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on); } if (CurEnv->e_xfp != NULL) *************** *** 828,856 **** (void) strcpy(hostbuf, "localhost"); } hp = gethostbyname(hostbuf); ! if (hp != NULL) { ! (void) strncpy(hostbuf, hp->h_name, size - 1); ! hostbuf[size - 1] = '\0'; ! if (hp->h_addrtype == AF_INET && hp->h_length == 4) { ! register int i; ! for (i = 0; hp->h_addr_list[i] != NULL; i++) ! { ! char ipbuf[100]; ! sprintf(ipbuf, "[%s]", ! inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); ! setclass('w', ipbuf); ! } ! } ! return (hp->h_aliases); } ! else ! return (NULL); } /* ** GETAUTHINFO -- get the real host name asociated with a file descriptor --- 915,962 ---- (void) strcpy(hostbuf, "localhost"); } hp = gethostbyname(hostbuf); ! if (hp == NULL) { ! syserr("!My host name (%s) does not seem to exist!", hostbuf); ! } ! (void) strncpy(hostbuf, hp->h_name, size - 1); ! hostbuf[size - 1] = '\0'; ! #if NAMED_BIND ! /* if still no dot, try DNS directly (i.e., avoid NIS problems) */ ! if (strchr(hostbuf, '.') == NULL) ! { ! extern bool getcanonname(); ! extern int h_errno; ! ! /* try twice in case name server not yet started up */ ! if (!getcanonname(hostbuf, size, TRUE) && ! UseNameServer && ! (h_errno != TRY_AGAIN || ! (sleep(30), !getcanonname(hostbuf, size, TRUE)))) { ! errno = h_errno + E_DNSBASE; ! syserr("!My host name (%s) not known to DNS", ! hostbuf); ! } ! } ! #endif ! if (hp->h_addrtype == AF_INET && hp->h_length == 4) ! { ! register int i; ! for (i = 0; hp->h_addr_list[i] != NULL; i++) ! { ! char ipbuf[100]; ! sprintf(ipbuf, "[%s]", ! inet_ntoa(*((struct in_addr *) hp->h_addr_list[i]))); ! setclass('w', ipbuf); ! } } ! ! return (hp->h_aliases); } /* ** GETAUTHINFO -- get the real host name asociated with a file descriptor *************** *** 880,886 **** getauthinfo(fd) int fd; { - SOCKADDR fa; int falen; register char *p; #if IDENTPROTO --- 986,991 ---- *************** *** 895,903 **** extern char *hostnamebyanyaddr(); extern char RealUserName[]; /* main.c */ ! falen = sizeof fa; ! if (getpeername(fd, &fa.sa, &falen) < 0 || falen <= 0 || ! fa.sa.sa_family == 0) { (void) sprintf(hbuf, "%s@localhost", RealUserName); if (tTd(9, 1)) --- 1000,1008 ---- extern char *hostnamebyanyaddr(); extern char RealUserName[]; /* main.c */ ! falen = sizeof RealHostAddr; ! if (getpeername(fd, &RealHostAddr.sa, &falen) < 0 || falen <= 0 || ! RealHostAddr.sa.sa_family == 0) { (void) sprintf(hbuf, "%s@localhost", RealUserName); if (tTd(9, 1)) *************** *** 905,916 **** return hbuf; } #if IDENTPROTO if (TimeOuts.to_ident == 0) goto noident; lalen = sizeof la; ! if (fa.sa.sa_family != AF_INET || getsockname(fd, &la.sa, &lalen) < 0 || lalen <= 0 || la.sa.sa_family != AF_INET) { --- 1010,1027 ---- return hbuf; } + if (RealHostName == NULL) + { + /* translate that to a host name */ + RealHostName = newstr(hostnamebyanyaddr(&RealHostAddr)); + } + #if IDENTPROTO if (TimeOuts.to_ident == 0) goto noident; lalen = sizeof la; ! if (RealHostAddr.sa.sa_family != AF_INET || getsockname(fd, &la.sa, &lalen) < 0 || lalen <= 0 || la.sa.sa_family != AF_INET) { *************** *** 920,926 **** /* create ident query */ (void) sprintf(hbuf, "%d,%d\r\n", ! ntohs(fa.sin.sin_port), ntohs(la.sin.sin_port)); /* create local address */ la.sin.sin_port = 0; --- 1031,1037 ---- /* create ident query */ (void) sprintf(hbuf, "%d,%d\r\n", ! ntohs(RealHostAddr.sin.sin_port), ntohs(la.sin.sin_port)); /* create local address */ la.sin.sin_port = 0; *************** *** 928,936 **** /* create foreign address */ sp = getservbyname("auth", "tcp"); if (sp != NULL) ! fa.sin.sin_port = sp->s_port; else ! fa.sin.sin_port = htons(113); s = -1; if (setjmp(CtxAuthTimeout) != 0) --- 1039,1047 ---- /* create foreign address */ sp = getservbyname("auth", "tcp"); if (sp != NULL) ! RealHostAddr.sin.sin_port = sp->s_port; else ! RealHostAddr.sin.sin_port = htons(113); s = -1; if (setjmp(CtxAuthTimeout) != 0) *************** *** 951,957 **** goto noident; } if (bind(s, &la.sa, sizeof la.sin) < 0 || ! connect(s, &fa.sa, sizeof fa.sin) < 0) { goto closeident; } --- 1062,1068 ---- goto noident; } if (bind(s, &la.sa, sizeof la.sin) < 0 || ! connect(s, &RealHostAddr.sa, sizeof RealHostAddr.sin) < 0) { goto closeident; } *** src/deliver.c.OLD Fri Apr 8 08:36:53 1994 --- src/deliver.c Mon Apr 18 15:30:37 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.78 (Berkeley) 3/11/94"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)deliver.c 8.82 (Berkeley) 4/18/94"; #endif /* not lint */ #include "sendmail.h" *************** *** 232,238 **** ee->e_header = copyheader(e->e_header); ee->e_sendqueue = copyqueue(e->e_sendqueue); ee->e_errorqueue = copyqueue(e->e_errorqueue); ! ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS); setsender(owner, ee, NULL, TRUE); if (tTd(13, 5)) { --- 232,239 ---- ee->e_header = copyheader(e->e_header); ee->e_sendqueue = copyqueue(e->e_sendqueue); ee->e_errorqueue = copyqueue(e->e_errorqueue); ! ee->e_flags = e->e_flags & ~(EF_INQUEUE|EF_CLRQUEUE|EF_FATALERRS|EF_SENDRECEIPT); ! ee->e_flags |= EF_NORECEIPT; setsender(owner, ee, NULL, TRUE); if (tTd(13, 5)) { *************** *** 289,294 **** --- 290,296 ---- } e->e_from.q_flags |= QDONTSEND; e->e_errormode = EM_MAIL; + e->e_flags |= EF_NORECEIPT; } # ifdef QUEUE *************** *** 1296,1301 **** --- 1298,1306 ---- } env[i++] = NULL; + /* run disconnected from terminal */ + (void) setsid(); + /* try to execute the mailer */ execve(m->m_mailer, pv, env); saveerrno = errno; *************** *** 1855,1861 **** (void) strcat(bp, "]"); # endif } ! else { char *p = macvalue('h', e); --- 1860,1866 ---- (void) strcat(bp, "]"); # endif } ! else if (strcmp(stat, "queued") != 0) { char *p = macvalue('h', e); *************** *** 1961,1967 **** (void) strcat(buf, "]"); # endif } ! else { char *p = macvalue('h', e); --- 1966,1972 ---- (void) strcat(buf, "]"); # endif } ! else if (strcmp(stat, "queued") != 0) { char *p = macvalue('h', e); *** src/envelope.c.OLD Fri Feb 25 20:33:10 1994 --- src/envelope.c Thu Apr 14 09:40:55 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.33 (Berkeley) 2/10/94"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)envelope.c 8.34 (Berkeley) 4/14/94"; #endif /* not lint */ #include "sendmail.h" *************** *** 210,216 **** ** Send back return receipts as requested. */ ! if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags)) { auto ADDRESS *rlist = NULL; --- 210,217 ---- ** Send back return receipts as requested. */ ! if (e->e_receiptto != NULL && bitset(EF_SENDRECEIPT, e->e_flags) ! && !bitset(PRIV_NORECEIPTS, PrivacyFlags)) { auto ADDRESS *rlist = NULL; *** src/headers.c.OLD Wed Mar 2 15:35:54 1994 --- src/headers.c Thu Apr 14 09:42:52 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.30 (Berkeley) 2/25/94"; #endif /* not lint */ # include --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)headers.c 8.32 (Berkeley) 4/14/94"; #endif /* not lint */ # include *************** *** 530,535 **** --- 530,536 ---- register ENVELOPE *e; char *msgid; { + # ifdef LOG char *name; register char *sbp; register char *p; *************** *** 604,609 **** --- 605,611 ---- } syslog(LOG_INFO, "%s relay=%s", sbuf, name); # endif + # endif } /* ** PRIENCODE -- encode external priority names into internal values. *************** *** 951,956 **** --- 953,967 ---- { if (tTd(34, 11)) printf(" (skipped (resent))\n"); + continue; + } + + /* suppress return receipts if requested */ + if (bitset(H_RECEIPTTO, h->h_flags) && + bitset(EF_NORECEIPT, e->e_flags)) + { + if (tTd(34, 11)) + printf(" (skipped (receipt))\n"); continue; } *** src/main.c.OLD Mon Mar 21 13:05:16 1994 --- src/main.c Sun Apr 17 10:26:47 1994 *************** *** 39,45 **** #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.52 (Berkeley) 3/11/94"; #endif /* not lint */ #define _DEFINE --- 39,45 ---- #endif /* not lint */ #ifndef lint ! static char sccsid[] = "@(#)main.c 8.55 (Berkeley) 4/15/94"; #endif /* not lint */ #define _DEFINE *************** *** 154,160 **** extern char *getcfname(); extern char *optarg; extern char **environ; ! extern void dumpstate(); /* ** Check to see if we reentered. --- 154,160 ---- extern char *getcfname(); extern char *optarg; extern char **environ; ! extern void sigusr1(); /* ** Check to see if we reentered. *************** *** 174,180 **** /* arrange to dump state on signal */ #ifdef SIGUSR1 ! setsignal(SIGUSR1, dumpstate); #endif /* in 4.4BSD, the table can be huge; impose a reasonable limit */ --- 174,180 ---- /* arrange to dump state on signal */ #ifdef SIGUSR1 ! setsignal(SIGUSR1, sigusr1); #endif /* in 4.4BSD, the table can be huge; impose a reasonable limit */ *************** *** 187,193 **** ** But also be sure that 0, 1, & 2 are open. */ ! i = open("/dev/null", O_RDWR); if (fstat(STDIN_FILENO, &stb) < 0 && errno != EOPNOTSUPP) (void) dup2(i, STDIN_FILENO); if (fstat(STDOUT_FILENO, &stb) < 0 && errno != EOPNOTSUPP) --- 187,193 ---- ** But also be sure that 0, 1, & 2 are open. */ ! i = open("/dev/null", O_RDWR, 0); if (fstat(STDIN_FILENO, &stb) < 0 && errno != EOPNOTSUPP) (void) dup2(i, STDIN_FILENO); if (fstat(STDOUT_FILENO, &stb) < 0 && errno != EOPNOTSUPP) *************** *** 205,214 **** } errno = 0; ! #ifdef LOG_MAIL openlog("sendmail", LOG_PID, LOG_MAIL); ! #else openlog("sendmail", LOG_PID); #endif /* set up the blank envelope */ --- 205,216 ---- } errno = 0; ! #ifdef LOG ! # ifdef LOG_MAIL openlog("sendmail", LOG_PID, LOG_MAIL); ! # else openlog("sendmail", LOG_PID); + # endif #endif /* set up the blank envelope */ *************** *** 985,991 **** --- 987,995 ---- if (tTd(0, 1)) strcat(dtype, "+debugging"); + #ifdef LOG syslog(LOG_INFO, "starting daemon (%s): %s", Version, dtype + 1); + #endif #ifdef XLA xla_create_file(); #endif *************** *** 1424,1445 **** } } /* ! ** DUMPSTATE -- dump state on user signal ** ** For debugging. */ void ! dumpstate() { #ifdef LOG register char *j = macvalue('j', CurEnv); register STAB *s; ! syslog(LOG_DEBUG, "--- dumping state on user signal: $j = %s ---", j); ! s = stab(j, ST_CLASS, ST_FIND); ! if (s == NULL || !bitnset('w', s->s_class)) ! syslog(LOG_DEBUG, "*** $j not in $=w ***"); syslog(LOG_DEBUG, "--- open file descriptors: ---"); printopenfds(TRUE); syslog(LOG_DEBUG, "--- connection cache: ---"); --- 1428,1455 ---- } } /* ! ** DUMPSTATE -- dump state ** ** For debugging. */ void ! dumpstate(when) ! char *when; { #ifdef LOG register char *j = macvalue('j', CurEnv); register STAB *s; ! syslog(LOG_DEBUG, "--- dumping state on %s: $j = %s ---", ! when, ! j == NULL ? "" : j); ! if (j != NULL) ! { ! s = stab(j, ST_CLASS, ST_FIND); ! if (s == NULL || !bitnset('w', s->s_class)) ! syslog(LOG_DEBUG, "*** $j not in $=w ***"); ! } syslog(LOG_DEBUG, "--- open file descriptors: ---"); printopenfds(TRUE); syslog(LOG_DEBUG, "--- connection cache: ---"); *************** *** 1459,1462 **** --- 1469,1479 ---- } syslog(LOG_DEBUG, "--- end of state dump ---"); #endif + } + + + void + sigusr1() + { + dumpstate("user signal"); } *** src/map.c.OLD Fri Apr 8 08:37:27 1994 --- src/map.c Sun Apr 17 07:05:52 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.22 (Berkeley) 2/18/94"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)map.c 8.25 (Berkeley) 4/17/94"; #endif /* not lint */ #include "sendmail.h" *************** *** 575,580 **** --- 575,583 ---- ndbm_map_close(map) register MAP *map; { + if (tTd(38, 9)) + printf("ndbm_map_close(%s, %x)\n", map->map_file, map->map_mflags); + if (bitset(MF_WRITABLE, map->map_mflags)) { #ifdef NIS *************** *** 640,646 **** omode |= O_CREAT|O_TRUNC; #if defined(O_EXLOCK) && HASFLOCK omode |= O_EXLOCK; ! # if !defined(OLD_NEWDB) } else { --- 643,649 ---- omode |= O_CREAT|O_TRUNC; #if defined(O_EXLOCK) && HASFLOCK omode |= O_EXLOCK; ! # if !OLD_NEWDB } else { *************** *** 664,670 **** syserr("Cannot open BTREE database %s", map->map_file); return FALSE; } ! #if !defined(OLD_NEWDB) && HASFLOCK fd = db->fd(db); # if !defined(O_EXLOCK) if (mode == O_RDWR && fd >= 0) --- 667,673 ---- syserr("Cannot open BTREE database %s", map->map_file); return FALSE; } ! #if !OLD_NEWDB && HASFLOCK fd = db->fd(db); # if !defined(O_EXLOCK) if (mode == O_RDWR && fd >= 0) *************** *** 682,688 **** /* try to make sure that at least the database header is on disk */ if (mode == O_RDWR) ! #ifdef OLD_NEWDB (void) db->sync(db); #else (void) db->sync(db, 0); --- 685,691 ---- /* try to make sure that at least the database header is on disk */ if (mode == O_RDWR) ! #if OLD_NEWDB (void) db->sync(db); #else (void) db->sync(db, 0); *************** *** 724,730 **** omode |= O_CREAT|O_TRUNC; #if defined(O_EXLOCK) && HASFLOCK omode |= O_EXLOCK; ! # if !defined(OLD_NEWDB) } else { --- 727,733 ---- omode |= O_CREAT|O_TRUNC; #if defined(O_EXLOCK) && HASFLOCK omode |= O_EXLOCK; ! # if !OLD_NEWDB } else { *************** *** 748,754 **** syserr("Cannot open HASH database %s", map->map_file); return FALSE; } ! #if !defined(OLD_NEWDB) && HASFLOCK fd = db->fd(db); # if !defined(O_EXLOCK) if (mode == O_RDWR && fd >= 0) --- 751,757 ---- syserr("Cannot open HASH database %s", map->map_file); return FALSE; } ! #if !OLD_NEWDB && HASFLOCK fd = db->fd(db); # if !defined(O_EXLOCK) if (mode == O_RDWR && fd >= 0) *************** *** 766,772 **** /* try to make sure that at least the database header is on disk */ if (mode == O_RDWR) ! #ifdef OLD_NEWDB (void) db->sync(db); #else (void) db->sync(db, 0); --- 769,775 ---- /* try to make sure that at least the database header is on disk */ if (mode == O_RDWR) ! #if OLD_NEWDB (void) db->sync(db); #else (void) db->sync(db, 0); *************** *** 811,817 **** bcopy(name, keybuf, key.size + 1); if (!bitset(MF_NOFOLDCASE, map->map_mflags)) makelower(keybuf); ! #ifndef OLD_NEWDB fd = db->fd(db); if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags)) (void) lockfile(db->fd(db), map->map_file, ".db", LOCK_SH); --- 814,820 ---- bcopy(name, keybuf, key.size + 1); if (!bitset(MF_NOFOLDCASE, map->map_mflags)) makelower(keybuf); ! #if !OLD_NEWDB fd = db->fd(db); if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags)) (void) lockfile(db->fd(db), map->map_file, ".db", LOCK_SH); *************** *** 831,837 **** map->map_mflags &= ~MF_TRY0NULL; } saveerrno = errno; ! #ifndef OLD_NEWDB if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags)) (void) lockfile(fd, map->map_file, ".db", LOCK_UN); #endif --- 834,840 ---- map->map_mflags &= ~MF_TRY0NULL; } saveerrno = errno; ! #if !OLD_NEWDB if (fd >= 0 && !bitset(MF_LOCKED, map->map_mflags)) (void) lockfile(fd, map->map_file, ".db", LOCK_UN); #endif *************** *** 973,980 **** yperr = yp_get_default_domain(&map->map_domain); if (yperr != 0) { ! syserr("NIS map %s specified, but NIS not running\n", ! map->map_file); return FALSE; } } --- 976,984 ---- yperr = yp_get_default_domain(&map->map_domain); if (yperr != 0) { ! if (!bitset(MF_OPTIONAL, map->map_mflags)) ! syserr("NIS map %s specified, but NIS not running\n", ! map->map_file); return FALSE; } } *** src/mci.c.OLD Wed Feb 9 07:40:15 1994 --- src/mci.c Tue Apr 12 08:38:44 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)mci.c 8.12 (Berkeley) 2/9/94"; #endif /* not lint */ #include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)mci.c 8.13 (Berkeley) 4/12/94"; #endif /* not lint */ #include "sendmail.h" *************** *** 367,375 **** --- 367,377 ---- mci->mci_host == NULL ? "NULL" : mci->mci_host, ctime(&mci->mci_lastuse)); printit: + #ifdef LOG if (logit) syslog(LOG_DEBUG, "%s", buf); else + #endif printf("%s\n", buf); } /* *** src/parseaddr.c.OLD Wed Feb 9 11:32:30 1994 --- src/parseaddr.c Fri Apr 15 09:27:16 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)parseaddr.c 8.30 (Berkeley) 2/9/94"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)parseaddr.c 8.31 (Berkeley) 4/15/94"; #endif /* not lint */ # include "sendmail.h" *************** *** 132,138 **** if (savec != '\0') **delimptr = '\0'; ! addr = newstr(addr); if (savec != '\0') **delimptr = savec; } --- 132,138 ---- if (savec != '\0') **delimptr = '\0'; ! e->e_to = addr = newstr(addr); if (savec != '\0') **delimptr = savec; } *** src/queue.c.OLD Sun Mar 6 09:00:40 1994 --- src/queue.c Mon Apr 18 15:17:17 1994 *************** *** 36,44 **** #ifndef lint #ifdef QUEUE ! static char sccsid[] = "@(#)queue.c 8.40 (Berkeley) 3/6/94 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.40 (Berkeley) 3/6/94 (without queueing)"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #ifdef QUEUE ! static char sccsid[] = "@(#)queue.c 8.41 (Berkeley) 4/18/94 (with queueing)"; #else ! static char sccsid[] = "@(#)queue.c 8.41 (Berkeley) 4/18/94 (without queueing)"; #endif #endif /* not lint */ *************** *** 179,185 **** e->e_df = queuename(e, 'd'); e->e_df = newstr(e->e_df); ! fd = open(e->e_df, O_WRONLY|O_CREAT, FileMode); if (fd < 0 || (dfp = fdopen(fd, "w")) == NULL) syserr("!queueup: cannot create data temp file %s, uid=%d", e->e_df, geteuid()); --- 179,185 ---- e->e_df = queuename(e, 'd'); e->e_df = newstr(e->e_df); ! fd = open(e->e_df, O_WRONLY|O_CREAT|O_TRUNC, FileMode); if (fd < 0 || (dfp = fdopen(fd, "w")) == NULL) syserr("!queueup: cannot create data temp file %s, uid=%d", e->e_df, geteuid()); *** src/sendmail.h.OLD Sun Feb 6 14:07:22 1994 --- src/sendmail.h Thu Apr 14 08:31:24 1994 *************** *** 31,37 **** * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)sendmail.h 8.41 (Berkeley) 2/6/94 */ /* --- 31,37 ---- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ! * @(#)sendmail.h 8.43 (Berkeley) 4/14/94 */ /* *************** *** 41,47 **** # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.41 2/6/94"; # endif # else /* _DEFINE */ # define EXTERN extern --- 41,47 ---- # ifdef _DEFINE # define EXTERN # ifndef lint ! static char SmailSccsId[] = "@(#)sendmail.h 8.43 4/14/94"; # endif # else /* _DEFINE */ # define EXTERN extern *************** *** 377,382 **** --- 377,383 ---- #define EF_PM_NOTIFY 0x0002000 /* send return mail to postmaster */ #define EF_METOO 0x0004000 /* send to me too */ #define EF_LOGSENDER 0x0008000 /* need to log the sender */ + #define EF_NORECEIPT 0x0010000 /* suppress all return-receipts */ EXTERN ENVELOPE *CurEnv; /* envelope currently being processed */ /* *************** *** 704,709 **** --- 705,711 ---- #define PRIV_NOEXPN 00010 /* disallow EXPN command entirely */ #define PRIV_NOVRFY 00020 /* disallow VRFY command entirely */ #define PRIV_AUTHWARNINGS 00040 /* flag possible authorization probs */ + #define PRIV_NORECEIPTS 00100 /* disallow return receipts */ #define PRIV_RESTRICTMAILQ 01000 /* restrict mailq command */ #define PRIV_RESTRICTQRUN 02000 /* restrict queue run */ #define PRIV_GOAWAY 00777 /* don't give no info, anyway, anyhow */ *** src/srvrsmtp.c.OLD Fri Apr 8 08:35:38 1994 --- src/srvrsmtp.c Wed Apr 13 08:57:39 1994 *************** *** 36,44 **** #ifndef lint #ifdef SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.32 (Berkeley) 3/8/94 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.32 (Berkeley) 3/8/94 (without SMTP)"; #endif #endif /* not lint */ --- 36,44 ---- #ifndef lint #ifdef SMTP ! static char sccsid[] = "@(#)srvrsmtp.c 8.37 (Berkeley) 4/13/94 (with SMTP)"; #else ! static char sccsid[] = "@(#)srvrsmtp.c 8.37 (Berkeley) 4/13/94 (without SMTP)"; #endif #endif /* not lint */ *************** *** 135,141 **** bool vrfy; /* set if this is a vrfy command */ char *protocol; /* sending protocol */ char *sendinghost; /* sending hostname */ ! long msize; /* approximate maximum message size */ char *peerhostname; /* name of SMTP peer or "localhost" */ auto char *delimptr; char *id; --- 135,141 ---- bool vrfy; /* set if this is a vrfy command */ char *protocol; /* sending protocol */ char *sendinghost; /* sending hostname */ ! unsigned long msize; /* approximate maximum message size */ char *peerhostname; /* name of SMTP peer or "localhost" */ auto char *delimptr; char *id; *************** *** 165,175 **** expand("\201e", inp, &inp[sizeof inp], e); if (BrokenSmtpPeers) { message("220 %s", inp); } else { ! message("220-%s", inp); message("220 ESMTP spoken here"); } protocol = NULL; --- 165,187 ---- expand("\201e", inp, &inp[sizeof inp], e); if (BrokenSmtpPeers) { + p = strchr(inp, '\n'); + if (p != NULL) + *p = '\0'; message("220 %s", inp); } else { ! char *q = inp; ! ! while (q != NULL) ! { ! p = strchr(q, '\n'); ! if (p != NULL) ! *p++ = '\0'; ! message("220-%s", q); ! q = p; ! } message("220 ESMTP spoken here"); } protocol = NULL; *************** *** 285,291 **** /* print extended message and brag */ message("250-%s Hello %s, pleased to meet you", ! MyHostName, p); if (!bitset(PRIV_NOEXPN, PrivacyFlags)) message("250-EXPN"); if (MaxMessageSize > 0) --- 297,303 ---- /* print extended message and brag */ message("250-%s Hello %s, pleased to meet you", ! MyHostName, CurSmtpClient); if (!bitset(PRIV_NOEXPN, PrivacyFlags)) message("250-EXPN"); if (MaxMessageSize > 0) *************** *** 389,395 **** /* now parse ESMTP arguments */ msize = 0; ! for (; p != NULL && *p != '\0'; p++) { char *kp; char *vp = NULL; --- 401,407 ---- /* now parse ESMTP arguments */ msize = 0; ! while (p != NULL && *p != '\0') { char *kp; char *vp = NULL; *************** *** 420,426 **** *p++ = '\0'; if (tTd(19, 1)) ! printf("MAIL: got arg %s=%s\n", kp, vp == NULL ? "" : vp); if (strcasecmp(kp, "size") == 0) --- 432,438 ---- *p++ = '\0'; if (tTd(19, 1)) ! printf("MAIL: got arg %s=\"%s\"\n", kp, vp == NULL ? "" : vp); if (strcasecmp(kp, "size") == 0) *************** *** 430,436 **** usrerr("501 SIZE requires a value"); /* NOTREACHED */ } ! msize = atol(vp); } else if (strcasecmp(kp, "body") == 0) { --- 442,452 ---- usrerr("501 SIZE requires a value"); /* NOTREACHED */ } ! # ifdef __STDC__ ! msize = strtoul(vp, (char **) NULL, 10); ! # else ! msize = strtol(vp, (char **) NULL, 10); ! # endif } else if (strcasecmp(kp, "body") == 0) { *** src/udb.c.OLD Fri Mar 11 14:42:17 1994 --- src/udb.c Thu Apr 14 09:42:55 1994 *************** *** 36,44 **** #ifndef lint #ifdef USERDB ! static char sccsid [] = "@(#)udb.c 8.6 (Berkeley) 3/11/94 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.6 (Berkeley) 3/11/94 (without USERDB)"; #endif #endif --- 36,44 ---- #ifndef lint #ifdef USERDB ! static char sccsid [] = "@(#)udb.c 8.8 (Berkeley) 4/14/94 (with USERDB)"; #else ! static char sccsid [] = "@(#)udb.c 8.8 (Berkeley) 4/14/94 (without USERDB)"; #endif #endif *************** *** 48,53 **** --- 48,57 ---- #include #include + #ifdef HESIOD + #include + #endif /* HESIOD */ + /* ** UDB.C -- interface between sendmail and Berkeley User Data Base. ** *************** *** 94,99 **** --- 98,104 ---- #define UDB_REMOTE 2 /* look up in remote database */ #define UDB_DBFETCH 3 /* look up in local database */ #define UDB_FORWARD 4 /* forward to remote host */ + #define UDB_HESIOD 5 /* look up via hesiod */ #define MAXUDBENT 10 /* maximum number of UDB entries */ *************** *** 164,169 **** --- 169,178 ---- if (UdbSpec == NULL || UdbSpec[0] == '\0') return EX_OK; + /* short circuit name begins with '\\' since it can't possibly match */ + if (a->q_user[0] == '\\') + return EX_OK; + /* if name is too long, assume it won't match */ if (strlen(a->q_user) > sizeof keybuf - 12) return EX_OK; *************** *** 196,202 **** key.data = keybuf; key.size = keylen; if (tTd(28, 80)) ! printf("udbexpand: trying %s (%d)\n", keybuf, keylen); i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR); if (i > 0 || info.size <= 0) --- 205,211 ---- key.data = keybuf; key.size = keylen; if (tTd(28, 80)) ! printf("udbexpand: trying %s (%d) via db\n", keybuf, keylen); i = (*up->udb_dbp->seq)(up->udb_dbp, &key, &info, R_CURSOR); if (i > 0 || info.size <= 0) *************** *** 283,290 **** --- 292,395 ---- a->q_owner = xalloc(info.size + 1); bcopy(info.data, a->q_owner, info.size); a->q_owner[info.size] = '\0'; + + /* announce delivery; NORECEIPT bit set later */ + if (e->e_xfp != NULL) + { + fprintf(e->e_xfp, + "Message delivered to mailing list %s\n", + a->q_paddr); + e->e_flags |= EF_SENDRECEIPT; + } break; + #ifdef HESIOD + case UDB_HESIOD: + key.data = keybuf; + key.size = keylen; + if (tTd(28, 80)) + printf("udbexpand: trying %s (%d) via hesiod\n", + keybuf, keylen); + /* look up the key via hesiod */ + i = hes_udb_get(&key, &info); + if (i > 0 || info.size <= 0) + { + if (tTd(28, 2)) + printf("udbexpand: no match on %s (%d)\n", + keybuf, keylen); + continue; + } + if (tTd(28, 80)) + printf("udbexpand: match %.*s: %.*s\n", + key.size, key.data, info.size, info.data); + a->q_flags &= ~QSELFREF; + + if (bitset(EF_VRFYONLY, e->e_flags)) + { + a->q_flags |= QVERIFIED; + e->e_nrcpts++; + free(info.data); + return EX_OK; + } + + breakout = TRUE; + if (info.size < sizeof buf) + user = buf; + else + user = xalloc(info.size + 1); + bcopy(info.data, user, info.size); + user[info.size] = '\0'; + free(info.data); + + message("hesioded to %s", user); + #ifdef LOG + if (LogLevel >= 10) + syslog(LOG_INFO, "%s: hesiod %s => %s", + e->e_id, e->e_to, user); + #endif + AliasLevel++; + naddrs = sendtolist(user, a, sendq, e); + AliasLevel--; + + if (user != buf) + free(user); + + if (naddrs > 0 && !bitset(QSELFREF, a->q_flags)) + { + if (tTd(28, 5)) + { + printf("udbexpand: QDONTSEND "); + printaddr(a, FALSE); + } + a->q_flags |= QDONTSEND; + } + if (i < 0) + { + syserr("udbexpand: hesiod-get %.*s stat %d", + key.size, key.data, i); + return EX_TEMPFAIL; + } + + /* + ** If this address has a -request address, reflect + ** it into the envelope. + */ + + (void) strcpy(keybuf, a->q_user); + (void) strcat(keybuf, ":mailsender"); + keylen = strlen(keybuf); + key.data = keybuf; + key.size = keylen; + i = hes_udb_get(&key, &info); + if (i != 0 || info.size <= 0) + break; + a->q_owner = xalloc(info.size + 1); + bcopy(info.data, a->q_owner, info.size); + a->q_owner[info.size] = '\0'; + free(info.data); + break; + #endif /* HESIOD */ + case UDB_REMOTE: /* not yet implemented */ continue; *************** *** 378,383 **** --- 483,492 ---- if (UdbSpec == NULL || UdbSpec[0] == '\0') return NULL; + /* short circuit name begins with '\\' since it can't possibly match */ + if (user[0] == '\\') + return NULL; + /* long names can never match and are a pain to deal with */ if ((strlen(user) + strlen(field)) > sizeof keybuf - 4) return NULL; *************** *** 407,413 **** if (i != 0 || info.size <= 0) { if (tTd(28, 2)) ! printf("udbmatch: no match on %s (%d)\n", keybuf, keylen); continue; } --- 516,522 ---- if (i != 0 || info.size <= 0) { if (tTd(28, 2)) ! printf("udbmatch: no match on %s (%d) via db\n", keybuf, keylen); continue; } *************** *** 418,423 **** --- 527,556 ---- if (tTd(28, 1)) printf("udbmatch ==> %s\n", p); return p; + break; + + #ifdef HESIOD + case UDB_HESIOD: + key.data = keybuf; + key.size = keylen; + i = hes_udb_get(&key, &info); + if (i != 0 || info.size <= 0) + { + if (tTd(28, 2)) + printf("udbmatch: no match on %s (%d) via hesiod\n", + keybuf, keylen); + continue; + } + + p = xalloc(info.size + 1); + bcopy(info.data, p, info.size); + p[info.size] = '\0'; + free(info.data); + if (tTd(28, 1)) + printf("udbmatch ==> %s\n", p); + return p; + break; + #endif /* HESIOD */ } } *************** *** 479,484 **** --- 612,665 ---- if (tTd(28, 1)) printf("udbmatch ==> %s\n", p); return p; + break; + + #ifdef HESIOD + case UDB_HESIOD: + /* get the default case for this database */ + if (up->udb_default == NULL) + { + key.data = ":default:mailname"; + key.size = strlen(key.data); + i = hes_udb_get(&key, &info); + + if (i != 0 || info.size <= 0) + { + /* no default case */ + up->udb_default = ""; + continue; + } + + /* save the default case */ + up->udb_default = xalloc(info.size + 1); + bcopy(info.data, up->udb_default, info.size); + up->udb_default[info.size] = '\0'; + free(info.data); + } + else if (up->udb_default[0] == '\0') + continue; + + /* we have a default case -- verify user:maildrop */ + key.data = keybuf; + key.size = keylen; + i = hes_udb_get(&key, &info); + if (i != 0 || info.size <= 0) + { + /* nope -- no aliasing for this user */ + continue; + } + + free(info.data); + /* they exist -- build the actual address */ + p = xalloc(strlen(user) + strlen(up->udb_default) + 2); + (void) strcpy(p, user); + (void) strcat(p, "@"); + (void) strcat(p, up->udb_default); + if (tTd(28, 1)) + printf("udbmatch ==> %s\n", p); + return p; + break; + #endif /* HESIOD */ } } *************** *** 622,627 **** --- 803,818 ---- up++; break; + case 'h': /* use hesiod */ + case 'H': + #ifdef HESIOD + if (strcasecmp(spec, "hesiod") != 0) + break; + up->udb_type = UDB_HESIOD; + up++; + #endif /* HESIOD */ + break; + case '/': /* look up remote name */ up->udb_dbname = spec; errno = 0; *************** *** 669,674 **** --- 860,869 ---- up->udb_fwdhost); break; + case UDB_HESIOD: + printf("HESIOD\n"); + break; + default: printf("UNKNOWN\n"); break; *************** *** 724,729 **** --- 919,975 ---- } return optnum; } + + #ifdef HESIOD + + int + hes_udb_get(key, info) + DBT *key; + DBT *info; + { + char *name, *type; + char *p, **hp; + + name = key->data; + type = strchr(name, ':'); + if (type == NULL) + return 1; + + *type++ = '\0'; + + if (tTd(28, 1)) + printf("hes_udb_get(%s, %s)\n", name, type); + + /* make the hesiod query */ + hp = hes_resolve(name, type); + if (hp == NULL) + { + /* network problem or timeout */ + if (hes_error() == HES_ER_NET) + return -1; + + return 1; + } + else + { + /* + ** If there are multiple matches, just return the + ** first one and free the others. + ** + ** XXX These should really be returned; for example, + ** XXX it is legal for :maildrop to be multi-valued. + */ + + for (p = hp[1]; p; p++) + free(p); + + info->data = hp[0]; + info->size = (size_t) strlen(info->data); + } + + return 0; + } + #endif /* HESIOD */ #else /* not USERDB */ *** src/util.c.OLD Fri Apr 8 08:35:48 1994 --- src/util.c Thu Apr 14 09:58:02 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.34 (Berkeley) 3/11/94"; #endif /* not lint */ # include "sendmail.h" --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)util.c 8.39 (Berkeley) 4/14/94"; #endif /* not lint */ # include "sendmail.h" *************** *** 100,105 **** --- 100,109 ---- { register char *p; + /* some systems can't handle size zero mallocs */ + if (sz <= 0) + sz = 1; + p = malloc((unsigned) sz); if (p == NULL) { *************** *** 836,841 **** --- 840,848 ---- static jmp_buf CtxReadTimeout; static int readtimeout(); + static EVENT *GlobalTimeout = NULL; + static bool EnableTimeout = FALSE; + static int ReadProgress; char * sfgets(buf, siz, fp, timeout, during) *************** *** 873,879 **** #endif return (NULL); } ! ev = setevent(timeout, readtimeout, 0); } /* try to read */ --- 880,889 ---- #endif return (NULL); } ! if (GlobalTimeout == NULL) ! ev = setevent(timeout, readtimeout, 0); ! else ! EnableTimeout = TRUE; } /* try to read */ *************** *** 888,894 **** } /* clear the event if it has not sprung */ ! clrevent(ev); /* clean up the books and exit */ LineNumber++; --- 898,907 ---- } /* clear the event if it has not sprung */ ! if (GlobalTimeout == NULL) ! clrevent(ev); ! else ! EnableTimeout = FALSE; /* clean up the books and exit */ LineNumber++; *************** *** 907,916 **** return (buf); } static ! readtimeout() { ! longjmp(CtxReadTimeout, 1); } /* ** FGETFOLDED -- like fgets, but know about folded lines. --- 920,963 ---- return (buf); } + void + sfgetset(timeout) + time_t timeout; + { + /* cancel pending timer */ + if (GlobalTimeout != NULL) + { + clrevent(GlobalTimeout); + GlobalTimeout = NULL; + } + + /* schedule fresh one if so requested */ + if (timeout != 0) + { + ReadProgress = LineNumber; + GlobalTimeout = setevent(timeout, readtimeout, timeout); + } + } + static ! readtimeout(timeout) ! time_t timeout; { ! /* terminate if ordinary timeout */ ! if (GlobalTimeout == NULL) ! longjmp(CtxReadTimeout, 1); ! ! /* terminate if no progress was made -- reset state */ ! if (EnableTimeout && (LineNumber <= ReadProgress)) ! { ! EnableTimeout = FALSE; ! GlobalTimeout = NULL; ! longjmp(CtxReadTimeout, 2); ! } ! ! /* schedule a new timeout */ ! GlobalTimeout = NULL; ! sfgetset(timeout); } /* ** FGETFOLDED -- like fgets, but know about folded lines. *************** *** 1259,1264 **** --- 1306,1312 ---- { register struct hostent *hp; register char *p; + char *fmtstr; struct sockaddr_in sin; auto int slen; struct stat st; *************** *** 1350,1356 **** default: defprint: ! sprintf(p, "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%ld", major(st.st_dev), minor(st.st_dev), st.st_ino, st.st_nlink, st.st_uid, st.st_gid, st.st_size); break; --- 1398,1408 ---- default: defprint: ! if (sizeof st.st_size > sizeof (long)) ! fmtstr = "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%qd"; ! else ! fmtstr = "dev=%d/%d, ino=%d, nlink=%d, u/gid=%d/%d, size=%ld"; ! sprintf(p, fmtstr, major(st.st_dev), minor(st.st_dev), st.st_ino, st.st_nlink, st.st_uid, st.st_gid, st.st_size); break; *************** *** 1357,1365 **** --- 1409,1419 ---- } printit: + #ifdef LOG if (logit) syslog(LOG_DEBUG, "%s", buf); else + #endif printf("%s\n", buf); } /* *** src/version.c.OLD Fri Apr 8 08:36:32 1994 --- src/version.c Mon Apr 18 22:18:12 1994 *************** *** 33,39 **** */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.6.8.1 (Berkeley) 3/18/94"; #endif /* not lint */ ! char Version[] = "8.6.8.1"; --- 33,39 ---- */ #ifndef lint ! static char sccsid[] = "@(#)version.c 8.6.9.1 (Berkeley) 4/18/94"; #endif /* not lint */ ! char Version[] = "8.6.9";