diff -c ../src.org/COPYRIGHT.WIDE ./COPYRIGHT.WIDE
*** ../src.org/COPYRIGHT.WIDE	Sat Apr  1 14:45:08 1995
--- ./COPYRIGHT.WIDE	Sat Apr  1 14:48:04 1995
***************
*** 0 ****
--- 1,9 ----
+ Copyright (c) 1993 by WIDE Project. All rights reserved.
+ 
+ $B$3$N%Q%C%A$NMxMQ!$J#@=!$JQ99!$:FG[I[$K4X$7$F$J$s$i@)8B$O9T$J$$$^$;$s!%(B
+ $B$?$@$7!$%Q%C%A$K4^$^$l$F$$$kCx:n8"I=<($KJQ99$r9T$J$o$J$$$3$H$r>r7o$H$7(B
+ $B$^$9!%$J$*!$Cx:n8"J]M-<T$O!$K\%Q%C%A;HMQ$K$h$C$FH/@8$7$?!$$$$+$J$kITMx(B
+ $B1W$KBP$7$F$b0l@Z$N@UG$$rIi$$$^$;$s!%(B
+ 
+ 							Jun 29, 1994
+ 							$BCfB<(B $BAGE5(B
diff -c ../src.org/RELEASE_NOTES.WIDE ./RELEASE_NOTES.WIDE
*** ../src.org/RELEASE_NOTES.WIDE	Sat Apr  1 14:45:08 1995
--- ./RELEASE_NOTES.WIDE	Sun Apr 16 20:22:52 1995
***************
*** 0 ****
--- 1,670 ----
+ WIDE's patch kit for R8 sendmail (2.5W beta)		Apr.14,1995
+ 							$BCfB<(B $BAGE5(B/WIDE Project
+ 							motonori@wide.ad.jp
+ 
+ <2.5W $B$K4X$9$kCm0U(B>
+ 
+   $B$3$N%Q%C%A%-%C%H$O(B beta release $B$G$9!%(BDec.12,1994 $B$+$i$[$\(B4$B%u7n4V$K$o$?$j(B
+ $B0BDj$7$FF0:n$7$F$$$^$9$,!$$^$@%P%0$r4^$s$G$$$k2DG=@-$,$"$j$^$9$+$i!$$=$l$r(B
+ $B3P8g$N>eMxMQ$7$F$/$@$5$$!%$^$?!$$3$N%Q%C%A$rMxMQ$7$F!$H/@8$7$?F0:n>e$NLdBj(B
+ $BE@$OI,$::n<T$^$GJs9p$7$FD:$/$h$&$K$*4j$$CW$7$^$9!%(B
+ 
+ 
+ 2.5W$B%Q%C%A$G?7$?$KDs6!$9$k5!G=(B
+ 
+ o MX $B$N%M!<%`%5!<%P$X$NLd$$9g$o$;$rJB9T$7$F9T$$!$>CHq$5$l$k;~4V$rC;=L(B
+   (conf.h $B$N(B CO_RESOLV $B$r(B 0 $B$K$9$k$H!$5!G=$,L58z$K$J$j$^$9(B)
+ o SMTP/TCP $B$N(B connect() $B=hM}$rJB9T$7$F9T$$!$@\B3BT$A;~4V$r:o8:!%(B
+   (conf.h $B$N(B NON_BLOCK_CONNECT $B$r(B 0 $B$K$9$k$H!$5!G=$,L58z$K$J$j$^$9(B)
+ 
+ $BA0<T$N5!G=$rDs6!$9$k$?$a$K!$(Bbind 4.9.3 $B$N(B res_send.c $B$K<j$r2C$($?$b$N$,!$(B
+ $B%Q%C%1!<%8$KE:IU$5$l$F$$$^$9!%$=$N$?$a!$%j%s%/$9$k%j%>%k%P$H$7$F(B bind
+ 4.9.3 $B$N$b$N$r?d>)$7$^$9$,!$(B4.9.2 $B$J$I>/$78E$$%j%>%k%P$G$bLdBj$J$/F0:n(B
+ $B$9$k$H;W$$$^$9!%(B
+ 
+ R8 sendmail $B$+$i(B sendmail.cf $B$G@_Dj$G$-$k$h$&$K$J$C$?!$%3%M%/%7%g%s%-%c%C(B
+ $B%7%e?t$O!$8e<T$N5!G=$K$*$$$F!$F1;~$K(B TCP$B%3%M%/%7%g%s3NN)=hM}$r9T$J$&$3$H$,(B
+ $B$G$-$k>e8B$N%3%M%/%7%g%s?t$H$7$F$bMxMQ$5$l$^$9!%(Bsendmail.cf $B$N(B Ok $B9T$G;XDj(B
+ $B$7$F$/$@$5$$!%(B6 $B$H$+(B 7 $B$^$G;H$o$l$k$3$H$,Js9p$5$l$F$$$^$9$+$i!$(B10 $B$/$i$$$K(B
+ $B$7$F$*$/$HNI$$$G$7$g$&!%(B0 $B$r;XDj$9$k$H!$(BTCP$B%3%M%/%7%g%s3NN)$NJB9T=hM}$O9T(B
+ $B$J$o$l$^$;$s!%(B
+ 
+ 
+ $B$^$?(B 2.5W $B$G$O0J2<$N%$%s%U%)%a!<%7%g%s$,(B syslog $B$K(B mail.info $B$G=PNO$5$l$^$9!%(B
+ 
+ 1. NBC: done (max waiting connections: 8)
+ 
+    $B%3%M%/%7%g%s3NN)BT$A$K$J$C$?%=%1%C%H$N?t$,:GBg(B8$B$K$^$G$J$C$?$3$H$r(B
+    $B<($7$^$9!%(B
+ 
+ 2. end of getting MXRRs with caching (58 times, 37 seconds)
+ 
+    MX $B%l%3!<%I$r0z$3$&$H$7$?2s?t(B($B<jH4$-$J$N$G!$$9$G$K%-%c%C%7%e$5$l$F$$$k(B
+    $B$N$b%+%&%s%H$5$l$F$7$^$$$^$9(B:) $B$H!$$+$+$C$?;~4V$r<($7$^$9!%(B
+ 
+ 
+ sendmail.cf $B$N%m%0%l%Y%k$r(B 10 $B$K$9$k$H!$(BTCP$B%3%M%/%7%g%s3NN)=hM}$K4X$9$k(B
+ $B%G%P%C%0>pJs$,(B syslog $B$K=PNO$5$l$k$h$&$K$J$j$^$9!%(B11 $B$K$9$k$H!$%j%>%k%P(B
+ $B%O%C%/$K4X$9$k%G%P%C%0>pJs$,=PNO$5$l$k$h$&$K$J$j$^$9!%(Bsendmail.cf $B$N(B OL
+ $B9T$G;XDj$7$F$/$@$5$$!%B?NL$N%a%C%;!<%8$,=PNO$5$l$^$9$N$G!$%G%#%9%/MFNL$K(B
+ $B$O==J,Cm0U$7$F$/$@$5$$!%(B
+ mail.debug $B$rJL$N%U%!%$%k$K8~$/$h$&$K$7$F$*$/$HNI$$$+$bCN$l$^$;$s!%(B
+ 
+ 
+ $B8=:_!$Js9p$5$l$F$$$k%P%0(B(?)
+ 
+ o $BHs>o$K5)$G$O$"$k$,!$(Bfile descriptor $B$r;H$$?T$/$7$F$7$^$&$3$H$,$"$k!%(B
+   $B%P%0$N2DG=@-$b$"$j$^$9$,!$%3%M%/%7%g%s%-%c%C%7%e?t$rBg$-$/$7$9$.$k$H!$(B
+   $B:GBg%U%!%$%k%G%#%9%/%j%W%??t%j%_%C%H(B($B%G%U%)%k%H(B64?)$B$KC#$7$F$7$^$&$N$G(B
+   $BCm0U$7$F2<$5$$!%(B20 $B$^$G$OBg>fIW$@$H;W$$$^$9$,!$(B15 $B$/$i$$$@$H0B?4$G$7$g$&!%(B
+ 
+ o $B0l;~E*$KAw$k$3$H$,$G$-$J$+$C$?%a!<%k$G$"$k$K$b$+$+$o$i$:!$$9$0$K(B
+   $B%(%i!<%j%?!<%s$5$;$F$7$^$&$+$b$7$l$J$$(B($B$3$N8=>]$O:F8=$5$l$F$$$J$$(B
+   $B$N$G!$C1$J$k%$%s%9%H!<%k;~$NA`:n%_%9$N2DG=@-$,Bg$-$$(B)$B!%(B
+ 
+ $B$=$NB>$NLdBjE@(B
+ 
+ o $B%3%M%/%7%g%s$r0lEY$KF1;~$KD%$j$K9T$/$N$G!$%a!<%k$r<u$1$kB&$N(B
+   sendmail $B$,(B fork $B$7$F$b!$$J$+$J$+%G!<%?$rAw$C$F$b$i$($J$$$?$a!$(B
+   $BD9;~4V(B process $B$,$$$D$E$1$F$7$^$&$N$,!$5$$K$+$+$k$3$H$,$"$k(B :-)
+   -> $B$d$C$Q$j(B SMTP$B%;%C%7%g%s$bJB9T2=$7$J$-$c$@$a$G$9$M!%(B
+ 
+ <2.5W $B$K4X$9$kCm0U$N=*$j(B>
+ 
+ 
+ $B$3$N%Q%C%A%-%C%H$O(B 1.6W for sendmail.5.67 $B$N$&$A!"(BR8 sendmail $B$K<h$j9~$^$l(B
+ $B$J$+$C$?5!G=$K!"%a!<%k%"%I%l%9$NJd405!G=$J$I$K4X$9$k?7$?$J3HD%$r2C$($?$b$N(B
+ $B$G$"$k!#G[I[$O%Q%C%A7A<0$G9T$J$C$F$*$j!"(Bsendmail.8.6.12.base.tar.Z $B$rE83+$7(B
+ $B$F$G$-$?%G%#%l%/%H%j(B src/ $B$NCf$GEv$F$k$h$&$K:n@.$5$l$F$$$k!#(B
+ 
+ Makefile.WIDE.* $B$bE:IU$5$l$F$$$k$,!"$3$l$rMQ$$$?>l9g$O<+F0E*$K%3%s%Q%$%kMQ(B
+ $B%G%#%l%/%H%j$r:n@.$7!"I,MW$J%U%!%$%k$K%7%s%\%j%C%/%j%s%/$rD%$k$h$&$K$J$C$F(B
+ $B$$$k!#(BMakefile.WIDE.* $B$r=$@5$9$k>l9g$K$O!"$=$N$^$^$NL>A0$G(B($B%*%j%8%J%k$r;D$7(B
+ $B$F$*$-$?$$>l9g$O!"%*%j%8%J%k$rJL$N%U%!%$%kL>$K%3%T!<$7$F(B)$B=$@5$9$k$3$H!#(B
+ 
+ Makefile.WIDE.* $B$K$O!"(BBINDDIR, NEWDBDIR $B$,AjBP%Q%9$GDj5A$5$l$F$$$k$,!"$3$l$O(B
+ src/OS_OBJ/ $B$+$i$NAjBP%Q%9$H$J$k$3$H$KCm0U$5$l$?$$!#(B
+ bind4.9 $B$rMxMQ$9$k>l9g$O(B lib44bsd.a $B$,I,MW$J>l9g$,$"$k!#(B
+ NDBM $B$H(B NEWDB $B$rF1;~$KDj5A$9$k>l9g!"(Blibdbm.a $B$r@h$K%j%s%/$9$kJ}$,K>$^$7$$!#(B
+ 
+ 
+ $B!T(B 2.5W$B$G3HD%$5$l$k5!G=$K$D$$$F!U(B
+ 
+ $B3F<o5!G=$O0J2<$N%U%i%0$K$h$C$F@)8f$G$-$k!#(B
+ 
+ 	FILEMACRO	Gw/etc/sendmail.dw $B$N$h$&$K%U%!%$%k$K$h$k%^%/%mDj5A$r(B
+ 			$B2DG=$H$9$k!#(B
+ 	EXTEND_CLASS	$B3HD%%/%i%9J8;z(B ^A-^z $B$N%5%]!<%H!#(BC^[A-z] $BEy$K$h$k%/%i(B
+ 			$B%9Dj5A!"$*$h$S(B $=^[A-z] $B$K$h$k%/%i%9;2>H$r2DG=$H$9$k!#(B
+ 	EXTEND_MACRO	$B3HD%%^%/%mJ8;z(B ^A-^z $B$N%5%]!<%H!#(BD^[A-z] $BEy$K$h$k%^%/(B
+ 			$B%mDj5A!"$*$h$S(B $^[A-z] $B$K$h$k%^%/%m;2>H$r2DG=$H$9$k!#(B
+ 	ADJUST_TZ	$B0lIt$N(BOS$B$G=P8=$9$k$H;W$o$l$k!"(BTZ $B$,(B +859 $B$H$J$kLdBj$r(B
+ 			$B2sHr$9$k!#(B
+ 	LOGWVERSION	newvers.sh $B$K$h$k9=C[>pJs$r%G!<%b%s%9%?!<%H$N:]$K(B
+ 			syslog $B$K=PNO$9$k!#(B
+ 	COMPILEOPTIONS	$B%3%s%Q%$%k%*%W%7%g%sJ8;zNs$r%*%V%8%'%/%H$KKd$a9~$`!#(B
+ 	CANON_MX_CNTL	$B%M!<%`%5!<%P$N(B MX $B%l%3!<%I$N;2>H$K$h$k%a!<%k%"%I%l%9$N(B
+ 			$BJd405!G=$NMxMQ$r(B I $B%*%W%7%g%s$G;XDj$G$-$k$h$&$K$9$k!#%G(B
+ 			$B%U%)%k%H$G$OJd40$K(B MX $B%l%3!<%I$rMxMQ$7$J$$$h$&$K$J$k!#(B
+ 			I $B%*%W%7%g%s$K(B ?nowildcardmx $B$r;XDj$9$k$3$H$K$h$j(B MX $B$r(B
+ 			$BMQ$$$?Jd40$,9T$J$o$l$k(B(WildCardMX$B$rMxMQ$7$F$$$k$H$3$m$G(B
+ 			$B$O!"(B?nowildcardmx $B$r;XDj$7$J$$J}$,$h$$$H;W$o$l$k(B)$B!#(B
+ 	CANON_OTHER	$B%a!<%k%"%I%l%9$NJd40$K(B CNAME, MX, A $B%l%3!<%I$NB>$N(B
+ 			$B%l%3!<%I$b;2>H$9$k$3$H$r2DG=$H$9$k!#8=%P!<%8%g%s$G$O(B
+ 			HINFO, MINFO, NS, NULL, PTR, SOA, TXT, WKS $B$,MxMQ2DG=!#(B
+ 			$B$=$l$>$l(B ?hinfo, ?minfo, ?ns, ?null, ?ptr, ?soa, ?txt,
+ 			?wks $B$r(B I $B%*%W%7%g%s$K;XDj$9$k$3$H$G!";2>H$5$l$k$h$&$K(B
+ 			$B$J$k!#8!:w$N=g=x$O!"%*%W%7%g%s$K;XDj$7$?=g=x$K=>$&!#(B
+ 	SHOW_MX_HOSTS	-bt $B%*%W%7%g%s$K$h$k%"%I%l%9%F%9%H%b!<%I$N:]$K!"(BSMTP
+ 			$B%a!<%i$KE~C#$7$?>l9g$K!"(BMX $B%[%9%H%j%9%H$NI=<($r2DG=$H(B
+ 			$B$9$k!#%F%9%H$N:]$K!"(B3,0,mx user@domain $B$N$h$&$K!"(Bmx $B$H(B
+ 			$B$$$&5?;w%k!<%k%;%C%HL>$r;XDj$9$k$3$H$K$h$jI=<($5$l$k!#(B
+ 	AUTH_LOG	X-Authentication-Warnings: $B%X%C%@$K=PNO$5$l$k%a%C%;!<%8(B
+ 			$B$r(B syslog $B$K$b;D$9$h$&$K$9$k!#(B
+ 	ESMTPPEERSCLS	SMTP $B@\B3;~$N(B greeting $B%a%C%;!<%8$,J#?t9T$"$k>l9g$K!"(B
+ 			$B%a!<%i$K$h$C$F$O%a!<%k$rAw$k$3$H$,$G$-$J$$$H$$$&LdBj$,(B
+ 			$B$"$k!#(BBROKENSMTPPEERS $B$rDj5A$9$l$P$9$Y$F0l9T$K@)8B$5$l(B
+ 			$B$k$h$&$K$J$k$,!"$3$N>l9g$OFC$K;XDj$7$J$$8B$j(B ESMTP $B$,(B
+ 			$B;HMQ$5$l$J$$!#(BESMTPPEERSCLS $B$rDj5A$9$k$H!"%/%i%9(B e $B$N(B
+ 			$B;XDj$K$h$jFCDj$N%[%9%H$KBP$9$k(B greeting $B%a%C%;!<%8$r(B
+ 			$B0l9T$K@)8B$9$k$3$H$,$G$-$k!#(B
+ 			$BNc(B)
+ 			 Ce !all ($B$9$Y$F$N%[%9%H$KBP$7$F(B ESMTP $B$rMQ$$$J$$(B)
+ 			 Ce !all .kyoto-u.ac.jp	($B6h@Z$j$O%9%Z!<%9(B)
+ 				(*.kyoto-u.co.jp $B$N$_(B ESMTP $B$rMQ$$$k(B)
+ 			 Ce !.kyoto-u.ac.jp !kyoto-u.ac.jp
+ 				(*kyoto-u.co.jp $B$N$_(B ESMTP $B$rMQ$$$J$$(B)
+ 			 Ce !jpnkyoto.kyoto-u.ac.jp
+ 				(jpnkyoto.kyoto-u.ac.jp $B$N$_(B ESMTP $B$rMQ$$$J$$(B)
+ 	IDENTPEERSCLS	SMTP $B@\B3;~$K(B IDENT $B%W%m%H%3%k$K$h$C$F!"@\B385$N%f!<%6(B
+ 			$B>pJs$r<hF@$7$h$&$H$9$k$,!"ESCf$N%2!<%H%&%'%$$d@\B385$N(B
+ 			OS $B$K$h$C$F$O!"(BIDENT $B$N@\B3%(%i!<$KH<$C$F(B SMTP $B@\B3$b(B
+ 			$BF1;~$K@ZCG$5$l$F$7$^$$!"%a!<%k$,<u$1$H$l$J$$!#(B
+ 			$B$3$N8=>]$O!"(Bsyslog $B0J2<$N$h$&$K(B Host unreach $B$H$$$&5-O?(B
+ 			$B$,;D$k$3$H$+$iH=CG$G$-$k!#(B
+ 				NOQUEUE: SYSERR: putoutmsg (host.domain): error
+ 				on output channel sending "220 ESMTP spoken
+ 				here": Host is unreachable
+ 			greeting $B$,(B2$B9T$"$k$3$H$,LdBj$K$J$k>l9g$O!"(BHost unreach
+ 			$B$H$O5-O?$5$l$J$$$O$:$G$"$k!#(B
+ 			IDENTPROTO $B$r(B 0 $B$K(B define $B$9$l$P(B IDENT $B$rMQ$$$J$/$J$k(B
+ 			$B$,!"FCDj$N%[%9%H$KBP$7$F$@$1$O(B IDENT $B$rMQ$$$?$$>l9g$K(B
+ 			$BDj5A$9$k!#$3$l$rDj5A$9$k$H!"%/%i%9(B i $B$K$h$j(B IDENT $B$r(B
+ 			$BMQ$$$k%[%9%H$r;XDj$9$k$3$H$,$G$-$k!#(B
+ 			$BNc(B)
+ 			 Ci !all ($B$9$Y$F$N%[%9%H$KBP$7$F(B IDENT $B$rMQ$$$J$$(B)
+ 			 Ci !all .kyoto-u.ac.jp	($B6h@Z$j$O%9%Z!<%9(B)
+ 				(*.kyoto-u.co.jp $B$N$_(B IDENT $B$rMQ$$$k(B)
+ 			 Ci !.kyoto-u.ac.jp !kyoto-u.ac.jp
+ 				(kyoto-u.co.jp $B$N$_(B IDENT $B$rMQ$$$J$$(B)
+ 			 Ci !jpnkyoto.kyoto-u.ac.jp
+ 				(jpnkyoto.kyoto-u.ac.jp $B$N$_(B IDENT $B$rMQ$$$J$$(B)
+ 	MX_SAFETY	MX $B$G<($5$l$F$$$k%[%9%H$,B8:_$7$J$+$C$?>l9g$K(B host not
+ 			found $B%(%i!<$K$J$i$J$$$h$&$K$9$k!#(B
+ 	ALL_HASH_CMNT	:include: $B$d(B .forward $B$G;XDj$5$l$k%U%!%$%k$G$O!"DL>o(B
+ 			$B9TF,$N(B # $B$N$_$,%3%a%s%H$N3+;O$r<($9$3$H$K$J$C$F$$$k$,!"(B
+ 			$B9TCf$NG$0U$N0LCV$G(B # $B$,;H$($k$h$&$K$7$?$$>l9g$KDj5A$9(B
+ 			$B$k!#$?$@$7(B # $B$ND>A0$NJ8;z$OI,$:%9%Z!<%9J8;z$G$"$k$3$H!#(B
+ 	QUICK_RESPONSE	rmail $B$J$I$+$i(B -odq $B%U%i%0$D$-$G5/F0$5$l$?>l9g!"G[Aw(B
+ 			$B%(%i!<$,H/@8$7$F$b!"%(%i!<%a!<%k$O(B mqueue $B$K0lC6J]B8(B
+ 			$B$5$l$k!#$3$N$h$&$J%l%9%]%s%9%a!<%k$K$D$$$F$O!"(Bmqueue
+ 			$B$KMn$5$:$K$9$0$KG[Aw$9$k$h$&$K$7$?$$>l9g$K(B 1 $B$K$9$k!#(B
+ 			(quick hack $B$J$N$G!"Cm0U$5$l$?$7(B)
+ 	LHS_CHECK_CNTL	newaliases $B$N<B9T$N:]$K$O!"(Baliases $B%G!<%?%Y!<%9$N(B LHS
+ 			($B=q$-49$($i$l$k85$N%"%I%l%9(B)$B$,(B localmailer $B$KE~C#$9$k(B
+ 			$B$+$I$&$+$N%A%'%C%/$,9T$J$o$l$k!#(Bsendmail.cf $B$K$*$$$F(B
+ 			$B$"$k%f!<%6$,(B local $B$G$"$k$+$I$&$+$r(B aliases $B%G!<%?%Y!<(B
+ 			$B%9$rMQ$$$FH=Dj$9$k$h$&$J%k!<%k$rF~$l$k$J$IFC<l$J@_Dj(B
+ 			$B$N2<$G$O!"(BLHS $B$N%A%'%C%/$K$h$C$F(B newaliases $B$,$&$^$/(B
+ 			$BF0:n$7$J$/$J$k!#(BLHS_CHECK_CNTL $B$r(B 1 $B$KDj5A$9$k$H!"(B
+ 			RHS $B$r%A%'%C%/$9$k$+$I$&$+$r;XDj$9$k%9%$%C%A$G$"$k(B
+ 			option n $B$NA`:n$K$h$C$F!"F1;~$K(B LHS $B$N%A%'%C%/$K$D$$$F(B
+ 			$B$b;XDj$9$k$3$H$,$G$-$k$h$&$K$J$k!#(B
+ 	NO_ALIAS_ON_REBUILD	sendmail.cf $B$G(B $( $) $B$N%^%C%W;2>H$K$h$C$F(B
+ 			aliases $B%U%!%$%k$r;2>H$9$k$h$&$K$7$?>l9g!"(Bnewaliases
+ 			$B$G%O%s%0%"%C%W$9$k$3$H$,$"$k!#Dj5A$9$k$3$H$K$h$j(B
+ 			newaliases $B$N=hM}$N>l9g$N$_(B $( $) $B$+$i$N(B aliases
+ 			$B%U%!%$%k;2>H$rM^@)$9$k!#(B
+ 	MULTI_MAILER	$B%k!<%k%;%C%H(B 0 $B$N%a!<%i%G%#%9%Q%C%A%k!<%k$K$*$$$F!"(B
+ 			$B0l9T$K(B $#...$@...$:... $B$r7+$jJV$75-=R$G$-$k$h$&$K$9$k!#(B
+ 			$#smtp.... $#uucp.... $B$N$h$&$K=q$/$3$H$K$h$j!"(Bsmtp
+ 			mailer $B$K$h$kG[Aw$K<:GT$7$?$i(B uucp mailer $B$K@ZBX$($k(B
+ 			$B$h$&$K$9$k$3$H$,$G$-$k(B($B%F%9%H$,==J,$G$J$$$N$GCm0U(B)$B!#(B
+ 	ANOTHER_MXPB	MX $B%l%3!<%IC10L$NAj>h$jH=Dj$r9T$J$&%3!<%I$rM-8z$K$9$k!#(B
+ 			($B%F%9%H$,==J,$G$J$$$N$GCm0U(B)
+ 	RCPT_NEXT	SMTP/RCPT TO $B$G(B temp fail $B$7$?>l9g$K$b2<0L$N(B MX $B%[%9%H(B
+ 			$B$X$NAw?.$r;n$_$k$h$&$K$9$k!#(BANOTHER_MXPB $B$rDj5A$7$?>l9g(B
+ 			$B$N$_M-8z$H$J$k!#(B
+ 	CO_RESOLV	2.5W $B$K4X$9$kCm0U$r;2>H(B
+ 	NON_BLOCK_CONNECT	2.5W $B$K4X$9$kCm0U$r;2>H(B
+ 
+ 
+ 	$B$=$NB>!"(BSony NEWS $B$G3HD%$5$l$F$$$k(B -J $B%*%W%7%g%s$X$NBP1~(B($B$?$@$7!"%*%W(B
+ 	$B%7%g%s$r%(%i!<$K$;$:C1$KL5;k$9$k$@$1(B)$B$b$*$3$J$C$F$$$k!#(B
+ 
+ 
+ $B!T<U<-!U(B
+ 
+ $B$3$N%Q%C%A$O!"5~ETBg3X!"N)L?4[Bg3X!">pJs5;=Q3+H/3t<02q<R$J$i$S$K$=$NB>$N?M!9$N(B
+ $B6(NO$K$h$C$F:n@.$5$l$?$b$N$G$"$k$N$G!"$3$3$K46<U$N0U$rI=$9!#(B
+ 
+ 
+ ===== Changes =====
+ 
+ [[ Apr. 16, 1995/8.6.12+2.5Wbeta4/motonori ]]
+ 	fix on a botch of IRIXV
+ 
+ 
+ [[ Apr. 14, 1995/8.6.12+2.5Wbeta3/motonori ]]
+ 	needless reverse patch deleted
+ 
+ 
+ [[ Apr. 1, 1995/8.6.12+2.5Wbeta2/motonori ]]
+ 	modified for 8.6.12
+ 
+ 
+ [[ Mar. 12, 1995/8.6.11+2.5Wbeta2/motonori ]]
+ 	modified for 8.6.11
+ 	res_send.c:
+ 		some fix on var-type mismatch
+ 		use select() for usleep()
+ 	Makefile.WIDE.Solaris
+ 		fix on command path
+ 	Makefile.WIDE.{ULTRIX,IRIX} added
+ 
+ 
+ [[ Feb. 23, 1995/8.6.10+2.5Wbeta1/motonori ]]
+ 	modified for 8.6.10
+ 	recipient.c:
+ 		minor fix on comment management in :include: file.
+ 	one more thing from umura@nn.solan.chubu.ac.jp
+ 
+ 
+ [[ Jun. 29, 1994/8.6.9+2.4W/motonori ]]
+ 	conf.c:
+ 		getla() $B$N(B EWS $BBP1~(B
+ 	deliver.c:
+ 		DG/UX $B$G(B localmailer $B$r5/F0$9$k$H$-$KI,MW$H$J$kJQ99(B
+ 	copyright notice
+ 
+ 
+ [[ Apr. 22, 1994/8.6.9+2.4Wb/motonori ]]
+ 	Makefile.WIDE.*:
+ 		nroff $B$r(B ${NROFF} $B$KCV$-49$($?(B
+ 		BROKEN_LISTEN $B$NDj5A$N:o=|(B
+ 	daemon.c:
+ 		BROKEN_LISTEN $B$G9T$C$F$$$?=hM}$,(B 8.6.9 $B$K<BAu$5$l$?$N$G!$(B
+ 		$B%Q%C%A$+$i:o=|(B
+ 	conf.h,Makefile.WIDE.NEWS,Makefile.WIDE.EWS:
+ 		/usr/ucb/cc $B$G$J$/(B /usr/bin/cc $B$rMxMQ$9$k$h$&$KJQ99(B
+ 	conf.c,conf.h:
+ 		SYS5SIGNALS for NEWS, EWS
+ 		use statvfs() with NEWS-OS 6.0.1
+ 
+ 
+ [[ Apr. 8, 1994/8.6.8+2.4Wb2/motonori ]]
+ 	main.c:
+ 		showmxhost() $B$NDj5A$NL7=b$r2r7h(B
+ 	conf.h:
+ 		EPROTO_QUEUE $B$N%G%U%)%k%H$r(B 0 $B$K$7$?(B
+ 		$B%a!<%k$rJVAw$9$Y$->l9g$K$b(B mqueue $B$KN/$C$F$7$^$&LdBj$,$"$k(B
+ 	readcf.c:
+ 		$B%]%$%s%?(B bp $B$NCM$rJQ99$7$F$O$$$1$J$$$?$a!$(Bstrcpy() $B$rMxMQ(B
+ 	Makefile.WIDE.LUNA:
+ 		more changes for LUNA88K/Mach
+ 	Makefile.WIDE.HP-UX:
+ 		newly added
+ 
+ 
+ [[ Mar. 18, 1994/8.6.8+2.4Wb/motonori ]]
+ 	Makefile.WIDE.*:
+ 		use MAKE macro
+ 		changes for LUNA88K/Mach
+ 
+ 
+ [[ Mar. 16, 1994/8.6.7+2.4Wb5/motonori ]]
+ 	Makefile.WIDE.BSDI:
+ 		BSDI 1.1 $B$KBP1~(B
+ 	conf.h:
+ 		BSDI $B$NItJ,$K(B undef SETPROCTITLE $B$rDI2C(B
+ 		NEWS-OS 6.0.1 $B$N%5%]!<%H(B
+ 		EWS-UX/V 4.1 $B$N%5%]!<%H(B
+ 	Makefile.WIDE.NEWS
+ 		NEWS-OS 6.0.1 $B$N%5%]!<%H(B
+ 	newvers.sh:
+ 		NEWS-OS 6.0.1 $B$G$O%G%U%)%k%H$G(B ascii $B$K$J$i$J$$$N$G!$L@<(E*$K(B
+ 		LANG=C $B$r@_Dj(B
+ 	Makefile.WIDE.EWS
+ 		$B?75,$K%5%]!<%H(B
+ 	Makefile.WIDE.NEWS, Makefile.WIDE.EWS:
+ 		fix on dirent problem of ucb compiler on SVR4
+ 
+ 
+ [[ Mar. 14, 1994/8.6.6+2.4Wb/motonori ]]
+ Makefile.WIDE.Sun40:
+ 	Makefile.WIDE.Sun $B$HE}9g$N$?$a:o=|(B
+ Makefile.WIDE.Sun:
+ 	SunOS 4.0.3 $B$r%5%]!<%H(B
+ Makefile.WIDE.*:
+ 	mailq manual page $B$N5-=R$rDI2C(B
+ 	install $B$N;~%P%C%/%"%C%W$r;D$9(B
+ conf.h:
+ 	HASSTATFS $B$NDj5AJ}<0JQ99$KBP1~(B
+ conf.c:
+ 	HASSTATFS $B$NDj5AJ}<0JQ99$K$h$j%*%j%8%J%k$KLa$9(B
+ alias.c, parseaddr.c, version.c:
+ 	NO_ALIAS_ON_REBUILD $B$N<BAu(B
+ mci.c:
+ 	GET_PEER_ADDR $B$N:o=|$K$h$j%*%j%8%J%k$KLa$9(B(8.6.6$B$K:NMQ(B)
+ srvrsmtp.c:
+ 	X-Auth-Warn $B$K4X$9$kJQ99$KBP1~(B
+ deliver.c:
+ 	MX_SAFETY $B$N<BAu(B
+ 
+ 
+ [[ Jan. 25, 1994/8.6.5+2.3W4/motonori ]]
+ alias.c:
+ 	LHS_CHECK_CNTL $B$r<BAu(B
+ conf.h, version.c:
+ 	LHS_CHECK_CNTL, MULTI_MAILER $B$NDI2C(B
+ daemon.c:
+ 	BROKEN_LISTEN $B$N=PNOJ8;z$ND4@0(B
+ deliver.c:
+ 	fix on ANOTHER_MXPB
+ deliver.c, parseaddr.c, sendmail.h:
+ 	MULTI_MAILER $B$N<BAu(B
+ recipient.c:
+ 	fix on ALL_HASH_CMNT (by kizu@ics.es.osaka-u.ac.jp)
+ srvrsmtp.c:
+ 	X-Auth-Warn: $B%X%C%@$K4X$9$k=hM}$N0LCV$NJQ99(B
+ 	($BF0:n$r@5$7$/$9$k$3$H$,M-32$+$b$7$l$J$$$N$G<B<AE*$JJQ99$O$7$F$$$J$$(B)
+ usersmtp.c:
+ 	putheader $B<B9T;~$N%?%$%`%"%&%H$,C;$$$3$H$,$"$k$N$G!"D9$a$KJQ99(B
+ 	(sendmail.cf $B$G@_Dj$G$-$k$h$&$K$9$Y$-$G$"$k(B)
+ 
+ 
+ [[ Jan. 16, 1994/8.6.5+2.3W3/motonori ]]
+ main.c:
+ 	obsolete $B$N%A%'%C%/$,%7%S%"$K$J$C$?$?$a(B NEWS $B$N(B -J $B%*%W%7%g%sA`:n$N(B
+ 	$B0LCV$,ITE,Ev$K$J$C$?$3$H$K$h$k=$@5(B
+ daemon.c:
+ 	high load ave $B;~$K(B 421 $B%a%C%;!<%8$N8e$KB3$1$F(B 221 $B%a%C%;!<%8$rAw$k(B
+ 	$B$h$&$KJQ99(B(RFC821 $B$K=>$&(B)
+ 
+ 
+ [[ Jan. 16, 1994/8.6.5+2.3W2/motonori ]]
+ deliver.c:
+ 	2.3W1 $B$G$NJQ99$r85$KLa$9(B
+ mci.c:
+ 	syslog $B$K5-O?$9$k(B IP address $B$,(B (0) $B$N$^$^$K$J$i$J$$$h$&$K$9$k%3!<%I(B
+ 	$B$rDI2C(B(INET domain $B$K$N$_BP1~(B; GET_PEER_ADDR)
+ 
+ 
+ [[ Jan. 14, 1994/8.6.5+2.3W1/motonori ]]
+ deliver.c:
+ 	localhost $B$+$iH/?.$7$?(B /etc/aliases $B5-:\$N(B prog/file mailer $B08$N(B
+ 	$B%a!<%k$N=hM}$,I,$:(B daemon $B$N8"8B$G9T$J$o$l$k$h$&$K$7$?(B(PROG_DAEMON)
+ 
+ 
+ [[ Jan. 14, 1994/8.6.5+2.3W/motonori ]]
+ Makefile.WIDE.*:
+ 	install mode $B$,(B 666 $B$K$J$C$F$$$?$b$N$r(B 644 $B$K=$@5(B
+ all:
+ 	8.6.5 $B$X$N%Q%C%A$K=$@5!"(B2.3W $B$H$7$F%j%j!<%9(B
+ 
+ 
+ [[ Jan. 12, 1994/8.6.5Beta11+2.3W/motonori ]]
+ 
+ sendmail.h:
+ 	LUNA $B$K4X$9$k5-=R$r(B conf.h $B$K0\F0(B
+ conf.h:
+ 	$B%^%/%mL>(B LUNA $B$r(B luna $B$KJQ99(B
+ 	SHOW_MX_HOSTS, AUTH_LOG $B$rDI2C(B
+ 	SunOS 4.0.3 $B$N@_Dj$,(B 8.6.5 $B$KF~$C$?$?$a:o=|(B
+ 	$B$=$NB>$N@_Dj$rD4@0(B
+ daemon.c:
+ main.c:
+ 	SHOW_MX_HOSTS $B$N%3!<%I$r<BAu(B
+ deliver.c:
+ 	ANOTHER_MXPB $B$N%3!<%I$rBgI}$KJQ99(B
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.Sun40:
+ 	time.h $B$NFs=EFI$_9~$_$NKI;_A<CV(B
+ Makefile.WIDE.LUNA:
+ conf.h:
+ 	dirent $B$r(B direct $B$GBeMQ(B
+ 	LUNA2/LUNA88K (from demizu)
+ version.c:
+ 	COMPILEOPTION $B$N<BAu(B
+ Makefile.WIDE.*:
+ 	-DNDBM -DNEWDB $B$NDj5A$rJL$N9T$KJ,N%(B
+ 	bind4.9 $B$N$?$a$N(B -l44bsd $B$r%3%a%s%H$H$7$FDI2C(B
+ 	-DIDENTPROTO=0 $B$r%3%a%s%H$H$7$FDI2C(B
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun*:
+ 	-DBROKEN_LISTEN=1 $B$rDj5A(B
+ daemon.c:
+ 	BROKEN_LISTEN $B$r<BAu(B
+ 	IDENTPEERSCLS $B$r<BAu(B
+ main.c:
+ 	AUTH_LOG $B$r<BAu(B
+ recipient.c:
+ 	ALL_HASH_CMNT $B$r<BAu(B
+ srvrsmtp.c:
+ 	BRKNSMTPPRSCLS $B$r(B ESMTPPEERSCLS $B$KJQ99(B
+ savemail.c:
+ 	QUICK_RESPONSE $B$r<BAu(B
+ all:
+ 	8.6.5Beta11 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Nov. 1, 1993/8.6.4+2.2W/motonori ]]
+ 
+ all:
+ 	8.6.4 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Oct. 25, 1993/8.6.3+2.2W/motonori ]]
+ 
+ Makefile.WIDE.SEIUX:
+ 	SUMI Station $BMQ(B Makefile $B$rDI2C(B (from shige-y@is.aist-nara.ac.jp)
+ Makefile.WIDE.Sun40:
+ 	SunOS 4.0.3 $BMQ$N(B Makefile $B$rDI2C(B
+ conf.h:
+ 	SEIUX$B!"(BSunOS 4.0.3 $B$KBP$9$kDj5A$rDI2C(B
+ Makefile.WIDE.*:
+ 	-I${BINDDIR}/compat/include $B$r(B INCDIRS $B$KDI2C(B
+ all:
+ 	8.6.3 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Oct. 16, 1993/8.6.2+2.2W/motonori ]]
+ 
+ Makefile.WIDE.Sun:
+ 	-DHASUNAME $B$rDI2C(B
+ all:
+ 	8.6.2 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Oct. 9, 1993/8.6.1+2.2W/motonori ]]
+ 
+ Makefile.WIDE.BSDI:
+ 	$B?7$?$KDI2C(B (from shigeya@fortune.co.jp)
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	MAKEFILE $B$rDI2C(B
+ 	nroff $B$N(B -h $B%U%i%0$r:o=|(B (Sun)
+ domain.c:
+ readcf.c:
+ 	T_TXT $B$rDj5A$9$k$h$&$KJQ99(B
+ 	EXTEND_MACRO $B$r(B delaied macro expansion $B$K$bBP1~(B
+ macro.c:
+ 	EXTEND_CLASS $B$K4X$9$k=hM}$r(B readcf.c $B$K0\F0(B
+ all:
+ 	8.6.1 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Oct. 7, 1993/8.6+2.2W/motonori ]]
+ 
+ domain.c:
+ readcf.c:
+ 	T_TXT $B$,(B arpa/nameser.h $B$KEPO?$5$l$F$$$J$$>l9g$KBP=h$7$?(B
+ 	(reported by kozo@e.dendai.ac.jp)
+ conf.h:
+ 	NEWS-OS 4.2R, UNIOS-U 3.0 $BMQ$N%^%/%mDj5A5-=R$rDI2C(B
+ 	sigfunc_t $B$,(B int $B$rMQ$$$FDj5A$5$l$k$h$&$K=$@5(B (NEWS)
+ 	(portability changes for NEWS are from matusita@osaka-u)
+ conf.c:
+ 	setpgid() $B$K4X$9$kBP1~$r(B conf.h $B$G9T$J$&$h$&$K$7$?(B (LUNA,NEWS)
+ 	sys/vfs.h $B$rFI$_9~$`$h$&$K$7$?(B (LUNA,NEWS)
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	LADEF, OSDEF $B$NDj5A$r(B conf.h $B$K0\F0(B (LUNA, NEWS)
+ 	$B$$$/$D$+$N(B &&, || $B$r(B if then else fi $B$KJQ99(B
+ 	LUNA $B$N(B test $B$G(B -x $B$,;H$($J$$$3$H$KBP1~(B
+ 	make clean $B$r=$@5(B
+ 	OSDEF -> ENVDEF $B$KJQ99(B
+ 	SRCADD, OBJADD $B$rDI2C(B
+ readcf.c:
+ 	8.6 $B$X$N0\9T;~$KH/@8$7$?(B EXTEND_CLASS $B$K4X$9$k%P%/$r=$@5(B
+ macro.c:
+ 	8.6 $B$X$N0\9T;~$KH/@8$7$?(B EXTEND_MACRO $B$K4X$9$k%P%/$r=$@5(B(from toku@dit)
+ aliases.0:
+ newaliases.0:
+ sendmail.0:
+ 	4.3BSD Reno $B$N(B tmac.* $B$K$h$j:n@.(B
+ all:
+ 	2.2W $B$H$7$F%j%j!<%9(B
+ 
+ 
+ [[ Oct. 6, 1993/8.6+2.1W/motonori ]]
+ 
+ vsprintf.c:
+ 	8.4 $B$+$i(B conf.c $B$K4^$^$l$k$h$&$K$J$C$?$?$a:o=|(B
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	newvers.sh $B$,<B9T2DG=$G$J$$>l9g$K$N$_(B chmod +x $B$r9T$J$&$h$&$KJQ99(B
+ 	$B%3%s%Q%$%k:n6HMQ%G%#%l%/%H%j$r:n@.$9$k$h$&$K$7$?$N$G!"J#?t%"!<%-%F(B
+ 	$B%/%A%c$N$?$a$N%3%s%Q%$%k$rF10l%G%#%l%/%H%j$G9T$J$&$3$H$,2DG=(B
+ 	make install $B$,@5$7$/F0:n$9$k$h$&$K=$@5(B
+ 	make restart $B$rDI2C(B
+ 	$B%G%#%l%/%H%j>pJs$ND4@0(B
+ 	(thanks to yamaoka@titech, matusita@osaka-u, kazuto@aoyama)
+ newvers.sh
+ 	umask 0022 $B$rDI2C(B
+ readcf.c:
+ 	filemacro() $B$K$*$$$F(B munchstring() $B$N@k8@$rDI2C(B(from minmin@astec)
+ 	goto fm_exit; $B$K$h$j=hM}$rH4$1$k$h$&$K(B bug fix (SCANF $B$rDj5A$7$F(B
+ 	$B%3%s%Q%$%k$7$?>l9g$KLdBj$,$"$C$?(B)
+ 	fileclass() $B$N;EMMJQ99$KDI=>(B
+ main.c:
+ 	NewsOS ucbmail/binmail $B$G;XDj$5$l$k(B -J $B%U%i%0$KBP$7$F%(%i!<$r5/$3$5(B
+ 	$B$J$$$h$&$K$7$?(B(reported by matusita@ics.es.osaka-u.ac.jp)
+ 	$BF|K\8lJQ49$N$?$a$N%3!<%I$OF~$l$F$$$J$$(B
+ srvrsmtp.c:
+ 	ESMTP greeting $B$r2r<a$G$-$J$$%[%9%H$N$?$a$K!"%/%i%9(B b $B$KDj5A$5$l$?(B
+ 	$B%[%9%H$+$i$N@\B3$KBP$7$F$O(B ESMTP greeting $B$rAw$i$J$$$3$H$r2DG=$K$9$k(B
+ 	$B$?$a$N%3!<%H$rA^F~$7$?(B
+ 	conf.h $B$G(B BRKNSMTPPRSCLS $B$r(B 1 $B$K$9$k$3$H$K$h$jM-8z$H$J$k(B
+ sendmail.restart:
+ 	tail -5 /var/log/syslog $B$r%3%a%s%H$H$7$FDI2C(B
+ conf.c:
+ 	NewsOS $B$K(B setpgid() $B$,L5$$$3$H$KBP1~(B
+ all:
+ 	sendmail 8.6 $B$X$N%Q%C%A$K=$@5!"(B2.1W $B$H$7$F%j%j!<%9(B
+ 
+ 
+ [[ Jul. 26, 1993/8.5+2.0Wbeta2/1.6/motonori ]]
+ 
+ domain.c:
+ 	trymx $B$,(B False $B$N>l9g$K!"%m!<%+%k%I%a%$%sL>$rJd$C$?(B MX $B$KBP$9$k(B query
+ 	$B$r9T$J$o$J$$$h$&$KJQ99(B
+ clock.c:
+ conf.c:
+ 	$B%*%j%8%J%k$KLa$9(B
+ 
+ 
+ [[ Jul. 24, 1993/8.5+2.0Wbeta/1.5/motonori ]]
+ 
+ all:
+ 	sendmail 8.5 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Jul. 23, 1993/8.4+2.0Wbeta/1.5/motonori ]]
+ 
+ sendmail.restart:
+ 	/etc/sendmail.pid $B$NFs9TL\$K5/F0;~%*%W%7%g%s$,J]B8$5$l$k$h$&$K$J$C$?(B
+ 	$B$3$H$KBP1~(B
+ clock.c:
+ 	sleep() $B$N7?@k8@$,(B SLEEP_T $B$K$h$C$F9T$J$o$l$k$h$&$K$J$C$?$N$G!"(BNEWS
+ 	$B$N$?$a$NJQ99$r:o=|(B
+ conf.c:
+ 	pid_t $B$r(B Makefile $B$GDj5A$9$k$h$&$KJQ99$7!"%*%j%8%J%k$KLa$7$?(B
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	Version.c -> version.c $B$N0MB8$rDI2C(B
+ 	VOIDSLEEP $B$NDj5A$r:o=|$7!"(BSLEEP_T $B$K4X$9$k@k8@$rDI2C(B (NEWS)
+ 	pid_t $B$NDj5A$rDI2C(B (NEWS,LUNA)
+ 	NOWAITPID $B$NDj5A$r:o=|(B (NEWS,LUNA)
+ daemon.c:
+ 	CANON_MX_CNTL $B$K4X$9$k=hM}$r(B domain.c $B$+$i0\F0(B
+ domain.c:
+ 	CANON_MX_CNTL $B$K4X$9$k=hM}$r:o=|(B (daemon.c $B$X$N0\F0$N$?$a(B)
+ all:
+ 	sendmail 8.4 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Jul. 14, 1993/8.3+2.0Wbeta2/1.4/motonori ]]
+ 
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	sendmail: sendmail.mx sendmail.nomx $B$N5-=R$rF~$l$?(B
+ 	clean: $B$G(B rm $B$N0z?t$N4V$K%9%Z!<%9$,H4$1$F$$$?ItJ,$,$"$C$?$N$r=$@5(B
+ 	(toku)
+ readcf.c:
+ 	I $B%*%W%7%g%s$G!"(B?nowildcardmx, ?hinfo, ?minfo, ?ns, ?null, ?ptr, ?soa,
+ 	?txt, ?wks $B$r;XDj$G$-$k$h$&$K$7$?(B
+ domain.c:
+ 	NO_CANON_MX -> CANON_MX_CNTL
+ 	getcanonname() $B$GLd$$9g$o$;$r9T$J$&%l%3!<%I$r2DJQ$K$7$?(B
+ 	$B@dBP%"%I%l%9$H$7$FLd$$9g$o$;$r9T$J$&>l9g$K!"DI2C$5$l$?%l%3!<%I8!:w$r(B
+ 	$B9T$J$o$J$$$h$&$K$7$?(B
+ 
+ 
+ [[ Jul. 14, 1993/8.3+2.0Wbeta/1.3/motonori ]]
+ 
+ Makefile.WIDE.LUNA:
+ Makefile.WIDE.NEWS:
+ Makefile.WIDE.Sun:
+ 	Makefile.dist.* $B$+$i%U%!%$%kL>$rJQ99(B
+ 	sendmail.mx, sendmail.nomx $B$r:n@.$9$k$h$&$K=$@5(B
+ 	Sun $B$N$b$N$O(B -Bstatic $B$r%3%a%s%H%"%&%H$7$?(B
+ conf.h:
+ 	NAMED_BIND $B$N(B define $B$O(B Makefile.WIDE $B$G9T$J$&$h$&$K$7$?$?$a(B
+ 	$B%3%a%s%H%"%&%H$7$?(B
+ all:
+ 	sendmail 8.3 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Jul. 12, 1993/8.2+2.0Wbeta/1.2/motonori ]]
+ 
+ Makefile.dist.LUNA:
+ 	Makeifle.dist $B$r(B UNIOS-B 1.6 $B$KBP1~(B
+ 	GNU/dirent $B$rMQ$$$F%3%s%Q%$%k$,2DG=$G$"$k$3$H$r3NG'$7$?(B
+ vsprintf.c:
+ 	UNIOS-B 1.6 $B$N$?$a$K(B Tahoe $B$+$iM"F~(B
+ all:
+ 	sendmail 8.2 $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Jul.  1, 1993/8.1C+2.0Wbeta/1.1/motonori ]]
+ 
+ sendmail.hf:
+ 	WIDE$BHG%Q%C%A$K4X$9$k%a%C%;!<%8$r5-=R(B
+ sendmail.restart:
+ 	$B%j%9%?!<%HMQ%9%/%j%W%H$NDI2C(B
+ conf.h:
+ 	typo $B$N=$@5(B
+ all:
+ 	sendmail 8.1C $B$X$N%Q%C%A$K=$@5(B
+ 
+ 
+ [[ Jun. 14, 1993/8.1(B)+2.0Wbeta/1.0/motonori ]]
+ 
+ newvers.sh:
+ 	1.6W for sendmail.5.67 $B$h$jM"F~(B(origin: BIND4.8.2)
+ 	(newvers.sh $B$K$h$k>pJs$O!"(B1.6W $B$N$h$&$K(B syslog $B$K=PNO$5$l$k$h$&$K$O(B
+ 	$B$J$C$F$$$J$$(B)
+ Makefile.dist.Sun:
+ 	Makefile.dist $B$r(B SunOS4.1.1 $B$KBP1~(B
+ Makefile.dist.NEWS:
+ 	Makefile.dist $B$r(B NEWS-OS 4.1C $B$KBP1~(B
+ arpadate.c:
+ 	ADJUST_TZ $B$N$?$a$NJQ99(B(1.6W$B$+$iM"F~(B)
+ clock.c:
+ 	NEWS-OS 4.1C $B$G$O(B sleep() $B$NJVCM(B $B$,(B void $B$G$"$k$3$H$K$h$kJQ99(B
+ 	(VOIDSLEEP $B%U%i%0$O(B makefile.dist.NEWS $B$GDj5A$5$l$k(B)
+ conf.c:
+ 	NEWS-OS 4.1C $B$,(B waitpid()$B$r;}$?$J$$$3$H$K$h$kJQ99(B
+ 	(NOWAITPID $B%U%i%0$O(B makefile.dist.NEWS $B$GDj5A$5$l$k(B)
+ conf.h:
+ 	$B3F<o%U%i%0$N@_Dj(B
+ 	NEWS-OS 4.1C $B$N$?$a$K(B O_ACCMODE $B$rDj5A(B
+ domain.c:
+ 	CANON_OTHER NO_CANON_MX $B$N$?$a$NJQ99(B
+ 	($B$3$l$i$rDj5A$7$J$$>l9g$K$O!"(Bdomain.c $B$X$NJQ99$OI,MW$J$$(B)
+ macro.c:
+ parseaddr.c:
+ 	EXTEND_CLASS EXTEND_MACRO $B$N$?$a$NJQ99(B
+ readcf.c:
+ 	EXTEND_CLASS EXTEND_MACRO FILEMACRO $B$N$?$a$NJQ99(B
+ 	1.6W $B$G$N(B EXTEND_CLASS EXTEND_MACRO $B$N<BAu$G$O(B 0x00-0x3f $B$X%^%C%W$9$k(B
+ 	$B$h$&$K$J$C$F$$$?$,!"(BR8 $B$G$O(B 0x00-0x3f $B$N%(%j%"$bMxMQ$5$l$k$h$&$K$J$C$?(B
+ 	$B$?$a!"AGD>$K(B 0xc0-0xff $B$K%^%C%W$9$k$h$&$KJQ99$7$?(B
+ sendmail.h:
+ 	EXTEND_MACRO $B$N$?$a$N%^%/%m%P%C%U%!$N3HD%(B
diff -c ../src.org/alias.c ./alias.c
*** ../src.org/alias.c	Fri Feb 10 05:22:17 1995
--- ./alias.c	Sat Apr  1 14:48:10 1995
***************
*** 36,41 ****
--- 36,42 ----
  # include <pwd.h>
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)alias.c	2.5 (motonori/WIDE) 4/20/94";
  static char sccsid[] = "@(#)alias.c	8.25 (Berkeley) 4/14/94";
  #endif /* not lint */
  
***************
*** 380,389 ****
--- 381,400 ----
  		/* database is out of date */
  		if (AutoRebuild && stb.st_ino != 0 && stb.st_uid == geteuid())
  		{
+ #if NO_ALIAS_ON_REBUILD
+ 			char OpModeSave;
+ #endif
  			message("auto-rebuilding alias database %s", buf);
  			if (isopen)
  				map->map_class->map_close(map);
+ #if NO_ALIAS_ON_REBUILD
+ 			OpModeSave = OpMode;
+ 			OpMode = MD_INITALIAS;
+ #endif
  			rebuildaliases(map, TRUE);
+ #if NO_ALIAS_ON_REBUILD
+ 			OpMode = OpModeSave;
+ #endif
  			isopen = map->map_class->map_open(map, O_RDONLY);
  		}
  		else
***************
*** 645,651 ****
--- 656,666 ----
  				break;
  			}
  		}
+ #if LHS_CHECK_CNTL
+ 		if (CheckAliases && (al.q_mailer != LocalMailer))
+ #else
  		if (al.q_mailer != LocalMailer)
+ #endif
  		{
  			syserr("554 %s... cannot alias non-local names",
  				al.q_paddr);
diff -c ../src.org/aliases.0 ./aliases.0
*** ../src.org/aliases.0	Sat Apr  1 14:45:08 1995
--- ./aliases.0	Sat Apr  1 14:48:10 1995
***************
*** 0 ****
--- 1,48 ----
+ ALIASES(5)                 UNIX Programmer's Manual                 ALIASES(5)
+ 
+ NAME
+      aliases - aliases file for sendmail
+ 
+ SYNOPSIS
+      aliases
+ 
+ DESCRIPTION
+      This file describes user ID aliases used by /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l. The file
+      resides in /_e_t_c and is formatted as a series of lines of the form
+ 
+            name: name_1, name2, name_3, . . .
+ 
+      The _n_a_m_e is the name to alias, and the _n_a_m_e__n are the aliases for that
+      name.  Lines beginning with white space are continuation lines.  Lines
+      beginning with `#' are comments.
+ 
+      Aliasing occurs only on local names.  Loops can not occur, since no mes-
+      sage will be sent to any person more than once.
+ 
+      After aliasing has been done, local and valid recipients who have a
+      ``._f_o_r_w_a_r_d'' file in their home directory have messages forwarded to the
+      list of users defined in that file.
+ 
+      This is only the raw data file; the actual aliasing information is placed
+      into a binary format in the file /_e_t_c/_a_l_i_a_s_e_s._d_b using the program
+      newaliases(1).  A newaliases command should be executed each time the
+      aliases file is changed for the change to take effect.
+ 
+ SEE ALSO
+      newaliases(1),  dbopen(3),  dbm(3),  sendmail(8)
+ 
+      _S_E_N_D_M_A_I_L _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e.
+ 
+      _S_E_N_D_M_A_I_L _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r.
+ 
+ BUGS
+      If you have compiled sendmail with DBM support instead of NEWDB, you may
+      have encountered problems in dbm(3) restricting a single alias to about
+      1000 bytes of information.  You can get longer aliases by ``chaining'';
+      that is, make the last name in the alias be a dummy name which is a con-
+      tinuation alias.
+ 
+ HISTORY
+      The aliases file format appeared in 4.0BSD.
+ 
+ 4th Berkeley Distribution     December 11, 1993                              1
diff -c ../src.org/arpadate.c ./arpadate.c
*** ../src.org/arpadate.c	Fri Feb 10 05:22:05 1995
--- ./arpadate.c	Sat Apr  1 14:48:10 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)arpadate.c	2.1 (motonori/WIDE) 10/6/93";
  static char sccsid[] = "@(#)arpadate.c	8.1 (Berkeley) 6/7/93";
  #endif /* not lint */
  
***************
*** 145,150 ****
--- 146,158 ----
  		off -= 24 * 60;
  	else if (lt->tm_yday > gmt.tm_yday)
  		off += 24 * 60;
+ #if ADJUST_TZ
+ 	/* I check time offset is really correct value.
+ 	   (thanks for ray@csl.hiroshima-u.ac.jp)
+ 	   -- yasuhiro@dcl.co.jp 91/2/5 */
+ 	if ((off % 10) != 0)
+ 		off++;		/* I adjust time offset value */
+ #endif /* ADJUST_TZ */
  
  	*q++ = ' ';
  	if (off == 0) {
diff -c ../src.org/conf.c ./conf.c
*** ../src.org/conf.c	Wed Mar  8 02:49:18 1995
--- ./conf.c	Sat Apr  1 14:48:11 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)conf.c	2.13 (motonori/WIDE) 3/12/95";
  static char sccsid[] = "@(#)conf.c	8.89.1.3 (Berkeley) 3/7/95";
  #endif /* not lint */
  
***************
*** 549,554 ****
--- 550,558 ----
  
  	bzero(&n, sizeof n);
  	n.sa_handler = handler;
+ #ifdef SA_RESTART
+ 	n.sa_flags = SA_RESTART;
+ #endif
  	if (sigaction(sig, &n, &o) < 0)
  		return SIG_ERR;
  	return o.sa_handler;
***************
*** 722,728 ****
  					_PATH_UNIX, LA_AVENRUN);
  			return (-1);
  		}
! #ifdef IRIX
  		Nl[X_AVENRUN].n_value &= 0x7fffffff;
  #endif
  	}
--- 726,732 ----
  					_PATH_UNIX, LA_AVENRUN);
  			return (-1);
  		}
! #if defined(IRIX) || defined(nec_ews_svr4)
  		Nl[X_AVENRUN].n_value &= 0x7fffffff;
  #endif
  	}
***************
*** 1680,1689 ****
  #  if SFS_TYPE == SFS_4ARGS
  	if (statfs(dir, &fs, sizeof fs, 0) == 0)
  #  else
! #   if defined(ultrix)
! 	if (statfs(dir, &fs) > 0)
  #   else
  	if (statfs(dir, &fs) == 0)
  #   endif
  #  endif
  # endif
--- 1684,1697 ----
  #  if SFS_TYPE == SFS_4ARGS
  	if (statfs(dir, &fs, sizeof fs, 0) == 0)
  #  else
! #   if SFS_TYPE == SFS_STATVFS && !defined(UNIXWARE)
! 	if (statvfs(dir, &fs) == 0)
  #   else
+ #    if defined(ultrix)
+ 	if (statfs(dir, &fs) > 0)
+ #    else
  	if (statfs(dir, &fs) == 0)
+ #    endif
  #   endif
  #  endif
  # endif
diff -c ../src.org/conf.h ./conf.h
*** ../src.org/conf.h	Fri Feb 10 05:22:03 1995
--- ./conf.h	Sun Apr 16 20:21:31 1995
***************
*** 31,36 ****
--- 31,37 ----
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
+  *	@(#)conf.h	2.27 (motonori/WIDE) 4/16/95
   *	@(#)conf.h	8.104 (Berkeley) 4/17/94
   */
  
***************
*** 69,74 ****
--- 70,80 ----
  # define QUEUESIZE	1000		/* max # of jobs per queue run */
  # endif
  
+ /* for CANON_OTHER */
+ # define QSEQSIZ	10	/* max # of DNS query types */
+ /* for MULTI_MAILER */
+ # define MAXDSPTMAILERS	3	/* max # of dispatching mailers in one rule */
+ 
  /**********************************************************************
  **  Compilation options.
  **
***************
*** 85,90 ****
--- 91,122 ----
  # ifdef NEWDB
  # define USERDB		1	/* look in user database (requires NEWDB) */
  # endif
+ /* WIDE enhancements for 1.6W compatibility */
+ # define FILEMACRO	1	/* macro definition by file */
+ # define EXTEND_CLASS	1	/* extend class char ^A-^z */
+ # define EXTEND_MACRO	1	/* extend macro char ^A-^z */
+ # define ADJUST_TZ	1	/* adjust TZ value from +859 to +900 */
+ # define LOGWVERSION	1	/* leave WVersion/WhoAndWhere on syslog */
+ /* WIDE newer enhancements */
+ # define COMPILEOPTIONS	1	/* put option strings into binary */
+ # define CANON_MX_CNTL	1	/* canonicalization with/without MX records */
+ # define CANON_OTHER	1	/* canonicalization with extra records */
+ # define SHOW_MX_HOSTS	1	/* MX hosts are displaied in test mode */
+ # define AUTH_LOG       1       /* send Authentication-Warnings to syslog */
+ # define ESMTPPEERSCLS	1	/* use class 'e' as ESMTP peers list */
+ # define IDENTPEERSCLS	1	/* use class 'i' as IDENT peers list */
+ # define MX_SAFETY	1	/* eliminate unknown host from MX RRs */
+ # define PERROR_QUP	0	/* retry on remote protocol error */
+ # define ALL_HASH_CMNT	0	/* treat after # as a comment in include file */
+ # define QUICK_RESPONSE	0	/* not queue up error response even with -odq */
+ # define LHS_CHECK_CNTL	0	/* skip LHS checking with -n on newaliases */
+ # define NO_ALIAS_ON_REBUILD 0	/* supress alias lookup via $( $) on rebuild */
+ # define MULTI_MAILER	0	/* support multiple mailer dispatching */
+ # define ANOTHER_MXPB	0	/* use another MX piggy backing code */
+ # define RCPT_NEXT	0	/* try next MX if RCPT returns TEMPFAIL(4xx) */
+ /* 2.5W enhancements */
+ # define NON_BLOCK_CONNECT 1	/* enable concurrent establishment of TCP */
+ # define CO_RESOLV 1		/* enable concurrent MX query */
  
  /**********************************************************************
  **  0/1 Compilation options.
***************
*** 93,99 ****
  **********************************************************************/
  
  # ifndef NAMED_BIND
! #  define NAMED_BIND	1	/* use Berkeley Internet Domain Server */
  # endif
  
  /*
--- 125,131 ----
  **********************************************************************/
  
  # ifndef NAMED_BIND
! #  define NAMED_BIND	0	/* use Berkeley Internet Domain Server */
  # endif
  
  /*
***************
*** 181,186 ****
--- 213,221 ----
  **	Compiles on 4.0.1.
  */
  
+ # if defined(IRIXV) && !defined(IRIX)
+ # define IRIX
+ # endif
  # ifdef IRIX
  # define SYSTEM5	1	/* this is a System-V derived system */
  # define HASSETREUID	1	/* has setreuid(2) call */
***************
*** 187,198 ****
  # define HASINITGROUPS	1	/* has initgroups(3) call */
  # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
  # define FORK		fork	/* no vfork primitive available */
! # define WAITUNION	1	/* use "union wait" as wait argument type */
  # define setpgid	BSDsetpgrp
  # define GIDSET_T	gid_t
  # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
  # define LA_TYPE	LA_INT
  # endif
  
  
  /*
--- 222,238 ----
  # define HASINITGROUPS	1	/* has initgroups(3) call */
  # define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
  # define FORK		fork	/* no vfork primitive available */
! # ifndef IRIXV
! #  define WAITUNION	1	/* use "union wait" as wait argument type */
! # endif
  # define setpgid	BSDsetpgrp
  # define GIDSET_T	gid_t
  # define SFS_TYPE	SFS_4ARGS	/* four argument statfs() call */
  # define LA_TYPE	LA_INT
  # endif
+ # ifdef IRIXV
+ # define NO_UNISTD_H
+ # endif
  
  
  /*
***************
*** 789,794 ****
--- 829,895 ----
  
  
  /*
+ **  UnixWare
+ **
+ **	From Evan Champion <evanc@spatial.synapse.org>.
+ */
+ 
+ #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 <pauls@locust.cic.net>
+ */
+ 
+ #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 <kevin@tech.mis.cfc.com>.
+ */
+ 
+ #ifdef NCR3000
+ # define __svr4__
+ # undef BSD
+ # define LA_AVENRUN	"avenrun"
+ #endif
+  
+ 
+ 
+ /*
  **  Cray Unicos
  **
  **	Ported by David L. Kensiski, Sterling Sofware <kensiski@nas.nasa.gov>
***************
*** 834,900 ****
  
  
  /*
! **  UnixWare
! **
! **	From Evan Champion <evanc@spatial.synapse.org>.
  */
  
! #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 <pauls@locust.cic.net>
  */
  
! #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 <kevin@tech.mis.cfc.com>.
  */
  
! #ifdef NCR3000
! # define __svr4__
! # undef BSD
  # define LA_AVENRUN	"avenrun"
  #endif
-  
  
! 
! 
  
  /**********************************************************************
  **  End of Per-Operating System defines
--- 935,1056 ----
  
  
  /*
! **  Sony NEWS-OS 4.2.1R and 6.0.1
  */
  
! #ifdef sony_news
! # ifndef __svr4
! 			/* NEWS-OS 4.2.1R */
! #  define HASUNSETENV	1	/* has unsetenv(2) call */
! #  undef HASSETVBUF		/* don't actually have setvbuf(3) */
! #  define WAITUNION	1	/* use "union wait" as wait argument type */
! #  define LA_TYPE	LA_INT
! #  define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
! #  define setpgid	setpgrp
! #  undef WIFEXITED
! #  undef WEXITSTATUS
! typedef int		pid_t;
! #  ifndef __P
! #   include "cdefs.h"
! #  endif
! typedef int		(*sigfunc_t) __P((int));
! #  define SIGFUNC_DEFINED
! # else
! 			/* NEWS-OS 6.0.1 with /bin/cc */
! #  define SYSTEM5	1	/* include all the System V defines */
! #  define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
! #  define HASINITGROUPS	1	/* has initgroups(3) call */
! #  define HASSETREUID	1	/* has setreuid(2) call */
! #  define setreuid(r, e)	seteuid(e)
! #  define HASSETSID	1	/* has Posix setsid(2) call */
! #  define LA_TYPE	LA_INT
! #  define SFS_TYPE	SFS_STATVFS	/* use <sys/statvfs.h> statvfs() impl */
! #  define GIDSET_T	gid_t
! #  undef WIFEXITED
! #  undef WEXITSTATUS
  # endif
! #endif
! 
! 
! /*
! **  Omron LUNA/UNIOS-B 3.0, LUNA2/Mach and LUNA88K Mach
! */
! 
! #ifdef luna
! # ifndef IDENTPROTO
! #  define IDENTPROTO	0	/* TCP/IP implementation is broken */
  # endif
! # ifdef uniosb
! #  define NEEDVPRINTF	1	/* need a replacement for vprintf(3) */
  # endif
! # define NEEDGETOPT	1	/* need a replacement for getopt(3) */
! # define WAITUNION	1	/* use "union wait" as wait argument type */
! # ifdef uniosb
! #  define LA_TYPE	LA_INT
! # endif
! # ifdef luna2m
! #  define LA_TYPE	LA_SUBR
! # endif
! # define SFS_TYPE	SFS_VFS	/* use <sys/vfs.h> statfs() implementation */
! # define setpgid	setpgrp
! # undef WIFEXITED
! # undef WEXITSTATUS
! typedef int		pid_t;
! extern	char		*getenv();
! extern	int		errno;
  #endif
  
  
  /*
! **  NEC EWS-UX/V 4.2
  **
! **  with /usr/ucb/cc
  */
  
! #ifdef nec_ews_svr4
! # define SYSTEM5	1	/* include all the System V defines */
! # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
! # define HASINITGROUPS	1	/* has initgroups(3) call */
! # define HASSETREUID	1	/* has setreuid(2) call */
! # define setreuid(r, e)	seteuid(e)
! # define HASSETSID	1	/* has Posix setsid(2) call */
! # define LA_TYPE	LA_INT
! # define SFS_TYPE	SFS_USTAT	/* use System V ustat(2) syscall */
! # define GIDSET_T	gid_t
  # ifndef HASGETUSERSHELL
  #  define HASGETUSERSHELL 0	/* does not have getusershell(3) call */
  # endif
! # undef WIFEXITED
! # undef WEXITSTATUS
! # ifndef _PATH_UNIX
! #  define _PATH_UNIX		"/unix"
! # endif
! # ifndef _PATH_SENDMAILCF
! #  define _PATH_SENDMAILCF	"/var/ucblib/sendmail.cf"
! # endif
! # ifndef _PATH_SENDMAILPID
! #  define _PATH_SENDMAILPID	"/var/ucblib/sendmail.pid"
! # endif
  #endif
  
  
  /*
! **  SUMISTATION/SEIUX 3.2
  */
  
! #ifdef SEIUX
! # ifdef	SYSTYPE_BSD
! #  define HASUNSETENV	1	/* has unsetenv(3) call */
! #  define HASFLOCK	1	/* has flock(2) call */
! # endif
! # define LA_TYPE	LA_INT
  # define LA_AVENRUN	"avenrun"
+ # define _PATH_UNIX	"/unix"
+ # define setpgid	setpgrp
+ typedef int		pid_t;
  #endif
  
!   
  
  /**********************************************************************
  **  End of Per-Operating System defines
diff -c ../src.org/daemon.c ./daemon.c
*** ../src.org/daemon.c	Wed Mar 29 11:36:51 1995
--- ./daemon.c	Fri Apr 14 12:18:33 1995
***************
*** 36,41 ****
--- 36,42 ----
  #include "sendmail.h"
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)daemon.c	2.24 (motonori/WIDE) 4/14/95";
  #ifdef DAEMON
  static char sccsid[] = "@(#)daemon.c	8.48.1.5 (Berkeley) 3/28/95 (with daemon mode)";
  #else
***************
*** 53,58 ****
--- 54,63 ----
  # include <resolv.h>
  #endif
  
+ #if CANON_MX_CNTL
+ int	TryMXforCanon = 0;
+ #endif /* CANON_MX_CNTL */
+ 
  /*
  **  DAEMON.C -- routines to use when running as a daemon.
  **
***************
*** 132,138 ****
  		sp = getservbyname("smtp", "tcp");
  		if (sp == NULL)
  		{
! 			syserr("554 service \"smtp\" unknown");
  			DaemonAddr.sin.sin_port = htons(25);
  		}
  		else
--- 137,146 ----
  		sp = getservbyname("smtp", "tcp");
  		if (sp == NULL)
  		{
! 			/* syserr("554 service \"smtp\" unknown"); */
! #ifdef LOG
! 			syslog(LOG_ERR, "service \"smtp\" unknown");
! #endif
  			DaemonAddr.sin.sin_port = htons(25);
  		}
  		else
***************
*** 624,629 ****
--- 632,647 ----
  
  SOCKADDR	CurHostAddr;		/* address of current host */
  
+ #if NON_BLOCK_CONNECT
+ static
+ connecttimeout()
+ {
+ 	/* no operation */
+ 	if (LogLevel > 9)
+ 		syslog(LOG_DEBUG, "NBC: alarm clock\n");
+ }
+ #endif
+ 
  int
  makeconnection(host, port, mci, usesecureport)
  	char *host;
***************
*** 639,644 ****
--- 657,666 ----
  #if NAMED_BIND
  	extern int h_errno;
  #endif
+ #if NON_BLOCK_CONNECT
+ 	EVENT *ev;
+ 	int rc;
+ #endif
  
  	/*
  	**  Set up the address for the mailer.
***************
*** 733,738 ****
--- 755,787 ----
  		i = 1;
  	}
  
+ #if NAMED_BIND && SHOW_MX_HOSTS
+ 	if (OpMode == MD_TEST) {
+ 		printf("%s", anynet_ntoa(&addr));
+ 		while (hp && hp->h_addr_list[i])
+ 		{
+ 			switch (addr.sa.sa_family)
+ 			{
+ #ifdef NETINET
+ 			  case AF_INET:
+ 				bcopy(hp->h_addr_list[i++],
+ 				      &addr.sin.sin_addr,
+ 				      hp->h_length);
+ 				break;
+ #endif
+ 
+ 			  default:
+ 				bcopy(hp->h_addr_list[i++],
+ 					addr.sa.sa_data,
+ 					hp->h_length);
+ 				break;
+ 			}
+ 			printf(", %s", anynet_ntoa(&addr));
+ 			continue;
+ 		}
+ 		return (EX_OK);
+ 	}
+ #endif
  	/*
  	**  Determine the port number.
  	*/
***************
*** 745,751 ****
  
  		if (sp == NULL)
  		{
! 			syserr("554 makeconnection: service \"smtp\" unknown");
  			port = htons(25);
  		}
  		else
--- 794,803 ----
  
  		if (sp == NULL)
  		{
! 			/* syserr("554 makeconnection: service \"smtp\" unknown"); */
! #ifdef LOG
! 			syslog(LOG_ERR, "service \"smtp\" unknown");
! #endif
  			port = htons(25);
  		}
  		else
***************
*** 833,840 ****
--- 885,924 ----
  		if (CurEnv->e_xfp != NULL)
  			(void) fflush(CurEnv->e_xfp);		/* for debugging */
  		errno = 0;					/* for debugging */
+ #if NON_BLOCK_CONNECT
+ 		mci->mci_sd = s;
+ 		if (MaxMciCache > 1)
+ 			ev = setevent((time_t)3, connecttimeout, 0);
+ 		rc = connect(s, (struct sockaddr *) &addr, addrlen);
+ 		if (MaxMciCache > 1)
+ 			clrevent(ev);
+ 		if (MaxMciCache <= 1 && rc >= 0)
+ 			break;
+ 		if (MaxMciCache > 1 && rc >= 0)
+ 		{
+ 			struct timeval timeout;
+ 			struct fd_set fds;
+ 			
+ 			timeout.tv_sec = 3;
+ 			timeout.tv_usec = 0;
+ 			FD_ZERO(&fds);
+ 			FD_SET(s, &fds);
+ 			if (select(s+1, &fds, NULL, NULL, &timeout) > 0)
+ 				break;	/* success and got message */
+ 			else
+ 				errno = EINTR;
+ 		}
+ 		if (MaxMciCache > 1 && errno == EINTR) {
+ 			/* postpone the job */
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: connection in progress (return)\n");
+ 			errno = 0;
+ 			return (111);	/* EX_??? */
+ 		}
+ #else
  		if (connect(s, (struct sockaddr *) &addr, addrlen) >= 0)
  			break;
+ #endif
  
  		/* couldn't connect.... figure out why */
  		sav_errno = errno;
***************
*** 997,1003 ****
--- 1081,1091 ----
  	EVENT *ev;
  	int nleft;
  	char ibuf[MAXNAME + 1];
+ #if IDENTPEERSCLS
+ 	char bi_buf[MAXHOSTNAMELEN];
+ 	STAB *st;
  #endif
+ #endif
  	static char hbuf[MAXNAME * 2 + 2];
  	extern char *hostnamebyanyaddr();
  	extern char RealUserName[];			/* main.c */
***************
*** 1019,1024 ****
--- 1107,1138 ----
  	}
  
  #if IDENTPROTO
+ #if IDENTPEERSCLS
+         p = RealHostName;
+         while (p != NULL)
+         {
+                 if ((st = stab(p, ST_CLASS, ST_FIND)) != NULL &&
+                     bitnset('i', st->s_class))
+                 {
+                         break;		/* use IDENT proto */
+                 }
+ 		sprintf(bi_buf, "!%s", p);
+ 		if ((st = stab(bi_buf, ST_CLASS, ST_FIND)) != NULL &&
+ 		    bitnset('i', st->s_class))
+ 		{
+                         goto noident;	/* do not use IDENT proto */
+ 		}
+ 		p = strchr(p+1, '.');
+ 	}
+ 	if (p == NULL)
+ 	{
+ 		if ((st = stab("!all", ST_CLASS, ST_FIND)) != NULL &&
+ 		    bitnset('i', st->s_class))
+ 		{
+ 			goto noident;	/* do not use IDENT proto */
+ 		}
+ 	}
+ #endif
  	if (TimeOuts.to_ident == 0)
  		goto noident;
  
***************
*** 1242,1248 ****
--- 1356,1366 ----
  			printf("host_map_lookup(%s) => ", name);
  		s->s_namecanon.nc_flags |= NCF_VALID;		/* will be soon */
  		(void) strcpy(hbuf, name);
+ #if CANON_MX_CNTL
+ 		if (getcanonname(hbuf, sizeof hbuf - 1, TryMXforCanon))
+ #else /* not CANON_MX_CNTL */
  		if (getcanonname(hbuf, sizeof hbuf - 1, TRUE))
+ #endif /* not CANON_MX_CNTL */
  		{
  			if (tTd(9, 1))
  				printf("%s\n", hbuf);
diff -c ../src.org/deliver.c ./deliver.c
*** ../src.org/deliver.c	Wed Mar 29 11:26:34 1995
--- ./deliver.c	Sat Apr  1 14:50:34 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)deliver.c	2.38 (motonori/WIDE) 4/1/95";
  static char sccsid[] = "@(#)deliver.c	8.84.1.4 (Berkeley) 3/28/95";
  #endif /* not lint */
  
***************
*** 48,53 ****
--- 49,58 ----
  
  extern char	SmtpError[];
  
+ #if MX_SAFETY
+ static char	*MxSafety = "SAFETY";
+ #endif
+ 
  /*
  **  SENDALL -- actually send all the messages.
  **
***************
*** 76,81 ****
--- 81,89 ----
  	register ENVELOPE *ee;
  	ENVELOPE *splitenv = NULL;
  	bool announcequeueup;
+ #if NAMED_BIND && ANOTHER_MXPB
+ 	extern void resethostsignature();
+ #endif
  
  	/*
  	**  If we have had global, fatal errors, don't bother sending
***************
*** 337,342 ****
--- 345,355 ----
  	register ADDRESS *q;
  	char *qf;
  	char *id;
+ #if NON_BLOCK_CONNECT
+ 	int pending;
+ 	int all_pending;
+ 	MCI *mci, *mci_wait();
+ #endif
  
  	/*
  	**  If we have had global, fatal errors, don't bother sending
***************
*** 457,468 ****
--- 470,494 ----
  	e->e_nsent = 0;
  	e->e_flags |= EF_GLOBALERRS;
  
+ #if NAMED_BIND && CO_RESOLV
+ 	co_getmx(e);
+ #endif
+ #if NON_BLOCK_CONNECT
+ 	all_pending = 0;
+ once_again:
+ 	pending = 0;
+ #endif
  	/* now run through the queue */
  	for (q = e->e_sendqueue; q != NULL; q = q->q_next)
  	{
  #ifdef XDEBUG
  		char wbuf[MAXNAME + 20];
+ #endif
  
+ #if NON_BLOCK_CONNECT
+ 	cont:
+ #endif
+ #ifdef XDEBUG
  		(void) sprintf(wbuf, "sendall(%s)", q->q_paddr);
  		checkfd012(wbuf);
  #endif
***************
*** 482,488 ****
--- 508,518 ----
  						q->q_user);
  			}
  		}
+ #if NON_BLOCK_CONNECT
+ 		else if (!bitset(QDONTSEND|QBADADDR|QQUEUEUP, q->q_flags))
+ #else
  		else if (!bitset(QDONTSEND|QBADADDR, q->q_flags))
+ #endif
  		{
  # ifdef QUEUE
  			/*
***************
*** 495,503 ****
--- 525,582 ----
  				e->e_nsent = 0;
  			}
  # endif /* QUEUE */
+ #if NON_BLOCK_CONNECT
+ 			if (LogLevel > 9) {
+ 				if (q->q_mci)
+ syslog(LOG_DEBUG, "NBC: mci state: %x\n", q->q_mci->mci_state);
+ 			}
+ 			if (q->q_mci != NULL
+ 			 && q->q_mci->mci_state == MCIS_CONNECTING)
+ 			{
+ 				pending = 1;
+ 				if (LogLevel > 9) {
+ syslog(LOG_DEBUG, "NBC: skip pending address: %s", q->q_user);
+ 				}
+ 				continue;
+ 			}
+ 			(void) deliver(e, q, &pending);
+ 			mci = mci_wait(e, all_pending);
+ 			if (mci != NULL)
+ 			{
+ 				if (LogLevel > 9)
+ syslog(LOG_DEBUG, "NBC: connection status changed\n");
+ 				q = mci->mci_to;
+ 				goto cont;
+ 			}
+ #else
  			(void) deliver(e, q);
+ #endif
  		}
  	}
+ #if NON_BLOCK_CONNECT
+ 	if (pending)
+ 	{
+ 		if (all_pending) { /* XXX for safety */
+ 			sleep(30);
+ 		}
+ 		if (LogLevel > 8)
+ syslog(LOG_DEBUG, "NBC: retry from the top\n");
+ 		all_pending = 1;
+ 		(void)mci_wait(e, all_pending);
+ 		goto once_again;
+ 	}
+ 	if (LogLevel > 8) {
+ 		extern int waiting_max;
+ 
+ 		syslog(LOG_INFO, "%s: NBC: done (max waiting connections: %d)",
+ 			e->e_id, waiting_max);
+ 	}
+ 	if (LogLevel > 9)
+ 		printopenfds(TRUE);
+ #endif
+ #if NAMED_BIND && ANOTHER_MXPB
+ 	resethostsignature();
+ #endif
  	Verbose = oldverbose;
  
  #ifdef XDEBUG
***************
*** 592,600 ****
--- 671,686 ----
  **		The standard input is passed off to someone.
  */
  
+ #if NON_BLOCK_CONNECT
+ deliver(e, firstto, inprogress)
+ #else
  deliver(e, firstto)
+ #endif
  	register ENVELOPE *e;
  	ADDRESS *firstto;
+ #if NON_BLOCK_CONNECT
+ 	int *inprogress;
+ #endif
  {
  	char *host;			/* host being sent to */
  	char *user;			/* user being sent to */
***************
*** 618,624 ****
--- 704,720 ----
  	char buf[MAXNAME];
  	char rpathbuf[MAXNAME];		/* translated return path */
  	extern int checkcompat();
+ #if NAMED_BIND && ANOTHER_MXPB
+ 	bool needtrim = FALSE;
+ 	extern int cmphostsignature();
+ 	extern bool trimhostsignature();
+ #endif
  
+ #if ANOTHER_MXPB || MULTI_MAILER
+ /* retry on next MX/mailer  */
+ retry_deliver:;
+ #endif
+ 
  	errno = 0;
  	if (bitset(QDONTSEND|QBADADDR|QQUEUEUP, to->q_flags))
  		return (0);
***************
*** 774,780 ****
--- 870,881 ----
  		/* if already sent or not for this host, don't send */
  		if (bitset(QDONTSEND|QBADADDR|QQUEUEUP, to->q_flags) ||
  		    to->q_mailer != firstto->q_mailer ||
+ #if NAMED_BIND && ANOTHER_MXPB
+ 		    cmphostsignature(firstsig,
+ 			hostsignature(to->q_mailer, to->q_host, e)) != 0)
+ #else
  		    strcmp(hostsignature(to->q_mailer, to->q_host, e), firstsig) != 0)
+ #endif
  			continue;
  
  		/* avoid overflowing tobuf */
***************
*** 874,882 ****
--- 975,997 ----
  		**  argv, and add it to the print list of recipients.
  		*/
  
+ #if NON_BLOCK_CONNECT
+ 		to->q_mci = NULL;
  		/* link together the chain of recipients */
+ 		if (tochain == NULL) {
+ 			tochain = to;
+ 		} else {
+ 			ADDRESS *q = tochain;
+ 			while (q->q_tchain != NULL)
+ 				q = q->q_tchain;
+ 			q->q_tchain = to;
+ 		}
+ 		to->q_tchain = NULL;
+ #else
+ 		/* link together the chain of recipients */
  		to->q_tchain = tochain;
  		tochain = to;
+ #endif
  
  		/* create list of users for error messages */
  		(void) strcat(tobuf, ",");
***************
*** 1021,1027 ****
--- 1136,1146 ----
  		else
  			port = 0;
  tryhost:
+ #if NAMED_BIND && ANOTHER_MXPB
+ 		if (*curhost != '\0')
+ #else
  		while (*curhost != '\0')
+ #endif
  		{
  			register char *p;
  			static char hostbuf[MAXNAME];
***************
*** 1034,1040 ****
--- 1153,1163 ----
  			{
  				syserr("deliver: null host name in signature");
  				curhost++;
+ #if NAMED_BIND && ANOTHER_MXPB
+ 				goto skip_loop;
+ #else
  				continue;
+ #endif
  			}
  			strncpy(hostbuf, curhost, p - curhost);
  			hostbuf[p - curhost] = '\0';
***************
*** 1045,1050 ****
--- 1168,1232 ----
  			/* see if we already know that this host is fried */
  			CurHostName = hostbuf;
  			mci = mci_get(hostbuf, m);
+ #if NON_BLOCK_CONNECT
+ 			if (mci->mci_state == MCIS_CONNECTING)
+ 			{
+ 				if (LogLevel > 9)
+ syslog(LOG_DEBUG, "NBC: connection in progress to %s\n", hostbuf);
+ 
+ 				mci->mci_to = tochain;
+ 				for (to = tochain; to != NULL;
+ 				     to = to->q_tchain)
+ 				{
+ 					if (LogLevel > 9) {
+ syslog(LOG_DEBUG, "NBC: marking address: %s", to->q_user);
+ 					}
+ 					to->q_mci = mci;
+ 					to->q_flags &= ~QDONTSEND;
+ 				}
+ #ifdef notdef /* XXX may be no use */
+ 				mci->mci_lastuse = curtime();
+ 				mci->mci_exitstat = EX_OK;
+ 				mci->mci_errno = 0;
+ #if NAMED_BIND
+ 				mci->mci_herrno = 0;
+ #endif
+ #endif
+ 				errno = 0;
+ 				define('g', (char *) NULL, e);
+ 				*inprogress = 1;
+ 				return (EX_OK);
+ 			}
+ 			if (mci->mci_state == MCIS_OPENING)
+ 			{
+ 				int s;
+ 				extern SOCKADDR CurHostAddr;
+ 				int socksize = sizeof CurHostAddr;
+ 
+ 				s = mci->mci_sd;
+ 				if (LogLevel > 9)
+ syslog(LOG_DEBUG, "NBC: already connected (fd %d)\n", s);
+ 				if ((mci->mci_out = fdopen(s, "w")) == NULL ||
+ 				    (s = dup(s)) < 0 ||
+ 				    (mci->mci_in = fdopen(s, "r")) == NULL)
+ 				{
+ 					if (LogLevel > 9)
+ syslog(LOG_DEBUG, "NBC: cannot open SMTP client channel, fd=%d", s);
+ #if NAMED_BIND && ANOTHER_MXPB
+ 					goto skip_loop;
+ #else
+ 					break;
+ #endif
+ 				}
+ 				if (LogLevel > 9)
+ syslog(LOG_DEBUG, "NBC: dup (fd %d)\n", s);
+ 
+ 				(void) getpeername(s,
+ 					(struct sockaddr *) &CurHostAddr,
+ 					&socksize);
+ 				goto connected;
+ 			}
+ #endif
  			if (mci->mci_state != MCIS_CLOSED)
  			{
  				if (tTd(11, 1))
***************
*** 1053,1083 ****
--- 1235,1327 ----
  					mci_dump(mci, FALSE);
  				}
  				CurHostName = mci->mci_host;
+ #if NAMED_BIND && ANOTHER_MXPB
+ 				goto skip_loop;
+ #else
  				break;
+ #endif
  			}
  			mci->mci_mailer = m;
  			if (mci->mci_exitstat != EX_OK)
+ #if NAMED_BIND && ANOTHER_MXPB
+ 				goto skip_loop;
+ #else
  				continue;
+ #endif
  
  			/* try the connection */
  			setproctitle("%s %s: %s", e->e_id, hostbuf, "user open");
  			message("Connecting to %s (%s)...",
  				hostbuf, m->m_name);
+ #if NON_BLOCK_CONNECT
+ 					if (LogLevel > 9) {
+ syslog(LOG_DEBUG, "NBC: connecting to %s", hostbuf);
+ 					}
+ #endif
+ #if MX_SAFETY
+ 			p = mci->mci_phase;
+ #endif
  			i = makeconnection(hostbuf, port, mci,
  				bitnset(M_SECURE_PORT, m->m_flags));
+ #if NON_BLOCK_CONNECT
+ 			if (i == 111 /* EX_??? */)
+ 			{
+ 				mci->mci_state = MCIS_CONNECTING;
+ 				mci->mci_to = tochain;
+ 				for (to = tochain; to != NULL;
+ 				     to = to->q_tchain)
+ 				{
+ 					if (LogLevel > 9) {
+ syslog(LOG_DEBUG, "NBC: marking address: %s", to->q_user);
+ 					}
+ 					to->q_mci = mci;
+ 					to->q_flags &= ~QDONTSEND;
+ 				}
+ 				mci->mci_lastuse = curtime();
+ 				mci->mci_exitstat = EX_OK;
+ 				mci->mci_errno = 0;
+ #if NAMED_BIND
+ 				mci->mci_herrno = 0;
+ #endif
+ 				mci_cache(mci);
+ 				errno = 0;
+ 				define('g', (char *) NULL, e);
+ 				*inprogress = 1;
+ 				return (EX_OK);
+ 			}
+ #endif
  			mci->mci_exitstat = i;
  			mci->mci_errno = errno;
  #if NAMED_BIND
  			mci->mci_herrno = h_errno;
  #endif
+ #if MX_SAFETY
+ 			if ((i == EX_NOHOST) && (p == MxSafety))
+ 			{
+ 				mci->mci_exitstat = i = EX_TEMPFAIL;
+ #ifdef LOG
+ 				if (LogLevel > 8)
+ 					syslog(LOG_INFO, "%s: MX %s eliminated",
+ 						e->e_id ? e->e_id : "NOQUEUE",
+ 						hostbuf);
+ #endif
+ 			}
+ #endif /* MX_SAFETY */
  			if (i == EX_OK)
  			{
  				mci->mci_state = MCIS_OPENING;
  				mci_cache(mci);
+ #if NON_BLOCK_CONNECT
+ 			connected:
+ #endif
  				if (TrafficLogFile != NULL)
  					fprintf(TrafficLogFile, "%05d == CONNECT %s\n",
  						getpid(), hostbuf);
+ #if NAMED_BIND && ANOTHER_MXPB
+ 				goto skip_loop;
+ #else
  				break;
+ #endif
  			}
  			else if (tTd(11, 1))
  				printf("openmailer: makeconnection => stat=%d, errno=%d\n",
***************
*** 1088,1093 ****
--- 1332,1340 ----
  
  			/* should print some message here for -v mode */
  		}
+ #if NAMED_BIND && ANOTHER_MXPB
+ skip_loop:
+ #endif
  		if (mci == NULL)
  		{
  			syserr("deliver: no host name");
***************
*** 1293,1298 ****
--- 1540,1548 ----
  
  			i = 0;
  			env[i++] = "AGENT=sendmail";
+ #ifdef DGUX
+ 			env[i++] = "_FORCE_MAIL_LOCAL_=yes";
+ #endif
  			for (ep = environ; *ep != NULL; ep++)
  			{
  				if (strncmp(*ep, "TZ=", 3) == 0 ||
***************
*** 1392,1398 ****
--- 1642,1652 ----
  		else if (rcode == EX_TEMPFAIL && curhost != NULL && *curhost != '\0')
  		{
  			/* try next MX site */
+ #if NAMED_BIND && ANOTHER_MXPB
+ 			goto try_next;
+ #else
  			goto tryhost;
+ #endif
  		}
  	}
  	else if (!clever)
***************
*** 1421,1436 ****
--- 1675,1717 ----
  		{
  			register char *t = tobuf;
  			register int i;
+ #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT
+ 			register ADDRESS *prevto;
+ #endif
  
  			/* send the recipient list */
  			tobuf[0] = '\0';
+ #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT
+ 			for (prevto = NULL, to = tochain; to != NULL;
+ 			     prevto = to, to = to->q_tchain)
+ #else
  			for (to = tochain; to != NULL; to = to->q_tchain)
+ #endif
  			{
  				e->e_to = to->q_paddr;
  				if ((i = smtprcpt(to, m, mci, e)) != EX_OK)
  				{
+ #if NAMED_BIND && ANOTHER_MXPB && RCPT_NEXT
+ 					if (i == EX_TEMPFAIL && strchr(
+ 					    hostsignature(m, to->q_host, e),
+ 					    ':') != NULL)
+ 					{
+ 						to->q_flags &= ~QDONTSEND;
+ 						if (prevto)
+ 							prevto->q_tchain =
+ 								to->q_tchain;
+ 						else
+ 							tochain = to->q_tchain;
+ 						needtrim = TRUE;
+ 					} else {
+ 						markfailure(e, to, i);
+ 						giveresponse(i, m, mci,
+ 							     ctladdr, e);
+ 					}
+ #else
  					markfailure(e, to, i);
  					giveresponse(i, m, mci, ctladdr, e);
+ #endif
  				}
  				else
  				{
***************
*** 1448,1453 ****
--- 1729,1737 ----
  				e->e_to = NULL;
  				if (bitset(MCIF_CACHED, mci->mci_flags))
  					smtprset(m, mci, e);
+ #if NAMED_BIND && ANOTHER_MXPB
+ 				goto try_next;
+ #endif
  			}
  			else
  			{
***************
*** 1457,1469 ****
--- 1741,1823 ----
  
  			/* now close the connection */
  			if (!bitset(MCIF_CACHED, mci->mci_flags))
+ 			{
+ 				if (LogLevel > 9)
+ 					syslog(LOG_DEBUG, "NBC: smtpquit from deliver (%s)", mci->mci_host);
  				smtpquit(m, mci, e);
+ 			}
  		}
+ #if NAMED_BIND && ANOTHER_MXPB
+ 		if (rcode != EX_OK && *curhost != '\0' ||
+ 		    !(firstto->q_flags & QDONTSEND))
+ 		{
+ try_next:
+ 			/* for succeeded delivery */
+ 			if (!(firstto->q_flags & QDONTSEND) && rcode == EX_OK)
+ 			{
+ 				if (tobuf[0] != '\0')
+ 					giveresponse(rcode, m, mci, ctladdr, e);
+ 				for (to = tochain; to; to = to->q_tchain)
+ 				{
+ 					to->q_flags |= QSENT;
+ 					e->e_nsent++;
+ 				}
+ 			}
+ 			/* for unsucceeded delivery */
+ 			if (firstto->q_flags & QDONTSEND && rcode != EX_OK)
+ 			{
+ #if RCPT_NEXT
+ 				register ADDRESS *prevto;
+ 
+ 				for (prevto = NULL, to = tochain; to != NULL;
+ 				     prevto = to, to = to->q_tchain)
+ #else
+ 				for (to = tochain; to; to = to->q_tchain)
+ #endif
+ 				{
+ 					if (strchr(hostsignature(m, to->q_host,
+ 						   e), ':') != NULL)
+ 					{
+ 						/* retry next MX */
+ 						to->q_flags &= ~QDONTSEND;
+ #if RCPT_NEXT
+ 						if (prevto)
+ 							prevto->q_tchain =
+ 								to->q_tchain;
+ 						else
+ 							tochain = to->q_tchain;
+ #endif
+ 					} else {
+ 						/* no more MX */
+ 						markfailure(e, to, rcode);
+ 						giveresponse(rcode, m, mci,
+ 							     ctladdr, e);
+ 					}
+ 				}
+ 			}
+ 			if (trimhostsignature(firstsig))
+ 			{
+ 				/* if next MX RR exists */
+ 				/* re-initialize variables */
+ 				to = firstto;
+ 				clever = FALSE;
+ 				tochain = NULL;
+ 				needtrim = FALSE;
+ 				goto retry_deliver;
+ 			}
+ 		}
+ 		if (needtrim)
+ 		{
+ 			needtrim = FALSE;
+ 			trimhostsignature(firstsig);
+ 		}
+ #else
  		if (rcode != EX_OK && curhost != NULL && *curhost != '\0')
  		{
  			/* try next MX site */
  			goto tryhost;
  		}
+ #endif
  	}
  #else /* not SMTP */
  	{
***************
*** 1495,1500 ****
--- 1849,1893 ----
    give_up:
  	if (tobuf[0] != '\0')
  		giveresponse(rcode, m, mci, ctladdr, e);
+ # if MULTI_MAILER
+ 	if (rcode != EX_OK)
+ 	{
+ 		bool mailer_changed = FALSE;
+ 		int i;
+ 
+ 		if (firstto->q_mailers[1] != NULL)
+ 		{
+ 			mailer_changed = TRUE;
+ 		}
+ 		for (to = tochain; to != NULL; to = to->q_tchain)
+ 		{
+ 			if (to->q_mailers[1] != NULL) {
+ 				to->q_flags &= ~QDONTSEND;
+ 				/* change to next mailer */
+ 				for (i = 0; i < MAXDSPTMAILERS - 1; i++)
+ 				{
+ 					to->q_mailers[i] = to->q_mailers[i+1];
+ 					to->q_hosts[i] = to->q_hosts[i+1];
+ 					to->q_users[i] = to->q_users[i+1];
+ 				}
+ 				to->q_mailers[MAXDSPTMAILERS-1] = NULL;
+ 				to->q_hosts[MAXDSPTMAILERS-1] = NULL;
+ 				to->q_users[MAXDSPTMAILERS-1] = NULL;
+ 			} else if (mailer_changed)
+ 			{
+ 				markfailure(e, to, rcode);
+ 			}
+ 		}
+ 		if (mailer_changed)
+ 		{
+ 			/* re-initialize variables */
+ 			to = firstto;
+ 			clever = FALSE;
+ 			tochain = NULL;
+ 			goto retry_deliver;
+ 		}
+ 	}
+ # endif
  	for (to = tochain; to != NULL; to = to->q_tchain)
  	{
  		if (rcode != EX_OK)
***************
*** 1564,1569 ****
--- 1957,1965 ----
  	  case EX_TEMPFAIL:
  	  case EX_IOERR:
  	  case EX_OSERR:
+ #if PERROR_QUP
+ 	  case EX_PROTOCOL:
+ #endif
  		q->q_flags |= QQUEUEUP;
  		break;
  
***************
*** 1602,1610 ****
--- 1998,2016 ----
  
  	/* close any connections */
  	if (mci->mci_in != NULL)
+ 	{
+ 		if (LogLevel > 9)
+ 			syslog(LOG_DEBUG, "NBC: endmailer close (fd %d)",
+ 			fileno(mci->mci_in));
  		(void) xfclose(mci->mci_in, mci->mci_mailer->m_name, "mci_in");
+ 	}
  	if (mci->mci_out != NULL)
+ 	{
+ 		if (LogLevel > 9)
+ 			syslog(LOG_DEBUG, "NBC: endmailer close (fd %d)",
+ 			fileno(mci->mci_out));
  		(void) xfclose(mci->mci_out, mci->mci_mailer->m_name, "mci_out");
+ 	}
  	mci->mci_in = mci->mci_out = NULL;
  	mci->mci_state = MCIS_CLOSED;
  
***************
*** 2303,2309 ****
  		/*NOTREACHED*/
  	}
  }
! /*
  **  HOSTSIGNATURE -- return the "signature" for a host.
  **
  **	The signature describes how we are going to send this -- it
--- 2709,2724 ----
  		/*NOTREACHED*/
  	}
  }
! 
! #if NAMED_BIND && ANOTHER_MXPB
! struct	SigList	{
! 	STAB	*stab;		/* pointer to stab structure */
! 	char	*signature;	/* pointer to original signature string */
! 	struct	SigList	*next;
! 	} *siglist = NULL;
! #endif
! 
! /*
  **  HOSTSIGNATURE -- return the "signature" for a host.
  **
  **	The signature describes how we are going to send this -- it
***************
*** 2339,2345 ****
--- 2754,2763 ----
  	char *endp;
  	int oldoptions;
  	char *mxhosts[MAXMXHOSTS + 1];
+ #if ANOTHER_MXPB
+ 	struct  SigList  *slp;
  #endif
+ #endif
  
  	/*
  	**  Check to see if this uses IPC -- if not, it can't have MX records.
***************
*** 2399,2404 ****
--- 2817,2836 ----
  		len = 0;
  		for (i = 0; i < nmx; i++)
  		{
+ #if MX_SAFETY
+ 			register MCI *mci;
+ 
+ 			if (strncasecmp(hp, mxhosts[i], strlen(hp)) != 0)
+ 			{
+ 				mci = mci_get(mxhosts[i], m);
+ 				if (mci->mci_state == MCIS_CLOSED &&
+ 				    mci->mci_exitstat == EX_OK &&
+ 				    mci->mci_phase == NULL)
+ 				{
+ 					mci->mci_phase = MxSafety;
+ 				}
+ 			}
+ #endif /* MX_SAFETY */
  			len += strlen(mxhosts[i]) + 1;
  		}
  		if (s->s_hostsig != NULL)
***************
*** 2425,2430 ****
--- 2857,2869 ----
  			*endp++ = ':';
  	}
  	makelower(s->s_hostsig);
+ #if NAMED_BIND && ANOTHER_MXPB
+ 	slp = (struct SigList*)xalloc(sizeof(struct SigList));
+ 	slp->stab = s;
+ 	slp->signature = s->s_hostsig;
+ 	slp->next = siglist;
+ 	siglist = slp;
+ #endif
  	if (ConfigLevel < 2)
  		_res.options = oldoptions;
  #else
***************
*** 2435,2437 ****
--- 2874,3044 ----
  		printf("hostsignature(%s) = %s\n", host, s->s_hostsig);
  	return s->s_hostsig;
  }
+ 
+ #if NAMED_BIND && ANOTHER_MXPB
+ /*
+ **  CMPHOSTSIGNATURE -- compare the first entries of two hostsignatures.
+ **
+ **	Parameters:
+ **		sig1 -- hostsignature 1
+ **		sig2 -- hostsignature 2
+ **
+ **	Returns:
+ **		0 is the first entries of two hostsignatures are equal.
+ **
+ **	Side Effects:
+ **		None.
+ */
+ 
+ int
+ cmphostsignature(sig1, sig2)
+ 	char *sig1, *sig2;
+ {
+ 	char *p1, *p2, *index();
+ 	int result;
+ 
+ 	if (sig1 == NULL || sig2 == NULL)
+ 		return 1;
+ 	p1 = index(sig1, ':');
+ 	if (p1 != NULL)
+ 		*p1 = '\0';
+ 	p2 = index(sig2, ':');
+ 	if (p2 != NULL)
+ 		*p2 = '\0';
+ 	result = strcmp(sig1, sig2);
+ 	if (p1 != NULL)
+ 		*p1 = ':';
+ 	if (p2 != NULL)
+ 		*p2 = ':';
+ 	return result;
+ }
+ /*
+ **  TRIMHOSTSIGNATURE -- remove a specified entry from every hostsignature.
+ **
+ **	Parameters:
+ **		sig -- a signature whose first entry is to be deleted
+ **
+ **	Returns:
+ **		True if one or more entry remains.
+ **
+ **	Side Effects:
+ **		Can tweak the symbol table.
+ */
+ 
+ bool
+ trimhostsignature(sig)
+ 	char *sig;
+ {
+ 	char sigbuf[MAXNAME];
+ 	struct SigList *slp;
+ 	char *p;
+ 	int n;
+ 	bool remains;
+ 
+ 	if (sig == NULL)
+ 		return FALSE;
+ 	p = strchr(sig, ':');
+ 	if (p != NULL)
+ 	{
+ 		n = p - sig;
+ 		remains = TRUE;
+ 	} else {
+ 		n = strlen(sig);
+ 		remains = FALSE;
+ 	}
+ 	strncpy(sigbuf, sig, n);
+ 	sigbuf[n] = '\0';
+ 
+ 	for (slp = siglist; slp != NULL; slp = slp->next)
+ 	{
+ 		if (cmphostsignature(slp->stab->s_hostsig, sigbuf) == 0)
+ 		{
+ 			p = strchr(slp->stab->s_hostsig, ':');
+ 			if (p != NULL)
+ 			{
+ 				slp->stab->s_hostsig = p+1;
+ 			}
+ 		}
+ 	}
+ 	return remains;
+ }
+ /*
+ **  RESETHOSTSIGNATURE -- recover all hostsignature.
+ **
+ **	Parameters:
+ **		none
+ **
+ **	Returns:
+ **		none
+ **
+ **	Side Effects:
+ **		Can tweak the symbol table.
+ */
+ 
+ void
+ resethostsignature()
+ {
+ 	struct SigList *slp;
+ 
+ 	for (slp = siglist; slp != NULL; slp = slp->next)
+ 	{
+ 		slp->stab->s_hostsig = slp->signature;
+ 	}
+ }
+ #endif
+ #if NAMED_BIND && CO_RESOLV
+ #define RES_NONBLOCK    0x1000          /* return immediately, do cacheing */
+ 
+ /* void */
+ co_getmx(e)
+ ENVELOPE *e;
+ {
+ 	register ADDRESS *q;
+ 	int oldoptions;
+ 	int sync_needed = 0;
+ 	union
+ 	{
+ 		HEADER  qb1;
+ 		char    qb2[PACKETSZ];
+ 	} answer;
+ 	long stime, etime;
+ 	int n = 0;
+ 
+ 	if (ConfigLevel < 2)
+ 	{
+ 		oldoptions = _res.options;
+ 		_res.options &= ~(RES_DEFNAMES | RES_DNSRCH);	/* XXX */
+ 	}
+ 	_res.options |= RES_NONBLOCK;
+ 	if (LogLevel > 8)
+ 		syslog(LOG_INFO, "%s: start to get MXRRs with caching",
+ 			e->e_id);
+ 	stime = time(NULL);
+ 	for (q = e->e_sendqueue; q != NULL; q = q->q_next)
+ 	{
+ 		if (bitset(QDONTSEND|QBADADDR|QQUEUEUP, q->q_flags))
+ 			continue;
+ 		if (strcmp(q->q_mailer->m_mailer, "[IPC]") == 0 ||
+ 		    strcmp(q->q_mailer->m_mailer, "[TCP]") == 0)
+ 		{
+ 			/* hostsignature(q->q_mailer, q->q_host, e); */
+ 			if (strpbrk(q->q_host, ":[") == NULL) {
+ 				res_query(q->q_host, C_IN, T_MX,
+ 					(char *)&answer, sizeof(answer));
+ 				sync_needed = 1;
+ 				n++;
+ 			}
+ 		}
+ 	}
+ 
+ 	if (sync_needed)
+ 		res_sync();
+ 	etime = time(NULL);
+ 	_res.options &= ~RES_NONBLOCK;
+ 	if (LogLevel > 8)
+ 		syslog(LOG_INFO, "%s: end of getting MXRRs with caching (%d times, %d seconds)",
+ 			e->e_id, n, etime - stime);
+ 	if (ConfigLevel < 2)
+ 		_res.options = oldoptions;
+ }
+ #endif
diff -c ../src.org/domain.c ./domain.c
*** ../src.org/domain.c	Tue Mar  7 09:03:18 1995
--- ./domain.c	Sat Apr  1 14:48:14 1995
***************
*** 35,40 ****
--- 35,41 ----
  #include "sendmail.h"
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)domain.c	2.13 (motonori/WIDE) 3/12/95";
  #if NAMED_BIND
  static char sccsid[] = "@(#)domain.c	8.19.1.1 (Berkeley) 3/6/95 (with name server)";
  #else
***************
*** 78,83 ****
--- 79,92 ----
  #define LONGSIZE	4	/* size of a long (really, must be 4) */
  
  #define MAXCNAMEDEPTH	10	/* maximum depth of CNAME recursion */
+ 
+ #if CANON_OTHER
+ #ifndef T_TXT	/* shoud be defined in arpa/nameser.h */
+ #define T_TXT		16	/* text strings */
+ #endif
+ 
+ char    Qseq[QSEQSIZ] = {T_A};  /* default is T_A only */
+ #endif /* CANON_OTHER */
  /*
  **  GETMXRR -- get MX resource records for a domain
  **
***************
*** 451,456 ****
--- 460,468 ----
  	char nbuf[MAX(PACKETSZ, MAXDNAME*2+2)];
  	char *searchlist[MAXDNSRCH+2];
  	extern char *gethostalias();
+ #if CANON_OTHER || VERIFY_DNSRCH
+ 	int i;
+ #endif
  
  	if (tTd(8, 2))
  		printf("getcanonname(%s)\n", host);
***************
*** 493,500 ****
--- 505,522 ----
  		*dp++ = "";
  	if (n >= 0 && *--cp != '.' && bitset(RES_DNSRCH, _res.options))
  	{
+ # if VERIFY_DNSRCH
+ 		for (i = 0; i < MAXDNSRCH && _res.dnsrch[i] != NULL; i++)
+ 			*dp++ = _res.dnsrch[i];
+ 		if (i == MAXDNSRCH && _res.dnsrch[i])
+ 		{
+ 			syserr("Inconsistent with resolver.");
+ 			exit(EX_OSERR);
+ 		}
+ # else /* original */
  		for (domain = _res.dnsrch; *domain != NULL; )
  			*dp++ = *domain++;
+ # endif
  	}
  	else if (n == 0 && bitset(RES_DEFNAMES, _res.options))
  	{
***************
*** 520,525 ****
--- 542,557 ----
  		if (tTd(8, 5))
  			printf("getcanonname: trying %s.%s (%s)\n", host, *dp,
  				qtype == T_ANY ? "ANY" : qtype == T_A ? "A" :
+ #if CANON_OTHER
+ 				qtype == T_HINFO ? "HINFO" :
+ 				qtype == T_MINFO ? "MINFO" :
+ 				qtype == T_NS ? "NS" :
+ 				qtype == T_NULL ? "NULL" :
+ 				qtype == T_PTR ? "PTR" :
+ 				qtype == T_SOA ? "SOA" :
+ 				qtype == T_TXT ? "TXT" :
+ 				qtype == T_WKS ? "WKS" :
+ #endif /* CANON_OTHER */
  				qtype == T_MX ? "MX" : "???");
  		ret = res_querydomain(host, *dp, C_IN, qtype,
  				      &answer, sizeof(answer));
***************
*** 544,554 ****
--- 576,614 ----
  					qtype = T_A;
  					continue;
  				}
+ #if CANON_OTHER
+ 				if (*dp == '\0') {
+ 					/* search as absolute address */
+ 					if (qtype == T_A && !gotmx)
+ 					{
+ 						qtype = T_MX;
+ 						continue;
+ 					}
+ 				} else {
+ 					int nextq = 0;
+ 					/* local domain part will be appended */
+ 					for (i = 0; Qseq[i]; i++) {
+ 						if (qtype == Qseq[i]) {
+ 							nextq = Qseq[i+1];
+ 							if (!nextq && !gotmx
+ 							    && trymx) {
+ 								nextq = T_MX;
+ 							}
+ 							break;
+ 						}
+ 					}
+ 					if (nextq) {
+ 						qtype = nextq;
+ 						continue;
+ 					}
+ 				}
+ #else /* not CANON_OTHER */
  				else if (qtype == T_A && !gotmx && trymx)
  				{
  					qtype = T_MX;
  					continue;
  				}
+ #endif /* not CANON_OTHER */
  			}
  
  			if (mxmatch != NULL)
***************
*** 654,661 ****
--- 714,734 ----
  				goto cnameloop;
  
  			  default:
+ #if CANON_OTHER
+ 				for (i = 0; Qseq[i]; i++) {
+ 					if (type == Qseq[i]) {
+ 						/* good show */
+ 						amatch = TRUE;
+ 						break;
+ 					}
+ 				}
+ 
+ 				/* continue in case a CNAME also exists */
+ 				continue;
+ #else /* CANON_OTHER */
  				/* not a record of interest */
  				continue;
+ #endif /* CANON_OTHER */
  			}
  		}
  
***************
*** 673,678 ****
--- 746,780 ----
  
  		if (qtype == T_ANY)
  			qtype = T_A;
+ #if CANON_OTHER
+ 		else if (*dp == '\0') {
+ 			/* search as absolute address */
+ 			if (qtype == T_A && !gotmx) {
+ 				qtype = T_MX;
+ 			}
+ 		} else {
+ 			int nextq = 0;
+ 			/* local domain part will be appended */
+ 			for (i = 0; Qseq[i]; i++) {
+ 				if (qtype == Qseq[i]) {
+ 					nextq = Qseq[i+1];
+ 					if (!nextq && !gotmx && trymx) {
+ 						nextq = T_MX;
+ 					}
+ 					break;
+ 				}
+ 			}
+ 			if (nextq) {
+ 				qtype = nextq;
+ 				continue;
+ 			} else {
+ 				/* really nothing in this domain;
+ 				   try the next */
+ 				qtype = T_ANY;
+ 				dp++;
+ 			}
+ 		}
+ #else /* not CANON_OTHER */
  		else if (qtype == T_A && !gotmx && trymx)
  			qtype = T_MX;
  		else
***************
*** 681,686 ****
--- 783,789 ----
  			qtype = T_ANY;
  			dp++;
  		}
+ #endif /* not CANON_OTHER */
  	}
  
  	if (mxmatch == NULL)
diff -c ../src.org/envelope.c ./envelope.c
*** ../src.org/envelope.c	Wed Mar  1 06:25:58 1995
--- ./envelope.c	Sat Apr  1 14:48:14 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)envelope.c	2.2 (motonori/WIDE) 3/12/95";
  static char sccsid[] = "@(#)envelope.c	8.34.1.1 (Berkeley) 2/28/95";
  #endif /* not lint */
  
***************
*** 146,152 ****
--- 147,158 ----
  		    bitset(QBADADDR, q->q_flags))
  		{
  			if (q->q_owner == NULL &&
+ #ifdef original
  			    strcmp(e->e_from.q_paddr, "<>") != 0)
+ #else
+ 			    (strcmp(e->e_from.q_paddr, "<>") != 0 &&
+ 			     strcmp(e->e_from.q_user, "<>") != 0))
+ #endif
  				(void) sendtolist(e->e_from.q_paddr, NULL,
  						  &e->e_errorqueue, e);
  		}
***************
*** 182,188 ****
--- 188,199 ----
  	{
  		if (!bitset(EF_WARNING|EF_RESPONSE, e->e_flags) &&
  		    e->e_class >= 0 &&
+ #ifdef original
  		    strcmp(e->e_from.q_paddr, "<>") != 0)
+ #else
+ 		    strcmp(e->e_from.q_paddr, "<>") != 0 &&
+ 		    strcmp(e->e_from.q_user, "<>") != 0)
+ #endif
  		{
  			(void) sprintf(buf,
  				"warning: cannot send message for %s",
diff -c ../src.org/macro.c ./macro.c
*** ../src.org/macro.c	Fri Feb 10 05:22:00 1995
--- ./macro.c	Sat Apr  1 14:48:14 1995
***************
*** 33,39 ****
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)macro.c	8.3 (Berkeley) 2/7/94";
  #endif /* not lint */
  
  # include "sendmail.h"
--- 33,40 ----
   */
  
  #ifndef lint
! static char Wsccsid[] = "@(#)macro.c	2.4 (motonori/WIDE) 2/9/94";
! static char sccsid[] = "@(#)macro.c   8.3 (Berkeley) 2/7/94";
  #endif /* not lint */
  
  # include "sendmail.h"
***************
*** 115,121 ****
--- 116,131 ----
  			continue;
  
  		  case MACROEXPAND:	/* macro interpolation */
+ #if EXTEND_MACRO
+ 			c = *++s & 0377;
+ 			if (c & 0x80) {
+ 				if (tTd(35, 9))
+ 					printf("expand: extend macro ^%c\n",
+ 						c & 0177);
+ 			}
+ #else
  			c = *++s & 0177;
+ #endif
  			if (c != '\0')
  				q = macvalue(c, e);
  			else
***************
*** 242,252 ****
--- 252,274 ----
  {
  	if (tTd(35, 9))
  	{
+ #if EXTEND_MACRO
+ 		if (n & 0x80)
+ 			printf("define(^%c as ", n & 0x7f);
+ 		else
+ 			printf("define(%c as ", n);
+ #else /* not EXTEND_MACRO */
  		printf("define(%c as ", n);
+ #endif /* not EXTEND_MACRO */
+ 
  		xputs(v);
  		printf(")\n");
  	}
+ #if EXTEND_MACRO
+ 	e->e_macro[n & 0377] = v;
+ #else /* not EXTEND_MACRO */
  	e->e_macro[n & 0177] = v;
+ #endif /* not EXTEND_MACRO */
  }
  /*
  **  MACVALUE -- return uninterpreted value of a macro.
***************
*** 266,272 ****
--- 288,298 ----
  	int n;
  	register ENVELOPE *e;
  {
+ #if EXTEND_MACRO
+ 	n &= 0377;
+ #else /* not EXTEND_MACRO */
  	n &= 0177;
+ #endif /* not EXTEND_MACRO */
  	while (e != NULL)
  	{
  		register char *p = e->e_macro[n];
diff -c ../src.org/mailq.0 ./mailq.0
*** ../src.org/mailq.0	Sat Apr  1 14:45:08 1995
--- ./mailq.0	Sat Apr  1 14:48:15 1995
***************
*** 0 ****
--- 1,39 ----
+ MAILQ(1)                    UNIX Reference Manual                     MAILQ(1)
+ 
+ NAME
+      mailq - print the mail queue
+ 
+ SYNOPSIS
+      mailq [-v]
+ 
+ DESCRIPTION
+      Mailq prints a summary of the mail messages queued for future delivery.
+ 
+      The first line printed for each message shows the internal identifier
+      used on this host for the message, the size of the message in bytes, the
+      date and time the message was accepted into the queue, and the envelope
+      sender of the message.  The second line shows the error message that
+      caused this message to be retained in the queue; it will not be present
+      if the message is being processed for the first time.  The following
+      lines show message recipients, one per line.
+ 
+      Mailq is completely equivalent to /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l -bp.
+ 
+   Parameters
+ 
+      -v          Print verbose information.  This adds the priority of the
+                  message and a single character indicator (``+'' or blank) in-
+                  dicating whether a warning message has been sent on the first
+                  line of the message.  Additionally, extra lines may be inter-
+                  mixed with the recipients indicating the ``controlling user''
+                  information; this shows who will own any programs that are
+                  executed on behalf of this message and the name of the alias
+                  this command expanded from, if any.
+ 
+ SEE ALSO
+      sendmail(8)
+ 
+ HISTORY
+      The mailq command appeared in 4.0BSD.
+ 
+ 4th Berkeley Distribution      February 2, 1994                              1
diff -c ../src.org/main.c ./main.c
*** ../src.org/main.c	Mon Mar  6 03:10:24 1995
--- ./main.c	Sat Apr  1 14:48:15 1995
***************
*** 39,44 ****
--- 39,45 ----
  #endif /* not lint */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)main.c	2.13 (motonori/WIDE) 3/12/95";
  static char sccsid[] = "@(#)main.c	8.55.1.7 (Berkeley) 3/5/95";
  #endif /* not lint */
  
***************
*** 129,134 ****
--- 130,139 ----
  	char **av;
  	extern int finis();
  	extern char Version[];
+ # if LOGWVERSION
+ 	extern char WVersion[];
+ 	extern char WhoAndWhere[];
+ # endif /* LOGWVERSION */
  	char *ep, *from;
  	typedef int (*fnptr)();
  	STAB *st;
***************
*** 267,272 ****
--- 272,280 ----
  #if defined(NeXT)
  # define OPTIONS	"B:b:C:cd:e:F:f:h:IimnOo:p:q:r:sTtvX:"
  #endif
+ #if defined(sony_news)
+ # define OPTIONS	"B:b:C:cd:e:F:f:h:IJ:imno:p:q:r:sTtvX:"
+ #endif
  #ifndef OPTIONS
  # define OPTIONS	"B:b:C:cd:e:F:f:h:Iimno:p:q:r:sTtvX:"
  #endif
***************
*** 623,628 ****
--- 631,642 ----
  		  case 'O':	/* random flag that NeXT Mail.app passes */
  			break;
  # endif
+ # if defined(sony_news)
+ 		  case 'E':
+ 		  case 'J':	/* ignore flags for Japanese code conversion
+ 				   (-J, -JE or -JS) impremented on Sony NEWS */
+ 			break;
+ # endif
  
  		  default:
  			ExitStat = EX_USAGE;
***************
*** 958,963 ****
--- 972,985 ----
  				{
  					int stat;
  
+ # if NAMED_BIND && SHOW_MX_HOSTS
+ 					if (strcasecmp(p, "mx") == 0)
+ 					{
+ 						static void showmxhost();
+ 						showmxhost(pvp);
+ 						break;
+ 					}
+ # endif
  					stat = rewrite(pvp, atoi(p), 0, CurEnv);
  					if (stat != EX_OK)
  						printf("== Ruleset %s status %d\n",
***************
*** 1019,1024 ****
--- 1041,1050 ----
  			strcat(dtype, "+debugging");
  
  #ifdef LOG
+ # if LOGWVERSION
+ 		syslog(LOG_INFO, "%s", WVersion);
+ 		syslog(LOG_INFO, "%s", WhoAndWhere);
+ # endif /* LOGWVERSION */
  		syslog(LOG_INFO, "starting daemon (%s): %s", Version, dtype + 1);
  #endif
  #ifdef XLA
***************
*** 1388,1393 ****
--- 1414,1426 ----
  		if (ap[0] != '-' || ap[1] == '-')
  			return;
  
+ # if defined(sony_news)
+ 		/* if -J doesn't have an argument, use -JJ */
+ 		/* this process should be before the following "skip over" */
+ 		/* routine. this option has very odd expression... */
+ 		if (ap[1] == 'J' && ap[2] == '\0')
+ 			*argv = "-JJ";
+ # endif
  		/* skip over options that do have a value */
  		op = strchr(OPTIONS, ap[1]);
  		if (op != NULL && *++op == ':' && ap[2] == '\0' &&
***************
*** 1456,1463 ****
--- 1489,1565 ----
  		vsprintf(p, msg, ap);
  		VA_END;
  		addheader("X-Authentication-Warning", buf, e);
+ # if LOG && AUTH_LOG
+ 	if (LogLevel > 0)
+ 		syslog(LOG_INFO, "Authentication-Warning: %s", buf);
+ # endif
  	}
  }
+ 
+ /*
+ **  SHOWMXHOST -- print MX hosts on testing
+ **
+ **	Parameters:
+ **		pvp -- pointer to token vector
+ **
+ **	Returns:
+ **		none.
+ */
+ 
+ # if NAMED_BIND && SHOW_MX_HOSTS
+ static void
+ showmxhost(pvp)
+ char **pvp;
+ {
+ 	ADDRESS *buildaddr();
+ 	char *hostsignature();
+ 	register MCI *mci;
+ 	register ADDRESS *a;
+ 	register char **mvp, *p, *q;
+ 	int i;
+ 
+ 	OpMode = MD_VERIFY;
+ 	a = buildaddr(pvp, NULLADDR, RF_COPYALL, CurEnv);
+ 	OpMode = MD_TEST;
+ 	if (a == NULL || a->q_host == NULL || a->q_mailer == NULL) 
+ 		return;
+ 	if (strcmp(a->q_mailer->m_mailer, "[IPC]") != 0 &&
+ 	    strcmp(a->q_mailer->m_mailer, "[TCP]") != 0)
+ 		return;
+ 	p = hostsignature(a->q_mailer, a->q_host, CurEnv);
+ 	printf("Mail exchanger(s):\n");
+ 	while (p != NULL)
+ 	{
+ 		q = strchr(p, ':');
+ 		if (q != NULL)
+ 		{
+ 			*q = '\0';
+ 		}
+ 		printf("\t%s = ", p);
+ 		mci = mci_get(p, a->q_mailer);
+ 		i = mci->mci_exitstat;
+ 		if (i == EX_OK)
+ 			i = makeconnection(p, 0, mci, FALSE);
+ 		switch (i)
+ 		{
+ 		    case EX_OK:
+ 			printf("\n");
+ 			break;
+ 		    case EX_TEMPFAIL:
+ 			printf("(name server lookup failure)\n");
+ 			break;
+ 		    default:
+ 			printf("(address unknown)\n");
+ 		}
+ 		p = q;
+ 		if (q != NULL)
+ 		{
+ 			*q = ':';
+ 			p++;
+ 		}
+ 	}
+ }
+ # endif
  /*
  **  DUMPSTATE -- dump state
  **
diff -c ../src.org/mci.c ./mci.c
*** ../src.org/mci.c	Fri Feb 10 05:50:43 1995
--- ./mci.c	Sat Apr  1 14:48:15 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)mci.c	2.20 (motonori/WIDE) 2/27/95";
  static char sccsid[] = "@(#)mci.c	8.14 (Berkeley) 5/15/94";
  #endif /* not lint */
  
***************
*** 150,156 ****
--- 151,161 ----
  	}
  
  	now = curtime();
+ #if NON_BLOCK_CONNECT
+ 	bestmci = NULL;
+ #else
  	bestmci = &MciCache[0];
+ #endif
  	for (i = 0; i < MaxMciCache; i++)
  	{
  		mci = MciCache[i];
***************
*** 159,164 ****
--- 164,179 ----
  			bestmci = &MciCache[i];
  			continue;
  		}
+ #if NON_BLOCK_CONNECT
+ 		if (mci->mci_state == MCIS_CONNECTING ||
+ 		    mci->mci_state == MCIS_OPENING)
+ 			continue;	/* do not uncache */
+ 		if (bestmci == NULL)
+ 		{
+ 			bestmci = &MciCache[i];
+ 			continue;
+ 		}
+ #endif
  		if (mci->mci_lastuse + MciCacheTimeout < now && mci != savemci)
  		{
  			/* connection idle too long -- close it */
***************
*** 218,224 ****
--- 233,243 ----
  
  		/* only uses the envelope to flush the transcript file */
  		if (mci->mci_state != MCIS_CLOSED)
+ 		{
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: smtpquit from uncache (%s)", mci->mci_host);
  			smtpquit(mci->mci_mailer, mci, &BlankEnvelope);
+ 		}
  #ifdef XLA
  		xla_host_end(mci->mci_host);
  #endif
***************
*** 226,234 ****
--- 245,263 ----
  	else
  	{
  		if (mci->mci_in != NULL)
+ 		{
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: uncache close (fd %d)",
+ 				fileno(mci->mci_in));
  			xfclose(mci->mci_in, "mci_uncache", "mci_in");
+ 		}
  		if (mci->mci_out != NULL)
+ 		{
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: uncache close (fd %d)",
+ 				fileno(mci->mci_out));
  			xfclose(mci->mci_out, "mci_uncache", "mci_out");
+ 		}
  		mci->mci_in = mci->mci_out = NULL;
  		mci->mci_state = MCIS_CLOSED;
  		mci->mci_exitstat = EX_OK;
***************
*** 402,404 ****
--- 431,650 ----
  	for (i = 0; i < MaxMciCache; i++)
  		mci_dump(MciCache[i], logit);
  }
+ 
+ 
+ #if NON_BLOCK_CONNECT
+ int waiting_max = 0;	/* just for information */
+ 
+ MCI *
+ mci_wait(e, block)
+ 	ENVELOPE *e;
+ 	int block;
+ {
+ 	register int i;
+ 	int size;
+ 	MCI *mci;
+ 	int fds;
+ 	int waiting;
+ 	int free_avail;
+ 	int rc;
+ 	struct fd_set master_fds;
+ 	struct fd_set r_fds, e_fds;
+ 	struct timeval timeout;
+ 	extern SOCKADDR CurHostAddr;
+ 	int socksize = sizeof CurHostAddr;
+ 
+ 	if (MaxMciCache == 1 || MciCache == NULL)
+ 		return NULL;
+ 
+ 	fds = 0;
+ 	waiting = 0;
+ 	free_avail = 0;
+ 	FD_ZERO(&master_fds);
+ 	for (i = 0; i < MaxMciCache; i++) {
+ 		mci = MciCache[i];
+ 		if (mci != NULL && mci->mci_state == MCIS_CONNECTING)
+ 		{
+ 			waiting++;
+ 			if (mci->mci_sd > fds)
+ 				fds = mci->mci_sd;
+ 			FD_SET(mci->mci_sd, &master_fds);
+ 		}
+ 		else
+ 			free_avail = 1;
+ 	}
+ 
+ 	if (waiting == 0)
+ 		return NULL;
+ 
+ 	if (waiting_max < waiting)
+ 		waiting_max = waiting;
+ 
+ wait_again:
+ 
+ 	if (LogLevel > 9)
+ 		syslog(LOG_DEBUG, "NBC: MCI wait\n");
+ 
+ 	r_fds = e_fds = master_fds;
+ 
+ 	if (block || !free_avail) {
+ 		if (LogLevel > 9)
+ 			syslog(LOG_DEBUG, "NBC: no timeout\n");
+ 		/* wait until status changed */
+ 		timeout.tv_usec = 0;
+ 		timeout.tv_sec = TimeOuts.to_initial;
+ 	} else {
+ 		/* just check status change */
+ 		timeout.tv_usec = 0;
+ 		timeout.tv_sec = 0;
+ 	}
+ 	rc = select(fds+1, &r_fds, NULL, &e_fds, &timeout);
+ 
+ 	if ((block || !free_avail) && rc <= 0) {
+ 		for (i = 0; i < MaxMciCache; i++) {
+ 			mci = MciCache[i];
+ 			if (mci == NULL)
+ 				continue;
+ 			if (mci->mci_state == MCIS_CONNECTING) {
+ 				mci->mci_errno = ETIMEDOUT;
+ 				mci->mci_exitstat = EX_TEMPFAIL;
+ 				mci->mci_state = MCIS_CLOSED;
+ 				if (LogLevel > 9)
+ 					syslog(LOG_DEBUG, "NBC: connection was not established (timed out)\n");
+ 				(void) getpeername(mci->mci_sd,
+ 					(struct sockaddr *) &CurHostAddr,
+ 					&socksize);
+ 				if (mci->mci_in != NULL)
+ 				{
+ 					if (LogLevel > 9)
+ 						syslog(LOG_DEBUG, "NBC: mci_wait close (fd %d)", fileno(mci->mci_in));
+ 					xfclose(mci->mci_in, "mci_wait",
+ 						"mci_in");
+ 				}
+ 				if (mci->mci_out != NULL)
+ 				{
+ 					if (LogLevel > 9)
+ 						syslog(LOG_DEBUG, "NBC: mci_wait close (fd %d)", fileno(mci->mci_out));
+ 					xfclose(mci->mci_out, "mci_wait",
+ 						"mci_out");
+ 				}
+ 				mci->mci_in = mci->mci_out = NULL;
+ 				close(mci->mci_sd);
+ 				return mci;
+ 			}
+ 		}
+ 	}
+ 	if (rc <= 0) {
+ 		if (LogLevel > 9)
+ 			syslog(LOG_DEBUG, "NBC: no status changed (%d:%d)\n", i, errno);
+ 		if (!free_avail) {
+ 			if (rc < 0 && errno == EBADF) { /* XXX */
+ 				if (LogLevel > 8) {
+ 					syslog(LOG_DEBUG, "NBC: EBADF\n");
+ 					for (i = 0; i < MaxMciCache; i++) {
+ 						mci = MciCache[i];
+ 						if (mci == NULL)
+ 							continue;
+ if (mci->mci_state == MCIS_CONNECTING) {
+ 	int a, b;
+ 	errno = 0;
+ 	size = sizeof(b);
+ 	a = getsockopt(mci->mci_sd, SOL_SOCKET, SO_ERROR, &b, &size);
+ 	syslog(LOG_DEBUG, "NBC: %d = getsockopt(%d, %d), errno = %d\n", a, mci->mci_sd, b, errno);
+ }
+ 					}
+ 				}
+ 				sleep(120);
+ 			}
+ 			sleep(10);
+ 			goto wait_again;
+ 		}
+ 		return NULL;
+ 	}
+ 
+ 	if (LogLevel > 9)
+ 		syslog(LOG_DEBUG, "NBC: status changed\n");
+ 
+ 	for (i = 0; i < MaxMciCache; i++) {
+ 		mci = MciCache[i];
+ 		if (mci == NULL)
+ 			continue;
+ 		if (mci->mci_state != MCIS_CONNECTING)
+ 			continue;
+ 		if (FD_ISSET(mci->mci_sd, &r_fds)
+ 		 || FD_ISSET(mci->mci_sd, &e_fds))
+ 		{
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: (slot %d) host is %s (fd %d)\n", i, mci->mci_host, mci->mci_sd);
+ 			/* check the reason */
+ 
+ 			errno = 0;
+ 			size = sizeof(errno);
+ 			getsockopt(mci->mci_sd, SOL_SOCKET, SO_ERROR,
+ 				   &errno, &size);
+ 			switch (errno) {
+ 			  case ENETDOWN:
+ 			  case ENETUNREACH:
+ 			  case ENETRESET:
+ 			  case ECONNABORTED:
+ 			  case ECONNRESET:
+ 			  case ENOTCONN:
+ 			  case ETIMEDOUT:
+ 			  case ECONNREFUSED:
+ 			  case EHOSTDOWN:
+ 			  case EHOSTUNREACH:
+ 			  case EBADF:
+ 				mci->mci_errno = errno;
+ 				mci->mci_exitstat = EX_TEMPFAIL;
+ 				mci->mci_state = MCIS_CLOSED;
+ 				if (LogLevel > 9)
+ 					syslog(LOG_DEBUG, "NBC: connection was not established\n");
+ 				(void) getpeername(mci->mci_sd,
+ 					(struct sockaddr *) &CurHostAddr,
+ 					&socksize);
+ 				if (mci->mci_in != NULL)
+ 				{
+ 					if (LogLevel > 9)
+ 						syslog(LOG_DEBUG, "NBC: mci_wait close (fd %d)", fileno(mci->mci_in));
+ 					xfclose(mci->mci_in, "mci_wait",
+ 						"mci_in");
+ 				}
+ 				if (mci->mci_out != NULL)
+ 				{
+ 					if (LogLevel > 9)
+ 						syslog(LOG_DEBUG, "NBC: mci_wait close (fd %d)", fileno(mci->mci_out));
+ 					xfclose(mci->mci_out, "mci_wait",
+ 						"mci_out");
+ 				}
+ 				if (LogLevel > 9)
+ 					syslog(LOG_DEBUG, "NBC: close(fd %d)\n",						 mci->mci_sd);
+ 				mci->mci_in = mci->mci_out = NULL;
+ 				close(mci->mci_sd);
+ 				return mci;
+ 			}
+ 			if (LogLevel > 9)
+ 				syslog(LOG_DEBUG, "NBC: no information from getsockopt: %d\n", errno);
+ 			if (FD_ISSET(mci->mci_sd, &r_fds)) {
+ 				mci->mci_state = MCIS_OPENING;
+ 				if (mci->mci_to)
+ 					mci->mci_to->q_mci = NULL;
+ 				if (LogLevel > 9)
+ 					syslog(LOG_DEBUG, "NBC: connection was established\n");
+ 				errno = 0;
+ 				(void) getpeername(mci->mci_sd,
+ 					(struct sockaddr *) &CurHostAddr,
+ 					&socksize);
+ 				return mci;
+ 			}
+ 		}
+ 	}
+ 	/* should not be reached */
+ 	if (block) {
+ 		if (LogLevel > 8)
+ 			 syslog(LOG_DEBUG, "NBC: try again with ERROR\n");
+ 		sleep(10);
+ 		goto wait_again;
+ 	}
+ 	return NULL;
+ }
+ #endif
diff -c ../src.org/newaliases.0 ./newaliases.0
*** ../src.org/newaliases.0	Sat Apr  1 14:45:08 1995
--- ./newaliases.0	Sat Apr  1 14:48:16 1995
***************
*** 0 ****
--- 1,22 ----
+ NEWALIASES(1)               UNIX Reference Manual                NEWALIASES(1)
+ 
+ NAME
+      newaliases - rebuild the data base for the mail aliases file
+ 
+ SYNOPSIS
+      newaliases
+ 
+ DESCRIPTION
+      Newaliases rebuilds the random access data base for the mail aliases file
+      /_e_t_c/_a_l_i_a_s_e_s. It must be run each time /_e_t_c/_a_l_i_a_s_e_s is changed in order
+      for the change to take effect.
+ 
+      Newaliases is completely equivalent to /_u_s_r/_s_b_i_n/_s_e_n_d_m_a_i_l -bi.
+ 
+ SEE ALSO
+      aliases(5),  sendmail(8)
+ 
+ HISTORY
+      The newaliases command appeared in 4.0BSD.
+ 
+ 4th Berkeley Distribution      February 3, 1994                              1
diff -c ../src.org/newvers.sh ./newvers.sh
*** ../src.org/newvers.sh	Sat Apr  1 14:45:08 1995
--- ./newvers.sh	Sat Apr  1 14:48:16 1995
***************
*** 0 ****
--- 1,40 ----
+ #!/bin/sh -
+ #
+ # Copyright (c) 1987 Regents of the University of California.
+ # All rights reserved.
+ #
+ # Redistribution and use in source and binary forms are permitted
+ # provided that the above copyright notice and this paragraph are
+ # duplicated in all such forms and that any documentation,
+ # advertising materials, and other materials related to such
+ # distribution and use acknowledge that the software was developed
+ # by the University of California, Berkeley.  The name of the
+ # University may not be used to endorse or promote products derived
+ # from this software without specific prior written permission.
+ # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ #
+ #	@(#)newvers.sh	2.4 (motonori/WIDE) 3/16/94
+ #	@(#)newvers.sh	4.6 (Berkeley) 5/11/89
+ #
+ 
+ PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin
+ export PATH
+ 
+ # for JLE, etc...
+ LANG=C
+ export LANG
+ 
+ umask 0022
+ 
+ if [ ! -r version ]
+ then
+ 	echo 0 > version
+ fi
+ touch version
+ rm -f version.o Version.c
+ v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
+ sed -e "s|%VERSION%|#${v}: ${t}|" -e "s|%WHOANDWHERE%|${u}@${h}:${d}|" \
+ 	< version.c > Version.c
+ echo `expr ${v} + 1` > version
diff -c ../src.org/parseaddr.c ./parseaddr.c
*** ../src.org/parseaddr.c	Fri Feb 10 05:22:04 1995
--- ./parseaddr.c	Sat Apr  1 14:48:17 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)parseaddr.c	2.11 (motonori/WIDE) 4/20/94";
  static char sccsid[] = "@(#)parseaddr.c	8.31 (Berkeley) 4/15/94";
  #endif /* not lint */
  
***************
*** 754,760 ****
--- 755,766 ----
  				mlp->last = avp++;
  				cataddr(mlp->first, mlp->last, buf, sizeof buf, '\0');
  				s = stab(buf, ST_CLASS, ST_FIND);
+ #if EXTEND_CLASS
+ 				if (s == NULL || !bitnset((unsigned char)rp[1],
+ 					s->s_class))
+ #else /* not EXTEND_CLASS */
  				if (s == NULL || !bitnset(rp[1], s->s_class))
+ #endif /* not EXTEND_CLASS */
  				{
  					if (tTd(21, 36))
  					{
***************
*** 774,780 ****
--- 780,791 ----
  			  case MATCHNCLASS:
  				/* match any token not in a class */
  				s = stab(ap, ST_CLASS, ST_FIND);
+ #if EXTEND_CLASS
+ 				if (s != NULL && bitnset((unsigned char)rp[1],
+ 					s->s_class))
+ #else /* not EXTEND_CLASS */
  				if (s != NULL && bitnset(rp[1], s->s_class))
+ #endif /* not EXTEND_CLASS */
  					goto backup;
  
  				/* fall through */
***************
*** 809,815 ****
--- 820,830 ----
  				**  work for the usual cases.
  				*/
  
+ #if EXTEND_MACRO
+ 				ap = macvalue((unsigned char)rp[1], e);
+ #else /* not EXTEND_MACRO */
  				ap = macvalue(rp[1], e);
+ #endif /* not EXTEND_MACRO */
  				mlp->first = avp;
  				if (tTd(21, 2))
  					printf("rewrite: LHS $&%c => \"%s\"\n",
***************
*** 1015,1021 ****
--- 1030,1043 ----
  			char *argvect[10];
  			char pvpbuf[PSBUFSIZE];
  			char *nullpvp[1];
+ #if NO_ALIAS_ON_REBUILD
+ 			int dbno;
+ 			bool nolookup;
+ 			extern MAP *AliasDB[];
+ 			extern int NAliasDBs;
  
+ #endif
+ 
  			if ((**rvp & 0377) != HOSTBEGIN &&
  			    (**rvp & 0377) != LOOKUPBEGIN)
  				continue;
***************
*** 1097,1103 ****
--- 1119,1143 ----
  			/* look it up */
  			cataddr(key_rvp, NULL, buf, sizeof buf, '\0');
  			argvect[0] = buf;
+ #if NO_ALIAS_ON_REBUILD
+ 			nolookup = FALSE;
+ 			if (OpMode == MD_INITALIAS)
+ 			{
+ 				for (dbno = 0; dbno < NAliasDBs; dbno++)
+ 				{
+ 					if (map->s_map.map_file != NULL
+ 					 && strcmp(map->s_map.map_file,
+ 						AliasDB[dbno]->map_file) == 0)
+ 					{
+ 						nolookup = TRUE;
+ 						break;
+ 					}
+ 				}
+ 			}
+ 			if (!nolookup && map != NULL && bitset(MF_OPEN, map->s_map.map_mflags))
+ #else
  			if (map != NULL && bitset(MF_OPEN, map->s_map.map_mflags))
+ #endif
  			{
  				auto int stat = EX_OK;
  
***************
*** 1265,1270 ****
--- 1305,1315 ----
  	static MAILER errormailer;
  	static char *errorargv[] = { "ERROR", NULL };
  	static char buf[MAXNAME];
+ # if MULTI_MAILER
+ 	char **tvnext;
+ 	char *tvsave;
+ 	int nmailer = 0;
+ # endif
  
  	if (tTd(24, 5))
  	{
***************
*** 1276,1281 ****
--- 1321,1344 ----
  		a = (ADDRESS *) xalloc(sizeof *a);
  	bzero((char *) a, sizeof *a);
  
+ # if MULTI_MAILER
+ 	tvnext = tv;
+ 	do {
+ 		while (*++tvnext != NULL)
+ 		{
+ 			if ((**tvnext & 0377) == CANONNET)
+ 			{
+ 				break;
+ 			}
+ 		}
+ 		if (*tvnext != NULL)
+ 		{
+ 			tvsave = *tvnext;
+ 			*tvnext = NULL;
+ 		} else {
+ 			tvnext = NULL;
+ 		}
+ # endif
  	/* figure out what net/mailer to use */
  	if (*tv == NULL || (**tv & 0377) != CANONNET)
  	{
***************
*** 1282,1288 ****
--- 1345,1355 ----
  		syserr("554 buildaddr: no net");
  badaddr:
  		a->q_flags |= QBADADDR;
+ # if MULTI_MAILER
+ 		a->q_mailers[nmailer] = &errormailer;
+ # else
  		a->q_mailer = &errormailer;
+ # endif
  		if (errormailer.m_name == NULL)
  		{
  			/* initialize the bogus mailer */
***************
*** 1346,1352 ****
--- 1413,1423 ----
  		syserr("554 buildaddr: unknown mailer %s", *tv);
  		goto badaddr;
  	}
+ # if MULTI_MAILER
+ 	a->q_mailers[nmailer] = m;
+ # else
  	a->q_mailer = m;
+ # endif
  
  	/* figure out what host (if any) */
  	tv++;
***************
*** 1374,1380 ****
--- 1445,1455 ----
  			spaceleft -= i;
  		}
  		*bp = '\0';
+ # if MULTI_MAILER
+ 		a->q_hosts[nmailer] = newstr(buf);
+ # else
  		a->q_host = newstr(buf);
+ # endif
  	}
  	else
  	{
***************
*** 1383,1389 ****
--- 1458,1468 ----
  			syserr("554 buildaddr: no host");
  			goto badaddr;
  		}
+ # if MULTI_MAILER
+ 		a->q_hosts[nmailer] = NULL;
+ # else
  		a->q_host = NULL;
+ # endif
  	}
  
  	/* figure out the user */
***************
*** 1402,1410 ****
--- 1481,1497 ----
  		if (*p == '"')
  			p++;
  		if (*p == '|')
+ # if MULTI_MAILER
+ 			a->q_mailers[nmailer] = m = ProgMailer;
+ # else
  			a->q_mailer = m = ProgMailer;
+ # endif
  		else if (*p == '/')
+ # if MULTI_MAILER
+ 			a->q_mailers[nmailer] = m = FileMailer;
+ # else
  			a->q_mailer = m = FileMailer;
+ # endif
  		else if (*p == ':')
  		{
  			/* may be :include: */
***************
*** 1413,1420 ****
--- 1500,1512 ----
  			if (strncasecmp(buf, ":include:", 9) == 0)
  			{
  				/* if :include:, don't need further rewriting */
+ # if MULTI_MAILER
+ 				a->q_mailers[nmailer] = m = InclMailer;
+ 				a->q_users[nmailer] = &buf[9];
+ # else
  				a->q_mailer = m = InclMailer;
  				a->q_user = &buf[9];
+ # endif
  				return (a);
  			}
  		}
***************
*** 1427,1433 ****
--- 1519,1529 ----
  	}
  
  	/* rewrite according recipient mailer rewriting rules */
+ # if MULTI_MAILER
+ 	define('h', a->q_hosts[nmailer], e);
+ # else
  	define('h', a->q_host, e);
+ # endif
  	if (!bitset(RF_SENDERADDR|RF_HEADERADDR, flags))
  	{
  		/* sender addresses done later */
***************
*** 1439,1455 ****
--- 1535,1571 ----
  
  	/* save the result for the command line/RCPT argument */
  	cataddr(tv, NULL, buf, sizeof buf, '\0');
+ # if MULTI_MAILER
+ 	a->q_users[nmailer] = buf;
+ # else
  	a->q_user = buf;
+ # endif
  
  	/*
  	**  Do mapping to lower case as requested by mailer
  	*/
  
+ # if MULTI_MAILER
+ 	if (a->q_hosts[nmailer] != NULL && !bitnset(M_HST_UPPER, m->m_flags))
+ 		makelower(a->q_hosts[nmailer]);
+ 	if (!bitnset(M_USR_UPPER, m->m_flags))
+ 		makelower(a->q_users[nmailer]);
+ # else
  	if (a->q_host != NULL && !bitnset(M_HST_UPPER, m->m_flags))
  		makelower(a->q_host);
  	if (!bitnset(M_USR_UPPER, m->m_flags))
  		makelower(a->q_user);
+ # endif
  
+ # if MULTI_MAILER
+ 		if (tvnext != NULL)
+ 		{
+ 			*tvnext = tvsave;
+ 			tv = tvnext;
+ 			nmailer++;
+ 		}
+ 	} while (tvnext && (nmailer < MAXDSPTMAILERS));
+ # endif
  	return (a);
  }
  /*
diff -c ../src.org/readcf.c ./readcf.c
*** ../src.org/readcf.c	Mon Mar  6 03:36:11 1995
--- ./readcf.c	Sat Apr  1 14:48:17 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)readcf.c	2.13 (motonori/WIDE) 3/12/95";
  static char sccsid[] = "@(#)readcf.c	8.23.1.3 (Berkeley) 3/5/95";
  #endif /* not lint */
  
***************
*** 203,208 ****
--- 204,248 ----
  				continue;
  			}
  
+ #if EXTEND_MACRO
+ 			if (p[1] == '^') {	/* extension prefix */
+ 				if (tTd(37, 2))
+ 					printf("readcf: extend macro ^%c\n",
+ 						p[2]);
+ 				(void) strcpy(p + 1, p + 2);
+ 				p[1] = (p[1] | 0x80);
+ 			}
+ #endif /* EXTEND_MACRO */
+ #if EXTEND_MACRO || EXTEND_CLASS
+ 			switch (p[1]) {
+ #if EXTEND_CLASS
+ 			  case '=':	/* MATCHCLASS */
+ 			  case '~':	/* MATCHNCLASS */
+ 				if (p[2] == '^') {	/* extension prefix */
+ 					if (tTd(37, 2))
+ 					    printf("readcf: extend class ^%c\n",
+ 							p[3]);
+ 					(void) strcpy(p + 2, p + 3);
+ 					p[2] = (p[2] | 0x80);
+ 				}
+ 				break;
+ #endif /* EXTEND_CLASS */
+ #if EXTEND_MACRO
+ 			  case '&':	/* MACRODEXPAND */
+ 				if (p[2] == '^') {	/* extension prefix */
+ 					if (tTd(37, 2))
+ 					    printf("readcf: extend macro ^%c\n",
+ 							p[3]);
+ 					(void) strcpy(p + 2, p + 3);
+ 					p[2] = (p[2] | 0x80);
+ 				}
+ 				break;
+ #endif /* EXTEND_MACRO */
+ 			  default:
+ 				break;
+ 			}
+ #endif /* EXTEND_MACRO || EXTEND_CLASS */
+ 
  			/* convert to macro expansion character */
  			*p = MACROEXPAND;
  		}
***************
*** 399,406 ****
--- 439,497 ----
  			break;
  
  		  case 'D':		/* macro definition */
+ #if FILEMACRO
+ 		  case 'G':		/* macro definition from file */
+ #endif /* FILEMACRO */
+ #if EXTEND_MACRO
+ 			if (bp[1] == '^') {
+ 				if (tTd(37, 2))
+ 					printf("readcf: extend macro ^%c\n",
+ 						bp[2]);
+ 				/* bp++; */
+ 				(void) strcpy(bp + 1, bp + 2);
+ 				bp[1] = (bp[1] | 0x80);
+ 			}
+ #endif /* EXTEND_MACRO */
+ #if FILEMACRO
+ 			if (bp[0] == 'G')
+ 			{
+ 				/* read from file */
+ 				for (p = &bp[2]; isascii(*p) && isspace(*p); )
+ 					p++;
+ 				if (p[0] == '-' && p[1] == 'o')
+ 				{
+ 					optional = TRUE;
+ 					while (*p != '\0'
+ 					       && !(isascii(*p) && isspace(*p)))
+ 						p++;
+ 					while (isascii(*p) && isspace(*p))
+ 						*p++;
+ 				}
+ 				else
+ 					optional = FALSE;
+ 				file = p;
+ 				while (*p != '\0'
+ 				       && !(isascii(*p) && isspace(*p)))
+ 					p++;
+ 				if (*p == '\0')
+ 					p = "%s";
+ 				else
+ 				{
+ 					*p = '\0';
+ 					while (isascii(*++p) && isspace(*p))
+ 						continue;
+ 				}
+ 				filemacro((unsigned char)bp[1], file, p, safe,
+ 					   optional);
+ 				break;
+ 			}
+ #endif /* FILEMACRO */
  			p = munchstring(&bp[2], NULL);
+ #if EXTEND_MACRO
+ 			define((unsigned char)bp[1], newstr(p), e);
+ #else /* not EXTEND_MACRO */
  			define(bp[1], newstr(p), e);
+ #endif /* not EXTEND_MACRO */
  			break;
  
  		  case 'H':		/* required header line */
***************
*** 408,413 ****
--- 499,514 ----
  			break;
  
  		  case 'C':		/* word class */
+ #if EXTEND_CLASS
+ 			if (bp[1] == '^') {
+ 				if (tTd(37, 2))
+ 					printf("readcf: extend class ^%c\n",
+ 						bp[2]);
+ 				/* bp++; */
+ 				(void) strcpy(bp + 1, bp + 2);
+ 				bp[1] = (bp[1] | 0x80);
+ 			}
+ #endif /* EXTEND_CLASS */
  			/* scan the list of words and set class for all */
  			expand(&bp[2], exbuf, &exbuf[sizeof exbuf], e);
  			for (p = exbuf; *p != '\0'; )
***************
*** 423,434 ****
--- 524,549 ----
  				delim = *p;
  				*p = '\0';
  				if (wd[0] != '\0')
+ #if EXTEND_CLASS
+ 					setclass((unsigned char)bp[1], wd);
+ #else /* not EXTEND_CLASS */
  					setclass(bp[1], wd);
+ #endif /* not EXTEND_CLASS */
  				*p = delim;
  			}
  			break;
  
  		  case 'F':		/* word class from file */
+ #if EXTEND_CLASS
+ 			if (bp[1] == '^') {
+ 				if (tTd(37, 2))
+ 					printf("readcf: extend class ^%c\n",
+ 						bp[2]);
+ 				/* bp++; */
+ 				(void) strcpy(bp + 1, bp + 2);
+ 				bp[1] = (bp[1] | 0x80);
+ 			}
+ #endif /* EXTEND_CLASS */
  			for (p = &bp[2]; isascii(*p) && isspace(*p); )
  				p++;
  			if (p[0] == '-' && p[1] == 'o')
***************
*** 452,458 ****
--- 567,578 ----
  				while (isascii(*++p) && isspace(*p))
  					continue;
  			}
+ #if EXTEND_CLASS
+ 			fileclass((unsigned char)bp[1], file, p, safe,
+ 				  optional);
+ #else /* not EXTEND_CLASS */
  			fileclass(bp[1], file, p, safe, optional);
+ #endif /* not EXTEND_CLASS */
  			break;
  
  #ifdef XLA
***************
*** 676,681 ****
--- 796,898 ----
  
  	(void) fclose(f);
  }
+ 
+ #if FILEMACRO
+ /*
+ **  FILEMACRO -- read macro definition from a file
+ **
+ **	Parameters:
+ **		defn -- macro name to define.
+ **		filename -- name of file to read.
+ **		fmt -- scanf string to use for match.
+ **		safe -- if set, this is a safe read.
+ **		optional -- if set, it is not an error for the file to
+ **			not exist.
+ **
+ **	Returns:
+ **		none
+ **
+ **	Side Effects:
+ **
+ **		puts all lines in filename that match a scanf into
+ **			the named macro.
+ */
+ 
+ filemacro(defn, filename, fmt, safe, optional)
+ 	int defn;
+ 	char *filename;
+ 	char *fmt;
+ 	bool safe;
+ 	bool optional;
+ {
+ 	FILE *f;
+ 	struct stat stbuf;
+ 	char *munchstring();
+ 	char buf[MAXLINE];
+ 
+ 	if (stat(filename, &stbuf) < 0)
+ 	{
+ 		if (!optional)
+ 			syserr("filemacro: cannot stat %s", filename);
+ 		return;
+ 	}
+ 	if (!S_ISREG(stbuf.st_mode))
+ 	{
+ 		syserr("filemacro: %s not a regular file", filename);
+ 		return;
+ 	}
+ 	if (!safe && access(filename, R_OK) < 0)
+ 	{
+ 		syserr("filemacro: access denied on %s", filename);
+ 		return;
+ 	}
+ 	f = fopen(filename, "r");
+ 	if (f == NULL)
+ 	{
+ 		syserr("filemacro: cannot open %s", filename);
+ 		return;
+ 	}
+ 
+ 	if (fgets(buf, sizeof buf, f) != NULL)
+ 	{
+ 		register char *p;
+ # ifdef SCANF
+ 		char wordbuf[MAXNAME+1];
+ 
+ 		if (sscanf(buf, fmt, wordbuf) != 1)
+ 			goto fm_exit;
+ 		p = wordbuf;
+ # else /* SCANF */
+ 		p = buf;
+ # endif /* SCANF */
+ 
+ 		/*
+ 		**  Break up the match into words.
+ 		*/
+ 
+ 		/* strip leading spaces */
+ 		while (isascii(*p) && isspace(*p))
+ 			p++;
+ 		if (*p != '\0')
+ 		{
+ 			register char *q;
+ 
+ 			/* find the end of the word */
+ 			q = p;
+ 			while (*p != '\0' && !(isascii(*p) && isspace(*p)))
+ 				p++;
+ 			if (*p != '\0')
+ 				*p++ = '\0';
+ 
+ 			/* enter the word in the symbol table */
+ 			define(defn, newstr(munchstring(q, NULL)), CurEnv);
+ 		}
+ 	}
+ fm_exit:
+ 
+ 	(void) fclose(f);
+ }
+ #endif /* FILEMACRO */
  /*
  **  MAKEMAILER -- define a new mailer.
  **
***************
*** 1038,1045 ****
--- 1255,1286 ----
  	NULL,		0
  };
  
+ #if CANON_OTHER
+ #ifndef T_TXT	/* shoud be defined in arpa/nameser.h */
+ #define T_TXT		16	/* text strings */
  #endif
  
+ struct
+ {
+ 	char	*name;		/* string of query types */
+ 	char	value;		/* internal values of query types */
+ } QueryFlags[] =
+ {
+ 	/* records which can be treated as A record for canonicalization */
+ 	"hinfo",	T_HINFO,
+ 	"minfo",	T_MINFO,
+ 	"ns",		T_NS,
+ 	"null",		T_NULL,
+ 	"ptr",		T_PTR,
+ 	"soa",		T_SOA,
+ 	"txt",		T_TXT,
+ 	"wks",		T_WKS,
+ 	NULL,		0
+ };
+ #endif /* CANON_OTHER */
+ 
+ #endif
+ 
  setoption(opt, val, safe, sticky, e)
  	char opt;
  	char *val;
***************
*** 1233,1243 ****
--- 1474,1501 ----
  			bool clearmode;
  			char *q;
  			struct resolverflags *rfp;
+ #if CANON_MX_CNTL || CANON_OTHER
+ 			int	queryflag;
+ #endif /* CANON_MX_CNTL || CANON_OTHER */
+ #if CANON_MX_CNTL
+ 			extern	int     TryMXforCanon;
+ #endif /* CANON_MX_CNTL */
+ #if CANON_OTHER
+ 			extern	char    Qseq[];
+ 			int	qno, sno;
+ #endif /* CANON_OTHER */
  
  			while (*p == ' ')
  				p++;
  			if (*p == '\0')
  				break;
+ #if CANON_MX_CNTL || CANON_OTHER
+ 			queryflag = FALSE;
+ 			if (*p == '?') {
+ 				queryflag = TRUE;
+ 				p++;
+ 			}
+ #endif /* CANON_MX_CNTL || CANON_OTHER */
  			clearmode = FALSE;
  			if (*p == '-')
  				clearmode = TRUE;
***************
*** 1249,1254 ****
--- 1507,1549 ----
  				p++;
  			if (*p != '\0')
  				*p++ = '\0';
+ #if CANON_MX_CNTL || CANON_OTHER
+ 			if (queryflag) {
+ #if CANON_MX_CNTL
+ 				if (strcasecmp(q, "nowildcardmx") == 0) {
+ 					TryMXforCanon = !clearmode;
+ 					if (tTd(8, 2))
+ 						printf("nowildcardmx: %s\n",
+ 						  TryMXforCanon?"True":"False");
+ 					continue;
+ 				}
+ #endif /* CANON_MX_CNTL */
+ #if CANON_OTHER
+ 				for (qno = 0; QueryFlags[qno].name ; qno++) {
+ 					if (strcasecmp(q,
+ 						QueryFlags[qno].name) == 0)
+ 					{
+ 						if (tTd(8, 2))
+ 							printf("query += %s\n", q);
+ 						break;
+ 					}
+ 				}
+ 				if (QueryFlags[qno].name == NULL)
+ 					break;
+ 				for (sno = 0; sno < QSEQSIZ-1; sno++) {
+ 					if (Qseq[sno] == 0) {
+ 						Qseq[sno] =
+ 							QueryFlags[qno].value;
+ 						break;
+ 					}
+ 					/* ignore record specified already */
+ 					if (Qseq[sno] == QueryFlags[qno].value)
+ 						break;
+ 				}
+ #endif /* CANON_OTHER */
+ 				continue;
+ 			}
+ #endif /* CANON_MX_CNTL || CANON_OTHER */
  			for (rfp = ResolverFlags; rfp->rf_name != NULL; rfp++)
  			{
  				if (strcasecmp(q, rfp->rf_name) == 0)
***************
*** 1300,1309 ****
--- 1595,1617 ----
  		break;
  
  	  case 'M':		/* define macro */
+ #if EXTEND_MACRO
+ 		if (val[0] == '^') {
+ 			if (tTd(37, 2))
+ 				printf("readcf: extend macro ^%c\n",
+ 					val[1]);
+ 			val++;
+ 			val[0] = (val[0] | 0x80);
+ 		}
+ #endif /* not EXTEND_MACRO */
  		p = newstr(&val[1]);
  		if (!safe)
  			cleanstrcpy(p, p, MAXNAME);
+ #if EXTEND_MACRO
+ 		define((unsigned char)val[0], p, CurEnv);
+ #else /* not EXTEND_MACRO */
  		define(val[0], p, CurEnv);
+ #endif /* not EXTEND_MACRO */
  		sticky = FALSE;
  		break;
  
***************
*** 1493,1500 ****
--- 1801,1818 ----
  {
  	register STAB *s;
  
+ #if EXTEND_CLASS
  	if (tTd(37, 8))
+ 	{
+ 		if (class & 0x80)
+ 			printf("setclass(^%c, %s)\n", class & 0x7f, word);
+ 		else
+ 			printf("setclass(%c, %s)\n", class, word);
+ 	}
+ #else /* not EXTEND_CLASS */
+ 	if (tTd(37, 8))
  		printf("setclass(%c, %s)\n", class, word);
+ #endif /* not EXTEND_CLASS */
  	s = stab(word, ST_CLASS, ST_ENTER);
  	setbitn(class, s->s_class);
  }
diff -c ../src.org/recipient.c ./recipient.c
*** ../src.org/recipient.c	Mon Mar  6 03:10:23 1995
--- ./recipient.c	Sat Apr  1 14:48:18 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)recipient.c	2.6 (motonori/WIDE) 3/12/95";
  static char sccsid[] = "@(#)recipient.c	8.44.1.6 (Berkeley) 3/5/95";
  #endif /* not lint */
  
***************
*** 982,987 ****
--- 983,996 ----
  			*p = '\0';
  		if (buf[0] == '#' || buf[0] == '\0')
  			continue;
+ # if ALL_HASH_CMNT
+ 		if ((p = strchr(buf, '#')) && isspace(*(p-1)))
+ 		{
+ 			while (buf < p && isspace(*(p-1)))
+ 				p--;
+ 			*p = '\0';
+ 		}
+ # endif
  		e->e_to = NULL;
  		message("%s to %s",
  			forwarding ? "forwarding" : "sending", buf);
diff -c ../src.org/res_send.c ./res_send.c
*** ../src.org/res_send.c	Sat Apr  1 14:45:08 1995
--- ./res_send.c	Sat Apr  1 14:48:18 1995
***************
*** 0 ****
--- 1,1307 ----
+ /*
+  * ++Copyright++ 1985, 1989, 1993
+  * -
+  * Copyright (c) 1985, 1989, 1993
+  *    The Regents of the University of California.  All rights reserved.
+  * 
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  * 	This product includes software developed by the University of
+  * 	California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  * 
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  * -
+  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+  * 
+  * Permission to use, copy, modify, and distribute this software for any
+  * purpose with or without fee is hereby granted, provided that the above
+  * copyright notice and this permission notice appear in all copies, and that
+  * the name of Digital Equipment Corporation not be used in advertising or
+  * publicity pertaining to distribution of the document or software without
+  * specific, written prior permission.
+  * 
+  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+  * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+  * SOFTWARE.
+  * -
+  * --Copyright--
+  */
+ 
+ #if defined(LIBC_SCCS) && !defined(lint)
+ static char Wsccsid[] = "@(#)res_send.c	2.7 (motonori/WIDE) 3/10/95";
+ static char _sccsid[] = "@(#)res_send.c	8.1 (Berkeley) 6/4/93";
+ static char _rcsid[] = "$Id: res_send.c,v 4.9.1.12 1994/06/26 04:00:18 vixie Exp $";
+ #endif /* LIBC_SCCS and not lint */
+ 
+ 	/* change this to "0"
+ 	 * if you talk to a lot
+ 	 * of multi-homed SunOS
+ 	 * ("broken") name servers.
+ 	 */
+ #define	CHECK_SRVR_ADDR	1	/* XXX - should be in options.h */
+ 
+ /*
+  * Send query to name server and wait for reply.
+  */
+ 
+ #include "sendmail.h"
+ #include <sys/uio.h>
+ #include <errno.h>
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ 
+ 
+ #ifndef INT16SZ
+ #define INT16SZ	2		/* for systems without 16-bit ints */
+ #endif
+ #ifndef HFIXEDSZ
+ #define HFIXEDSZ	12		/* #/bytes of fixed data in header */
+ #endif
+ #ifndef RES_INSECURE1
+ #define RES_INSECURE1	0x00000400	/* type 1 security disabled */
+ #endif
+ #ifndef RES_INSECURE2
+ #define RES_INSECURE2	0x00000800	/* type 2 security disabled */
+ #endif
+ #ifndef RES_NONBLOCK
+ #define RES_NONBLOCK	0x00001000	/* return immediately, do cacheing */
+ #endif
+ 
+ void _res_close ();
+ 
+ static int s = -1;	/* socket used for communications */
+ static int connected = 0;	/* is the socket connected */
+ static int vc = 0;	/* is the socket a virtual ciruit? */
+ 
+ #ifndef FD_SET
+ /* XXX - should be in portability.h */
+ #define	NFDBITS		32
+ #define	FD_SETSIZE	32
+ #define	FD_SET(n, p)	((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
+ #define	FD_CLR(n, p)	((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
+ #define	FD_ISSET(n, p)	((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
+ #define FD_ZERO(p)	bzero((char *)(p), sizeof(*(p)))
+ #endif
+ 
+ #ifndef DEBUG
+ #   define Dprint(cond, args) /*empty*/
+ #   define DprintQ(cond, args, query) /*empty*/
+ #   define Aerror(file, string, error, address) /*empty*/
+ #   define Perror(file, string, error) /*empty*/
+ #else
+ #   define Dprint(cond, args) if (cond) {fprintf args;} else {}
+ #   define DprintQ(cond, args, query) if (cond) {\
+ 			fprintf args;\
+ 			__p_query(query);\
+ 		} else {}
+     static void
+     Aerror(file, string, error, address)
+ 	FILE *file;
+ 	char *string;
+ 	int error;
+ 	struct sockaddr_in address;
+     {
+ 	int save = errno;
+ 
+ 	if (_res.options & RES_DEBUG) {
+ 		fprintf(file, "res_send: %s ([%s].%d): %s\n",
+ 			string,
+ 			inet_ntoa(address.sin_addr),
+ 			address.sin_port,
+ 			strerror(error));
+ 	}
+ 	errno = save;
+     }
+     static void
+     Perror(file, string, error)
+ 	FILE *file;
+ 	char *string;
+ 	int error;
+     {
+ 	int save = errno;
+ 
+ 	if (_res.options & RES_DEBUG) {
+ 		fprintf(file, "res_send: %s: %s\n",
+ 			string, strerror(error));
+ 	}
+ 	errno = save;
+     }
+ #endif
+ 
+ #ifdef notdef
+ static res_send_qhook Qhook = NULL;
+ static res_send_rhook Rhook = NULL;
+ 
+ void
+ res_send_setqhook(hook)
+ 	res_send_qhook hook;
+ {
+ 	Qhook = hook;
+ }
+ 
+ void
+ res_send_setrhook(hook)
+ 	res_send_rhook hook;
+ {
+ 	Rhook = hook;
+ }
+ #endif
+ 
+ /* int
+  * our_server(ina)
+  *	looks up "ina" in _res.ns_addr_list[]
+  * returns:
+  *	0  : not found
+  *	>0 : found
+  * author:
+  *	paul vixie, 29may94
+  */
+ static int
+ our_server(inp)
+ 	struct sockaddr_in *inp;
+ {
+ 	struct sockaddr_in ina;
+ 	register int ns, ret;
+ 
+ 	ina = *inp;
+ 	ret = 0;
+ 	for (ns = 0;  ns < _res.nscount;  ns++) {
+ 		register struct sockaddr_in *srv = &_res.nsaddr_list[ns];
+ 
+ 		if (srv->sin_family == ina.sin_family &&
+ 		    srv->sin_port == ina.sin_port &&
+ 		    (srv->sin_addr.s_addr == INADDR_ANY ||
+ 		     srv->sin_addr.s_addr == ina.sin_addr.s_addr)) {
+ 			ret++;
+ 			break;
+ 		}
+ 	}
+ 	return (ret);
+ }
+ 
+ /* int
+  * name_in_query(name, type, class, buf, eom)
+  *	look for (name,type,class) in the query section of packet (buf,eom)
+  * returns:
+  *	-1 : format error
+  *	0  : not found
+  *	>0 : found
+  */
+ static int
+ name_in_query(name, type, class, buf, eom)
+ 	char *name;
+ 	register int type, class;
+ 	u_char *buf, *eom;
+ {
+ 	register u_char *cp = buf + HFIXEDSZ;
+ 	int qdcount = ntohs(((HEADER*)buf)->qdcount);
+ 
+ 	while (qdcount-- > 0) {
+ 		char tname[MAXDNAME+1];
+ 		register int n, ttype, tclass;
+ 
+ 		n = dn_expand(buf, eom, cp, (u_char *)tname, sizeof tname);
+ 		if (n < 0)
+ 			return (-1);
+ 		cp += n;
+ 		ttype = _getshort(cp);	cp += INT16SZ;
+ 		tclass = _getshort(cp); cp += INT16SZ;
+ 		if (ttype == type &&
+ 		    tclass == class &&
+ 		    strcasecmp(tname, name) == 0)
+ 			return (1);
+ 	}
+ 	return (0);
+ }
+ 
+ /* int
+  * queries_match(buf1, eom1, buf2, eom2)
+  *	is there a 1:1 mapping of (name,type,class)
+  *	in (buf1,eom1) and (buf2,eom2)?
+  * returns:
+  *	-1 : format error
+  *	0  : not a 1:1 mapping
+  *	>0 : is a 1:1 mapping
+  */
+ static int
+ queries_match(buf1, eom1, buf2, eom2)
+ 	u_char *buf1, *eom1;
+ 	u_char *buf2, *eom2;
+ {
+ 	register u_char *cp = buf1 + HFIXEDSZ;
+ 	int qdcount = ntohs(((HEADER*)buf1)->qdcount);
+ 
+ 	if (qdcount != ntohs(((HEADER*)buf2)->qdcount))
+ 		return (0);
+ 	while (qdcount-- > 0) {
+ 		char tname[MAXDNAME+1];
+ 		register int n, ttype, tclass;
+ 
+ 		n = dn_expand(buf1, eom1, cp, (u_char *)tname, sizeof tname);
+ 		if (n < 0)
+ 			return (-1);
+ 		cp += n;
+ 		ttype = _getshort(cp);	cp += INT16SZ;
+ 		tclass = _getshort(cp); cp += INT16SZ;
+ 		if (!name_in_query(tname, ttype, tclass, buf2, eom2))
+ 			return (0);
+ 	}
+ 	return (1);
+ }
+ 
+ #if RES_NONBLOCK
+ struct cache {
+ 	u_char	*request;
+ 	u_char	*answer;
+ 	int	reqlen;
+ 	int	anslen;
+ 	u_char	try;
+ 	u_char	ns;
+ 	u_char	badns;
+ 	u_char	nocache;
+ 	time_t	time;
+ 	struct cache *next;
+ };
+ 
+ static struct cache *Caches = NULL;
+ #endif
+ 
+ int
+ res_send(buf, buflen, ans, anssiz)
+ #if defined(__RES)
+ #if (__RES > 19940221)	/* 4.9.3 */
+ 	const u_char	*buf;
+ 	int		buflen;
+ 	u_char		*ans;
+ 	int		anssiz;
+ #else			/* 4.9.2 */
+ 	const char	*buf;
+ 	int		buflen;
+ 	char		*ans;
+ 	int		anssiz;
+ #endif
+ #else			/* 4.8 */
+ 	char		*buf;
+ 	int		buflen;
+ 	char		*ans;
+ 	int		anssiz;
+ #endif
+ {
+ 	HEADER		*hp = (HEADER *) buf;
+ 	HEADER		*anhp = (HEADER *) ans;
+ 	int		gotsomewhere = 0,
+ 			connreset = 0,
+ 			terrno = ETIMEDOUT;
+ #if RES_NONBLOCK
+ 	struct cache *creq, *pcreq;
+ #endif
+ 	register int	n;
+ 	int		try, v_circuit, resplen, ns;
+ 	u_int		badns;	/* XXX NSMAX can't exceed #/bits in this var */
+ 
+ 	DprintQ((_res.options & RES_DEBUG) || (_res.pfcode & RES_PRF_QUERY),
+ 		(stdout, ";; res_send()\n"), buf);
+ 	if (!(_res.options & RES_INIT)) {
+ 		if (res_init() == -1)
+ 			return (-1);
+ 	}
+ #if RES_NONBLOCK
+ 	if (_res.options & RES_NONBLOCK) {
+ 		if (LogLevel > 10)
+ 			syslog(LOG_DEBUG, "Goto res_cache\n");
+ 		/* goto caching query routine */
+ 		return res_cache(buf, buflen, ans, anssiz);
+ 	}
+ 	pcreq = NULL;
+ 	/* scan the query in cache */
+ 	for (creq = Caches; creq != NULL; pcreq = creq, creq = creq->next)
+ 	{
+ 		if (creq->request != NULL
+ 		 && queries_match(buf, buf + buflen, creq->request,
+ 				  creq->request+creq->reqlen) > 0)
+ 			break; /* already registed */
+ 	}
+ 	if (creq != NULL && creq->nocache == 0) {	/* found in cache */
+ 		if (creq->answer != NULL && creq->anslen <= anssiz) {
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_send: found in cache\n");
+ 			if (creq->time < time(NULL)) {
+ 				/* TTL expiration */
+ 				if (pcreq == NULL)
+ 					Caches = creq->next;
+ 				else
+ 					pcreq->next = creq->next;
+ 				free(creq->request);
+ 				free(creq->answer);
+ 				free(creq);
+ 			} else {
+ 				bcopy(creq->answer, ans, creq->anslen);
+ #ifdef notdef
+ 				/* one time expiration */
+ 				if (pcreq == NULL)
+ 					Caches = creq->next;
+ 				else
+ 					pcreq->next = creq->next;
+ 				free(creq->request);
+ 				free(creq->answer);
+ 				free(creq);
+ #endif
+ 				return(creq->anslen);
+ 			}
+ 		}
+ 		else if (creq->try >= (u_char)_res.retry) {
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_send: cache timeout\n");
+ 			return(-1);     /* timed out */
+ 		}
+ 	} else {
+ 		if (LogLevel > 10)
+ 			show_query("X", buf, buf+buflen);
+ 	}
+ #endif
+ 	v_circuit = (_res.options & RES_USEVC) || buflen > PACKETSZ;
+ 	badns = 0;
+ 
+ 	/*
+ 	 * Send request, RETRY times, or until successful
+ 	 */
+ 	for (try = 0; try < _res.retry; try++) {
+ 	    for (ns = 0; ns < _res.nscount; ns++) {
+ 		struct sockaddr_in *nsap = &_res.nsaddr_list[ns];
+     same_ns:
+ 		if (badns & (1<<ns)) {
+ 			_res_close();
+ 			goto next_ns;
+ 		}
+ 
+ #ifdef notdef
+ 		if (Qhook) {
+ 			int done = 0, loops = 0;
+ 
+ 			do {
+ 				res_sendhookact act;
+ 
+ 				act = (*Qhook)(&nsap,
+ 					       &buf,
+ 					       &buflen,
+ 					       ans,
+ 					       anssiz,
+ 					       &resplen);
+ 				switch (act) {
+ 				case res_goahead:
+ 					done = 1;
+ 					break;
+ 				case res_nextns:
+ 					_res_close();
+ 					goto next_ns;
+ 				case res_done:
+ 					return (resplen);
+ 				case res_modified:
+ 					/* give the hook another try */
+ 					if (++loops < 42) /*doug adams*/
+ 						break;
+ 					/*FALLTHROUGH*/
+ 				case res_error:
+ 					/*FALLTHROUGH*/
+ 				default:
+ 					return (-1);
+ 				}
+ 			} while (!done);
+ 		}
+ #endif
+ 
+ 		Dprint(_res.options & RES_DEBUG,
+ 		       (stdout, ";; Querying server (# %d) address = %s\n",
+ 			ns+1, inet_ntoa(nsap->sin_addr)));
+ 
+ 		if (v_circuit) {
+ 			int		truncated;
+ 			struct iovec	iov[2];
+ 			u_short		len;
+ #if defined(__RES) && (__RES > 19940221)	/* 4.9.3 */
+ 			u_char		*cp;
+ #else
+ 			char		*cp;
+ #endif
+ 
+ 			/*
+ 			 * Use virtual circuit;
+ 			 * at most one attempt per server.
+ 			 */
+ 			try = _res.retry;
+ 			truncated = 0;
+ 			if ((s < 0) || (!vc)) {
+ 				if (s >= 0)
+ 					_res_close();
+ 
+ 				s = socket(AF_INET, SOCK_STREAM, PF_UNSPEC);
+ 				if (s < 0) {
+ 					terrno = errno;
+ 					Perror(stderr, "socket(vc)", errno);
+ 					return (-1);
+ 				}
+ 				if (connect(s,
+ 					    (struct sockaddr *)nsap,
+ 					    sizeof(struct sockaddr))
+ 				    < 0) {
+ 					terrno = errno;
+ 					Aerror(stderr, "connect/vc",
+ 					       errno, *nsap);
+ 					badns |= (1<<ns);
+ 					_res_close();
+ 					goto next_ns;
+ 				}
+ 				vc = 1;
+ 			}
+ 			/*
+ 			 * Send length & message
+ 			 */
+ 			putshort((u_short)buflen, (u_char*)&len);
+ 			iov[0].iov_base = (caddr_t)&len;
+ 			iov[0].iov_len = INT16SZ;
+ 			iov[1].iov_base = (caddr_t)buf;
+ 			iov[1].iov_len = buflen;
+ 			if (writev(s, iov, 2) != (INT16SZ + buflen)) {
+ 				terrno = errno;
+ 				Perror(stderr, "write failed", errno);
+ 				badns |= (1<<ns);
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			/*
+ 			 * Receive length & response
+ 			 */
+ 			cp = ans;
+ 			len = INT16SZ;
+ 			while ((n = read(s, cp, (int)len)) > 0) {
+ 				cp += n;
+ 				if ((len -= n) <= 0)
+ 					break;
+ 			}
+ 			if (n <= 0) {
+ 				terrno = errno;
+ 				Perror(stderr, "read failed", errno);
+ 				_res_close();
+ 				/*
+ 				 * A long running process might get its TCP
+ 				 * connection reset if the remote server was
+ 				 * restarted.  Requery the server instead of
+ 				 * trying a new one.  When there is only one
+ 				 * server, this means that a query might work
+ 				 * instead of failing.  We only allow one reset
+ 				 * per query to prevent looping.
+ 				 */
+ 				if (terrno == ECONNRESET && !connreset) {
+ 					connreset = 1;
+ 					_res_close();
+ 					goto same_ns;
+ 				}
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			resplen = _getshort(ans);
+ 			if (resplen > anssiz) {
+ 				Dprint(_res.options & RES_DEBUG,
+ 				       (stdout, ";; response truncated\n")
+ 				       );
+ 				truncated = 1;
+ 				len = anssiz;
+ 			} else
+ 				len = resplen;
+ 			cp = ans;
+ 			while (len != 0 &&
+ 			       (n = read(s, cp, (int)len)) > 0
+ 			       ) {
+ 				cp += n;
+ 				len -= n;
+ 			}
+ 			if (n <= 0) {
+ 				terrno = errno;
+ 				Perror(stderr, "read(vc)", errno);
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			if (truncated) {
+ 				/*
+ 				 * Flush rest of answer
+ 				 * so connection stays in synch.
+ 				 */
+ 				anhp->tc = 1;
+ 				len = resplen - anssiz;
+ 				while (len != 0) {
+ 					char junk[512];
+ 
+ 					n = (len > sizeof(junk)
+ 					     ? sizeof(junk)
+ 					     : len);
+ 					if ((n = read(s, junk, n)) > 0)
+ 						len -= n;
+ 					else
+ 						break;
+ 				}
+ 			}
+ 		} else {
+ 			/*
+ 			 * Use datagrams.
+ 			 */
+ 			struct timeval	timeout;
+ 			fd_set		dsmask;
+ 			struct sockaddr_in from;
+ 			int		fromlen;
+ 
+ 			if ((s < 0) || vc) {
+ 				if (vc)
+ 					_res_close();
+ 				s = socket(AF_INET, SOCK_DGRAM, PF_UNSPEC);
+ 				if (s < 0) {
+  bad_dg_sock:				terrno = errno;
+ 					Perror(stderr, "socket(dg)", errno);
+ 					return (-1);
+ 				}
+ 				connected = 0;
+ 			}
+ 			/*
+ 			 * On a 4.3BSD+ machine (client and server,
+ 			 * actually), sending to a nameserver datagram
+ 			 * port with no nameserver will cause an
+ 			 * ICMP port unreachable message to be returned.
+ 			 * If our datagram socket is "connected" to the
+ 			 * server, we get an ECONNREFUSED error on the next
+ 			 * socket operation, and select returns if the
+ 			 * error message is received.  We can thus detect
+ 			 * the absence of a nameserver without timing out.
+ 			 * If we have sent queries to at least two servers,
+ 			 * however, we don't want to remain connected,
+ 			 * as we wish to receive answers from the first
+ 			 * server to respond.
+ 			 */
+ 			if (_res.nscount == 1 || (try == 0 && ns == 0)) {
+ 				/*
+ 				 * Connect only if we are sure we won't
+ 				 * receive a response from another server.
+ 				 */
+ 				if (!connected) {
+ 					if (connect(s,
+ 						    (struct sockaddr *)nsap,
+ 						    sizeof(struct sockaddr)
+ 						    ) < 0
+ 					    ) {
+ 						Aerror(stderr,
+ 						       "connect(dg)",
+ 						       errno, *nsap);
+ 						badns |= (1<<ns);
+ 						_res_close();
+ 						goto next_ns;
+ 					}
+ 					connected = 1;
+ 				}
+ 				if (send(s, buf, buflen, 0) != buflen) {
+ 					Perror(stderr, "send", errno);
+ 					badns |= (1<<ns);
+ 					_res_close();
+ 					goto next_ns;
+ 				}
+ 			} else {
+ 				/*
+ 				 * Disconnect if we want to listen
+ 				 * for responses from more than one server.
+ 				 */
+ 				if (connected) {
+ #if 0 /* defined(BSD) && (BSD >= 199103) */
+ 					struct sockaddr_in no_addr;
+ 
+ 					no_addr.sin_family = AF_INET;
+ 					no_addr.sin_addr.s_addr = INADDR_ANY;
+ 					no_addr.sin_port = 0;
+ 					(void) connect(s,
+ 						       (struct sockaddr *)
+ 						        &no_addr,
+ 						       sizeof(no_addr));
+ #else
+ 					int s1 = socket(AF_INET, SOCK_DGRAM,
+ 							PF_UNSPEC);
+ 					if (s1 < 0)
+ 						goto bad_dg_sock;
+ 					(void) dup2(s1, s);
+ 					(void) close(s1);
+ 					Dprint(_res.options & RES_DEBUG,
+ 					       (stdout, ";; new DG socket\n"))
+ #endif
+ 					connected = 0;
+ 					errno = 0;
+ 				}
+ 				if (sendto(s, buf, buflen, 0,
+ 					   (struct sockaddr *)nsap,
+ 					   sizeof(struct sockaddr))
+ 				    != buflen) {
+ 					Aerror(stderr, "sendto", errno, *nsap);
+ 					badns |= (1<<ns);
+ 					_res_close();
+ 					goto next_ns;
+ 				}
+ 			}
+ 
+ 			/*
+ 			 * Wait for reply
+ 			 */
+ 			timeout.tv_sec = (_res.retrans << try);
+ 			if (try > 0)
+ 				timeout.tv_sec /= _res.nscount;
+ 			if ((long) timeout.tv_sec <= 0)
+ 				timeout.tv_sec = 1;
+ 			timeout.tv_usec = 0;
+     wait:
+ 			FD_ZERO(&dsmask);
+ 			FD_SET(s, &dsmask);
+ 			n = select(s+1, &dsmask, (fd_set *)NULL,
+ 				   (fd_set *)NULL, &timeout);
+ 			if (n < 0) {
+ 				Perror(stderr, "select", errno);
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			if (n == 0) {
+ 				/*
+ 				 * timeout
+ 				 */
+ 				Dprint(_res.options & RES_DEBUG,
+ 				       (stdout, ";; timeout\n")
+ 				       );
+ 				gotsomewhere = 1;
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			fromlen = sizeof(struct sockaddr_in);
+ 			resplen = recvfrom(s, ans, anssiz, 0,
+ 					   (struct sockaddr *)&from, &fromlen);
+ 			if (resplen <= 0) {
+ 				Perror(stderr, "recvfrom", errno);
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			gotsomewhere = 1;
+ 			if (hp->id != anhp->id) {
+ 				/*
+ 				 * response from old query, ignore it.
+ 				 * XXX - potential security hazard could
+ 				 *	 be detected here.
+ 				 */
+ 				DprintQ((_res.options & RES_DEBUG) ||
+ 					(_res.pfcode & RES_PRF_REPLY),
+ 					(stdout, ";; old answer:\n"),
+ 					ans);
+ 				goto wait;
+ 			}
+ #if CHECK_SRVR_ADDR
+ 			if (!(_res.options & RES_INSECURE1) &&
+ 			    !our_server(&from)) {
+ 				/*
+ 				 * response from wrong server? ignore it.
+ 				 * XXX - potential security hazard could
+ 				 *	 be detected here.
+ 				 */
+ 				DprintQ((_res.options & RES_DEBUG) ||
+ 					(_res.pfcode & RES_PRF_REPLY),
+ 					(stdout, ";; not our server:\n"),
+ 					ans);
+ 				goto wait;
+ 			}
+ #endif
+ 			if (!(_res.options & RES_INSECURE2) &&
+ 			    !queries_match(buf, buf + buflen,
+ 					   ans, ans + anssiz) > 0) {
+ 				/*
+ 				 * response contains wrong query? ignore it.
+ 				 * XXX - potential security hazard could
+ 				 *	 be detected here.
+ 				 */
+ 				DprintQ((_res.options & RES_DEBUG) ||
+ 					(_res.pfcode & RES_PRF_REPLY),
+ 					(stdout, ";; wrong query name:\n"),
+ 					ans);
+ 				goto wait;
+ 			}
+ 			if (anhp->rcode == SERVFAIL ||
+ 			    anhp->rcode == NOTIMP ||
+ 			    anhp->rcode == REFUSED) {
+ 				DprintQ(_res.options & RES_DEBUG,
+ 					(stdout, "server rejected query:\n"),
+ 					ans);
+ 				badns |= (1<<ns);
+ 				_res_close();
+ 				goto next_ns;
+ 			}
+ 			if (!(_res.options & RES_IGNTC) && anhp->tc) {
+ 				/*
+ 				 * get rest of answer;
+ 				 * use TCP with same server.
+ 				 */
+ 				Dprint(_res.options & RES_DEBUG,
+ 				       (stdout, ";; truncated answer\n")
+ 				       );
+ 				v_circuit = 1;
+ 				_res_close();
+ 				goto same_ns;
+ 			}
+ 		} /*if vc/dg*/
+ 		DprintQ((_res.options & RES_DEBUG) ||
+ 			(_res.pfcode & RES_PRF_REPLY),
+ 			(stdout, ";; got answer:\n"),
+ 			ans);
+ 		/*
+ 		 * If using virtual circuits, we assume that the first server
+ 		 * is preferred over the rest (i.e. it is on the local
+ 		 * machine) and only keep that one open.
+ 		 * If we have temporarily opened a virtual circuit,
+ 		 * or if we haven't been asked to keep a socket open,
+ 		 * close the socket.
+ 		 */
+ 		if ((v_circuit && (!(_res.options & RES_USEVC) || ns != 0)) ||
+ 		    !(_res.options & RES_STAYOPEN)) {
+ 			_res_close();
+ 		}
+ #ifdef notdef
+ 		if (Rhook) {
+ 			int done = 0, loops = 0;
+ 
+ 			do {
+ 				res_sendhookact act;
+ 
+ 				act = (*Rhook)(nsap,
+ 					       buf,
+ 					       buflen,
+ 					       ans,
+ 					       anssiz,
+ 					       &resplen);
+ 				switch (act) {
+ 				case res_goahead:
+ 				case res_done:
+ 					done = 1;
+ 					break;
+ 				case res_nextns:
+ 					_res_close();
+ 					goto next_ns;
+ 				case res_modified:
+ 					/* give the hook another try */
+ 					if (++loops < 42) /*doug adams*/
+ 						break;
+ 					/*FALLTHROUGH*/
+ 				case res_error:
+ 					/*FALLTHROUGH*/
+ 				default:
+ 					return (-1);
+ 				}
+ 			} while (!done);
+ 
+ 		}
+ #endif
+ 		return (resplen);
+     next_ns: ;
+ 	   } /*foreach ns*/
+ 	} /*foreach retry*/
+ 	_res_close();
+ 	if (!v_circuit) {
+ 		if (!gotsomewhere)
+ 			errno = ECONNREFUSED;	/* no nameservers found */
+ 		else
+ 			errno = ETIMEDOUT;	/* no answer obtained */
+ 	} else {
+ 		errno = terrno;
+ 	}
+ 	return (-1);
+ }
+ 
+ /*
+  * This routine is for closing the socket if a virtual circuit is used and
+  * the program wants to close it.  This provides support for endhostent()
+  * which expects to close the socket.
+  *
+  * This routine is not expected to be user visible.
+  */
+ void
+ _res_close()
+ {
+ 	if (s >= 0) {
+ 		(void) close(s);
+ 		s = -1;
+ 		connected = 0;
+ 		vc = 0;
+ 	}
+ }
+ 
+ #if RES_NONBLOCK
+ /*
+  * non bocking query routine
+  * this routine is called if RES_NONBLOCK flag is set.
+  * after of all queries, do res_sync() with RES_NONBLOCK flag.
+  */
+ int
+ res_cache(buf, buflen, ans, anssiz)
+ 	u_char		*buf;
+ 	int		buflen;
+ 	u_char		*ans;
+ 	int		anssiz;
+ {
+ 	static int	s = -1;
+ 	static fd_set	dsmask;
+ 	time_t		now, latest;
+ 	struct sockaddr_in *nsap;
+ 	struct timeval	timeout;
+ 	struct sockaddr_in from;
+ 	int		fromlen;
+ 	int		resplen;
+ 	HEADER		*qp, *ap;
+ 	struct cache	*creq;
+ 	int		n;
+ 	int		pending = 0;
+ 	int		syncing = 0;
+ 	int		itvl;
+ 
+ 	now = time(NULL);
+ 
+ 	if (buf == NULL)
+ 		syncing = 1;
+ 	if (!syncing) {	/* non-block caching */
+ 		for (creq = Caches; creq != NULL; creq = creq->next)
+ 		{
+ 			if (creq->request != NULL
+ 			 && queries_match(buf, buf + buflen, creq->request,
+ 					  creq->request+creq->reqlen) > 0)
+ 				break; /* already registed */
+ 		}
+ 
+ 		if (creq == NULL) /* regist in cache */
+ 		{
+ 			if (LogLevel > 10) {
+ 				syslog(LOG_DEBUG, "res_cache: regist in cache\n");
+ 				show_query("Q", buf, buf+buflen);
+ 			}
+ 			creq = (struct cache *)malloc(sizeof(struct cache));
+ 			if (creq == NULL)
+ 				return(-1);	/* allocation failed */
+ 			bzero(creq, sizeof(struct cache));
+ 			creq->request = (u_char *)malloc(buflen);
+ 			if (creq->request == NULL)
+ 				return(-1);	/* allocation failed */
+ 			bcopy(buf, creq->request, buflen);
+ 			creq->reqlen = buflen;
+ 			creq->next = Caches;
+ 			Caches = creq;
+ 		} else {
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_cache: found in cache (nop)\n");
+ 			return (0);
+ 		}
+ 	}
+ 
+ 	if (s == -1) {
+ 		s = socket(AF_INET, SOCK_DGRAM, PF_UNSPEC);
+ 		if (s < 0) {
+ 			Perror(stderr, "socket", errno);
+ 			return (-1);
+ 		}
+ 	}
+ 
+ again:
+ 	/* send request packets */
+ 	for (creq = Caches; creq != NULL; creq = creq->next)
+ 	{
+ 		if (creq->try >= (u_char)_res.retry)
+ 			continue;	/* timed out */
+ 		if (creq->nocache)
+ 			continue;	/* nocache required */
+ 		if (creq->answer != NULL)
+ 			continue;	/* already got */
+ 		if (creq->time <= now)	/* the time to work */
+ 		{
+ 			if (creq->time != 0)	/* not the first time */
+ 			{
+ 				do {
+ 					++creq->ns;
+ 				} while (creq->badns & (1<<creq->ns));
+ 				if (creq->ns >= (u_char)_res.nscount)
+ 				{
+ 					creq->ns = 0;
+ 					while (creq->badns & (1<<creq->ns))
+ 						creq->ns++;
+ 					if (creq->ns >= (u_char)_res.nscount) {
+ 						/* no valid ns */
+ 						creq->nocache = 1;
+ 						/* set status of timeout */
+ 						creq->try = (u_char)_res.retry;
+ 						if (LogLevel > 10)
+ 							syslog(LOG_DEBUG, "res_cache: no valid ns (%x)\n", creq->badns);
+ 						continue;
+ 					}
+ 					if (creq->try < (u_char)_res.retry)
+ 						creq->try++;
+ 				}
+ 			}
+ 			itvl = _res.retrans << creq->try;
+ 			if (LogLevel > 10) {
+ 				syslog(LOG_DEBUG, "res_cache: itvl %d\n",
+ 					itvl);
+ 			}
+ 			if (creq->try > 0)
+ 				itvl /= _res.nscount;
+ 			if (itvl <= 0)
+ 				itvl = 1;
+ 			creq->time = now + itvl;
+ 			nsap = &_res.nsaddr_list[creq->ns];
+ 			if (LogLevel > 10) {
+ 				syslog(LOG_DEBUG, "res_cache: send query (server is %s)\n", inet_ntoa(nsap->sin_addr));
+ 				show_query("q", creq->request,
+ 					creq->request+creq->reqlen);
+ 			}
+ 			if (sendto(s, creq->request, creq->reqlen, 0,
+ 				   (struct sockaddr *)nsap,
+ 				   sizeof(struct sockaddr)) != creq->reqlen)
+ 			{
+ 				creq->badns |= 1<<creq->ns;
+ 				if (LogLevel > 10)
+ 					syslog(LOG_DEBUG, "res_cache: invalid ns\n");
+ 			}
+ #if 0 /* HAVE_USLEEP */
+ 			usleep(1000); /* XXX */
+ #else
+ 			timeout.tv_sec = 0;
+ 			timeout.tv_usec = 1000; /* XXX */
+ 			(void)select(0, (fd_set *)NULL, (fd_set *)NULL,
+ 				     (fd_set *)NULL, &timeout);
+ #endif
+ 		}
+ 	}
+ 
+ 	do {
+ 		latest = 0;
+ 
+ 		if (syncing) {
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_cache: sync\n");
+ 
+ 			/* get next action time */
+ 			for (creq = Caches; creq != NULL; creq = creq->next)
+ 			{
+ 				if (creq->try >= (u_char)_res.retry)
+ 					continue;	/* timed out */
+ 				if (creq->nocache)
+ 					continue;	/* nocache required */
+ 				if (creq->answer != NULL)
+ 					continue;	/* already got */
+ 				if (latest == 0 || creq->time < latest)
+ 					latest = creq->time;
+ 			}
+ 
+ 			if (latest == 0)	/* no more pending queries */
+ 				break;
+ 			if (latest > now)
+ 				timeout.tv_sec = latest - now;
+ 			else
+ 				timeout.tv_sec = 1;	/* XXX */
+ 			timeout.tv_usec = 0;
+ 		} else {
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_cache: query only\n");
+ 
+ 			timeout.tv_sec = 0;
+ 			timeout.tv_usec = 0;
+ 		}
+ 
+ 		if (LogLevel > 10)
+ 			syslog(LOG_DEBUG, "res_cache: wait(%d)\n",
+ 				timeout.tv_sec);
+ 
+ 		FD_ZERO(&dsmask);
+ 		FD_SET(s, &dsmask);
+ 		if ((n = select(s+1, &dsmask, (fd_set *)NULL, (fd_set *)NULL,
+ 			   &timeout)) > 0)
+ 		{
+ 			/* packet arrived */
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_cache: recv answer\n");
+ 
+ 			fromlen = sizeof(struct sockaddr_in);
+ 			resplen = recvfrom(s, ans, anssiz, 0,
+ 					   (struct sockaddr *)&from, &fromlen);
+ 
+ 			if (LogLevel > 10) {
+ 				/* show_query(ans, ans+anssiz); */
+ 			}
+ 
+ 			now = time(NULL);
+ 
+ 			if (resplen <= 0) {
+ 				if (LogLevel > 10)
+ 					syslog(LOG_DEBUG, "res_cache: anssiz %d\n", resplen);
+ 				continue;	/* error */
+ 			}
+ 
+ #if CHECK_SRVR_ADDR
+ 			if (!(_res.options & RES_INSECURE1) &&
+ 			    !our_server(&from)) {
+ 				if (LogLevel > 10)
+ 					syslog(LOG_DEBUG, "res_cache: server\n");
+ 				continue;  /* not from our server */
+ 			}
+ #endif
+ 
+ 			ap = (HEADER *)ans;
+ 			for (creq = Caches; creq != NULL; creq = creq->next)
+ 			{
+ 				qp = (HEADER *)creq->request;
+ 
+ 				if (qp->id == ap->id
+ 				 && queries_match(ans, ans + resplen,
+ 						  creq->request,
+ 						  creq->request+creq->reqlen)
+ 				    > 0)
+ 				{
+ 					if (ap->tc) {
+ 						Dprint(_res.options & RES_DEBUG, (stdout, ";; truncated answer\n"));
+ 						creq->nocache = 1;
+ 						break;
+ 					}
+ 					if (ap->rcode == SERVFAIL ||
+ 					    ap->rcode == NOTIMP ||
+ 					    ap->rcode == REFUSED) {
+ 						DprintQ(_res.options & RES_DEBUG, (stdout, "server rejected query:\n"), ans);
+ 						creq->badns |= (1<<creq->ns);
+ 						if (LogLevel > 10)
+ 							syslog(LOG_DEBUG, "res_cache: badnsF %x/%x\n", creq->badns, (1<<_res.nscount)-1);
+ 						if (creq->badns != (1<<_res.nscount)-1)
+ 							break;
+ 					}
+ 
+ 					if (LogLevel > 10) {
+ 						syslog(LOG_DEBUG, "res_cache: cache\n");
+ 						show_query("A", ans, ans+resplen);
+ 					}
+ 
+ 					prefetch_related(ans, ans+resplen);
+ 
+ 					creq->answer = (u_char*)malloc(resplen);
+ 					if (creq->answer != NULL) {
+ 						bcopy(ans, creq->answer,
+ 						resplen);
+ 					} else {
+ 						/* error */
+ 					}
+ 					creq->anslen = resplen;
+ 					creq->try = (u_char)_res.retry;
+ 					creq->time = now + 3600; /* XXX */
+ 
+ 					break;
+ 				}
+ 			}
+ 			if (creq == NULL)
+ 			{
+ 				/* no associated query */
+ 				if (LogLevel > 10)
+ 					syslog(LOG_DEBUG, "res_cache: what??\n");
+ 				continue;
+ 			}
+ 		}
+ 		if (n < 0) {
+ 			/* error in select */
+ 			break;
+ 		}
+ 	} while(n > 0);
+ 
+ 	if (syncing) {
+ 		pending = 0;
+ 		if (LogLevel > 10)
+ 			syslog(LOG_DEBUG, "res_cache: syncing (%d)\n", now);
+ 		for (creq = Caches; creq != NULL; creq = creq->next)
+ 		{
+ 			if (creq->try >= (u_char)_res.retry)
+ 				continue;	/* timed out */
+ 			if (creq->nocache)
+ 				continue;	/* nocache required */
+ 			if (creq->answer != NULL)
+ 				continue;
+ 
+ 			pending++;
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "ev: %d\n", creq->time);
+ 		}
+ 		if (pending)
+ 		{
+ 			if (LogLevel > 10)
+ 				syslog(LOG_DEBUG, "res_cache: sync retry\n");
+ 			/* sleep(1); */
+ 			now = time(NULL);
+ 			goto again;
+ 		}
+ 	}
+ 	return (0);
+ }
+ 
+ /*
+  * for sync operation
+  */
+ /* void */
+ res_sync()
+ {
+         char qbuf[MAXDNAME];
+ 	(void)res_send(NULL, 0, qbuf, MAXDNAME);
+ }
+ 
+ 
+ prefetch_related(b, e)
+ u_char *b, *e;
+ {
+ 	char nbuf[MAXDNAME+1];
+ 	register int n;
+ 	int type, class, pref;
+ 	HEADER *hp;
+ 	u_char *eom, *ap;
+ 	struct hostent *hep;
+ 	int ancount, qdcount;
+         union
+         {
+                 HEADER  qb1;
+                 char    qb2[PACKETSZ];
+         } answer;
+ 
+ 	hp = (HEADER *) b;
+ 	ap = (u_char *) b + sizeof(HEADER);
+ 	eom = (u_char *) e;
+ 
+ 	/* skip question part of response -- we know what we asked */
+ 	for (qdcount = ntohs(hp->qdcount); qdcount--; )
+ 	{
+ 		n = dn_expand((u_char *) b, eom, ap,
+ 			      (u_char *) nbuf, sizeof nbuf);
+ 		ap += n;
+ 		GETSHORT(type, ap);
+ 		GETSHORT(class, ap);
+ 	}
+ 
+ 	if (type != T_MX)
+ 	{
+ 		return;
+ 	}
+ 
+ 	if (ntohs(hp->ancount) == 0)
+ 	{
+ 		res_query(nbuf, C_IN, T_A, (char *)&answer, sizeof(answer));
+ 		return;
+ 	}
+ 
+ 	for (ancount = ntohs(hp->ancount); --ancount >= 0 && ap < eom;)
+ 	{
+ 		n = dn_expand((u_char *) b, eom, ap,
+ 			      (u_char *) nbuf, sizeof nbuf);
+ 		if (n < 0)
+ 			break;
+ 		ap += n;
+ 		GETSHORT(type, ap);
+ 		GETSHORT(class, ap);
+ 		ap += sizeof(long);
+ 		GETSHORT(n, ap);
+ 		if (type == T_MX) {
+ 			GETSHORT(pref, ap);
+ 			if ((n = dn_expand((u_char *) b, eom, ap,
+ 					   (u_char *) nbuf, sizeof nbuf)) < 0)
+ 				break;
+ 			ap += n;
+ 			res_query(nbuf, C_IN, T_A,
+ 					(char *)&answer, sizeof(answer));
+ 		} else {
+ 			ap += n;
+ 		}
+ 	}
+ }
+ 
+ show_query(t, b, e)
+ u_char *t, *b, *e;
+ {
+ 	char nbuf[MAXDNAME+1];
+ 	register int n;
+ 	int type, class, pref;
+ 	HEADER *hp;
+ 	u_char *eom, *ap;
+ 	struct hostent *hep;
+ 	int ancount, qdcount;
+ 
+ 	hp = (HEADER *) b;
+ 	ap = (u_char *) b + sizeof(HEADER);
+ 	eom = (u_char *) e;
+ 
+ 	/* skip question part of response -- we know what we asked */
+ 	for (qdcount = ntohs(hp->qdcount); qdcount--; )
+ 	{
+ 		n = dn_expand((u_char *) b, eom, ap,
+ 			      (u_char *) nbuf, sizeof nbuf);
+ 		ap += n;
+ 		GETSHORT(type, ap);
+ 		GETSHORT(class, ap);
+ 		syslog(LOG_DEBUG, "%s:%s(%d,%d), rcode=%d\n",
+ 			t, nbuf, class, type, ntohs(hp->rcode));
+ 	}
+ 
+ 	if (ntohs(hp->ancount) == 0)
+ 		return;
+ 
+ 	syslog(LOG_DEBUG, "ancount = %d\n", ntohs(hp->ancount));
+ 	for (ancount = ntohs(hp->ancount); --ancount >= 0 && ap < eom;)
+ 	{
+ 		n = dn_expand((u_char *) b, eom, ap,
+ 			      (u_char *) nbuf, sizeof nbuf);
+ 		if (n < 0)
+ 			break;
+ 		ap += n;
+ 		GETSHORT(type, ap);
+ 		GETSHORT(class, ap);
+ 		ap += sizeof(long);
+ 		GETSHORT(n, ap);
+ 		if (type == T_MX) {
+ 			GETSHORT(pref, ap);
+ 			if ((n = dn_expand((u_char *) b, eom, ap,
+ 					   (u_char *) nbuf, sizeof nbuf)) < 0)
+ 				break;
+ 			ap += n;
+ 			syslog(LOG_DEBUG, "MX pref=%d,host=(%s)\n", pref, nbuf);
+ #if 0
+ 			hep = gethostbyname(nbuf);
+ 			if (hep == NULL) {
+ 				syslog(LOG_DEBUG, "get A --  h_errno=%d\n",
+ 					h_errno);
+ 			} else {
+ 				syslog(LOG_DEBUG, "get A -- OK\n");
+ 			}
+ #endif
+ 		} else {
+ 			ap += n;
+ 			/* syslog(LOG_DEBUG, "unexpected answer type: %d\n",
+ 				type); */
+ 		}
+ 	}
+ }
+ #endif
diff -c ../src.org/savemail.c ./savemail.c
*** ../src.org/savemail.c	Fri Feb 10 05:24:49 1995
--- ./savemail.c	Sat Apr  1 14:48:19 1995
***************
*** 33,38 ****
--- 33,39 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)savemail.c	2.5 (motonori/WIDE) 2/27/95";
  static char sccsid[] = "@(#)savemail.c	8.29 (Berkeley) 5/10/94";
  #endif /* not lint */
  
***************
*** 258,264 ****
--- 259,270 ----
  				(void) sendtolist("postmaster",
  					  NULLADDR, &e->e_errorqueue, e);
  			}
+ #ifdef original
  			if (strcmp(e->e_from.q_paddr, "<>") != 0)
+ #else
+ 			if (strcmp(e->e_from.q_paddr, "<>") != 0 &&
+ 			    strcmp(e->e_from.q_user, "<>") != 0)
+ #endif
  			{
  				(void) sendtolist(e->e_from.q_paddr,
  					  NULLADDR, &e->e_errorqueue, e);
***************
*** 497,502 ****
--- 503,512 ----
  		ee->e_flags &= ~EF_OLDSTYLE;
  	ee->e_sendqueue = returnq;
  	ee->e_msgsize = ERRORFUDGE;
+ #if QUICK_RESPONSE
+ 	if (ee->e_sendmode == SM_QUEUE)
+ 		ee->e_sendmode = SM_FORK;
+ #endif
  	if (!NoReturn)
  		ee->e_msgsize += e->e_msgsize;
  	initsys(ee);
diff -c ../src.org/sendmail.0 ./sendmail.0
*** ../src.org/sendmail.0	Sat Apr  1 14:45:08 1995
--- ./sendmail.0	Sat Apr  1 14:48:19 1995
***************
*** 0 ****
--- 1,281 ----
+ SENDMAIL(8)              UNIX System Manager's Manual              SENDMAIL(8)
+ 
+ NAME
+      sendmail - send mail over the internet
+ 
+ SYNOPSIS
+      sendmail [_f_l_a_g_s] [_a_d_d_r_e_s_s ...]
+      newaliases
+      mailq [-v]
+ 
+ DESCRIPTION
+      Sendmail sends a message to one or more _r_e_c_i_p_i_e_n_t_s, routing the message
+      over whatever networks are necessary.  Sendmail does internetwork for-
+      warding as necessary to deliver the message to the correct place.
+ 
+      Sendmail is not intended as a user interface routine; other programs pro-
+      vide user-friendly front ends; sendmail is used only to deliver pre-
+      formatted messages.
+ 
+      With no flags, sendmail reads its standard input up to an end-of-file or
+      a line consisting only of a single dot and sends a copy of the message
+      found there to all of the addresses listed.  It determines the network(s)
+      to use based on the syntax and contents of the addresses.
+ 
+      Local addresses are looked up in a file and aliased appropriately.
+      Aliasing can be prevented by preceding the address with a backslash.
+      Normally the sender is not included in any alias expansions, e.g., if
+      `john' sends to `group', and `group' includes `john' in the expansion,
+      then the letter will not be delivered to `john'.
+ 
+   Parameters
+ 
+      -B_t_y_p_e      Set the body type to _t_y_p_e. Current legal values 7BIT or
+                  8BITMIME.
+ 
+      -ba         Go into ARPANET mode.  All input lines must end with a CR-LF,
+                  and all messages will be generated with a CR-LF at the end.
+                  Also, the ``From:'' and ``Sender:'' fields are examined for
+                  the name of the sender.
+ 
+      -bd         Run as a daemon.  This requires Berkeley IPC. Sendmail will
+                  fork and run in background listening on socket 25 for incom-
+                  ing SMTP connections.  This is normally run from /_e_t_c/_r_c.
+ 
+      -bi         Initialize the alias database.
+ 
+      -bm         Deliver mail in the usual way (default).
+ 
+      -bp         Print a listing of the queue.
+ 
+      -bs         Use the SMTP protocol as described in RFC821 on standard in-
+                  put and output.  This flag implies all the operations of the
+                  -ba flag that are compatible with SMTP.
+ 
+      -bt         Run in address test mode.  This mode reads addresses and
+                  shows the steps in parsing; it is used for debugging confi-
+                  guration tables.
+ 
+      -bv         Verify names only - do not try to collect or deliver a mes-
+                  sage.  Verify mode is normally used for validating users or
+                  mailing lists.
+ 
+      -C_f_i_l_e      Use alternate configuration file.  Sendmail refuses to run as
+ 
+ 
+                  root if an alternate configuration file is specified.
+ 
+      -d_X         Set debugging value to _X.
+ 
+      -F_f_u_l_l_n_a_m_e  Set the full name of the sender.
+ 
+      -f_n_a_m_e      Sets the name of the ``from'' person (i.e., the sender of the
+                  mail).  -f can only be used by ``trusted'' users (normally
+                  _r_o_o_t, _d_a_e_m_o_n, and _n_e_t_w_o_r_k) or if the person you are trying to
+                  become is the same as the person you are.
+ 
+      -h_N         Set the hop count to _N. The hop count is incremented every
+                  time the mail is processed.  When it reaches a limit, the
+                  mail is returned with an error message, the victim of an
+                  aliasing loop.  If not specified, ``Received:'' lines in the
+                  message are counted.
+ 
+      -n          Don't do aliasing.
+ 
+      -o_x _v_a_l_u_e   Set option _x to the specified _v_a_l_u_e. Options are described
+                  below.
+ 
+      -p_p_r_o_t_o_c_o_l  Set the name of the protocol used to receive the message.
+                  This can be a simple protocol name such as ``UUCP'' or a pro-
+                  tocol and hostname, such as ``UUCP:ucbvax''.
+ 
+      -q[_t_i_m_e]    Processed saved messages in the queue at given intervals.  If
+                  _t_i_m_e is omitted, process the queue once.  Time is given as a
+                  tagged number, with `s' being seconds, `m' being minutes, `h'
+                  being hours, `d' being days, and `w' being weeks.  For exam-
+                  ple, `-q1h30m' or `-q90m' would both set the timeout to one
+                  hour thirty minutes.  If _t_i_m_e is specified, sendmail will run
+                  in background.  This option can be used safely with -bd.
+ 
+      -r_n_a_m_e      An alternate and obsolete form of the -f flag.
+ 
+      -t          Read message for recipients.  To:, Cc:, and Bcc: lines will
+                  be scanned for recipient addresses.  The Bcc: line will be
+                  deleted before transmission.  Any addresses in the argument
+                  list will be suppressed, that is, they will _n_o_t receive
+                  copies even if listed in the message header.
+ 
+      -v          Go into verbose mode.  Alias expansions will be announced,
+                  etc.
+ 
+      -X _l_o_g_f_i_l_e  Log all traffic in and out of mailers in the indicated log
+                  file.  This should only be used as a last resort for debug-
+                  ging mailer bugs.  It will log a lot of data very quickly.
+ 
+   Options
+      There are also a number of processing options that may be set.  Normally
+      these will only be used by a system administrator.  Options may be set
+      either on the command line using the -o flag or in the configuration
+      file.  This is a partial list; for a complete list (and details), consult
+      the _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e. The options are:
+ 
+      A_f_i_l_e       Use alternate alias file.
+ 
+      b_n_b_l_o_c_k_s    The minimum number of free blocks needed on the spool
+                  filesystem.
+ 
+      c           On mailers that are considered ``expensive'' to connect to,
+                  don't initiate immediate connection.  This requires queueing.
+ 
+      C _N         Checkpoint the queue file after every _N successful deliveries
+                  (default 10).  This avoids excessive duplicate deliveries
+                  when sending to long mailing lists interrupted by system
+                  crashes.
+ 
+      d_x          Set the delivery mode to _x. Delivery modes are `i' for in-
+                  teractive (synchronous) delivery, `b' for background (asyn-
+                  chronous) delivery, and `q' for queue only - i.e., actual
+                  delivery is done the next time the queue is run.
+ 
+      D           Try to automatically rebuild the alias database if necessary.
+ 
+      e_x          Set error processing to mode _x. Valid modes are `m' to mail
+                  back the error message, `w' to ``write'' back the error mes-
+                  sage (or mail it back if the sender is not logged in), `p' to
+                  print the errors on the terminal (default), `q' to throw away
+                  error messages (only exit status is returned), and `e' to do
+                  special processing for the BerkNet.  If the text of the mes-
+                  sage is not mailed back by modes `m' or `w' and if the sender
+                  is local to this machine, a copy of the message is appended
+                  to the file _d_e_a_d._l_e_t_t_e_r in the sender's home directory.
+ 
+      f           Save UNIX-style From lines at the front of messages.
+ 
+      G           Match local mail names against the GECOS portion of the pass-
+                  word file.
+ 
+      g _N         The default group id to use when calling mailers.
+ 
+      H_f_i_l_e       The SMTP help file.
+ 
+      h _N         The maximum number of times a message is allowed to ``hop''
+                  before we decide it is in a loop.
+ 
+      i           Do not take dots on a line by themselves as a message termi-
+                  nator.
+ 
+      j           Send error messages in MIME format.
+ 
+      K_t_i_m_e_o_u_t    Set connection cache timeout.
+ 
+      k_N          Set connection cache size.
+ 
+      L_n          The log level.
+ 
+      l           Pay attention to the Errors-To: header.
+ 
+      m           Send to ``me'' (the sender) also if I am in an alias expan-
+                  sion.
+ 
+      n           Validate the right hand side of aliases during a
+                  newaliases(1) command.
+ 
+      o           If set, this message may have old style headers.  If not set,
+                  this message is guaranteed to have new style headers (i.e.,
+                  commas instead of spaces between addresses).  If set, an
+                  adaptive algorithm is used that will correctly determine the
+                  header format in most cases.
+ 
+      Q_q_u_e_u_e_d_i_r   Select the directory in which to queue messages.
+ 
+      S_f_i_l_e       Save statistics in the named file.
+ 
+      s           Always instantiate the queue file, even under circumstances
+                  where it is not strictly necessary.  This provides safety
+                  against system crashes during delivery.
+ 
+      T_t_i_m_e       Set the timeout on undelivered messages in the queue to the
+                  specified time.  After delivery has failed (e.g., because of
+                  a host being down) for this amount of time, failed messages
+                  will be returned to the sender.  The default is three days.
+ 
+      t_s_t_z, _d_t_z   Set the name of the time zone.
+ 
+      U_u_s_e_r_d_a_t_a_b_a_s_e
+                  If set, a user database is consulted to get forwarding infor-
+                  mation.  You can consider this an adjunct to the aliasing
+                  mechanism, except that the database is intended to be distri-
+                  buted; aliases are local to a particular host.  This may not
+                  be available if your sendmail does not have the USERDB option
+                  compiled in.
+ 
+      u_N          Set the default user id for mailers.
+ 
+      Y           Fork each job during queue runs.  May be convenient on
+                  memory-poor machines.
+ 
+      7           Strip incoming messages to seven bits.
+ 
+      In aliases, the first character of a name may be a vertical bar to cause
+      interpretation of the rest of the name as a command to pipe the mail to.
+      It may be necessary to quote the name to keep sendmail from suppressing
+      the blanks from between arguments.  For example, a common alias is:
+ 
+            msgs: "|/usr/bin/msgs -s"
+ 
+      Aliases may also have the syntax ``:include:_f_i_l_e_n_a_m_e'' to ask sendmail to
+      read the named file for a list of recipients.  For example, an alias such
+      as:
+ 
+            poets: ":include:/usr/local/lib/poets.list"
+ 
+      would read /_u_s_r/_l_o_c_a_l/_l_i_b/_p_o_e_t_s._l_i_s_t for the list of addresses making up
+      the group.
+ 
+      Sendmail returns an exit status describing what it did.  The codes are
+      defined in <_s_y_s_e_x_i_t_s._h>:
+            EX_OK           Successful completion on all addresses.
+            EX_NOUSER       User name not recognized.
+            EX_UNAVAILABLE  Catchall meaning necessary resources were not
+                            available.
+            EX_SYNTAX       Syntax error in address.
+            EX_SOFTWARE     Internal software error, including bad arguments.
+            EX_OSERR        Temporary operating system error, such as ``cannot
+                            fork''.
+            EX_NOHOST       Host name not recognized.
+            EX_TEMPFAIL     Message could not be sent immediately, but was
+                            queued.
+ 
+      If invoked as newaliases, sendmail will rebuild the alias database.  If
+      invoked as mailq, sendmail will print the contents of the mail queue.
+ 
+ FILES
+      Except for the file /_e_t_c/_s_e_n_d_m_a_i_l._c_f itself, the following pathnames are
+      all specified in /_e_t_c/_s_e_n_d_m_a_i_l._c_f. Thus, these values are only approxima-
+      tions.
+ 
+      /etc/aliases          raw data for alias names
+      /etc/aliases.db       data base of alias names
+      /etc/sendmail.cf      configuration file
+      /etc/sendmail.hf      help file
+      /var/log/sendmail.st  collected statistics
+ 
+ 
+      /var/spool/mqueue/*   temp files
+      /var/run/sendmail.pid
+                            The process id of the daemon
+ 
+ SEE ALSO
+      binmail(1),  mail(1),  rmail(1),  syslog(3),  aliases(5),  mailaddr(7),
+      rc(8);
+ 
+      DARPA Internet Request For Comments _R_F_C_8_1_9, _R_F_C_8_2_1, _R_F_C_8_2_2.
+ 
+      _S_e_n_d_m_a_i_l - _A_n _I_n_t_e_r_n_e_t_w_o_r_k _M_a_i_l _R_o_u_t_e_r, No. 9, SMM.
+ 
+      _S_e_n_d_m_a_i_l _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _O_p_e_r_a_t_i_o_n _G_u_i_d_e, No. 8, SMM.
+ 
+ HISTORY
+      The sendmail command appeared in 4.2BSD.
+ 
+ 4th Berkeley Distribution     December 11, 1993                              4
diff -c ../src.org/sendmail.h ./sendmail.h
*** ../src.org/sendmail.h	Mon Mar  6 02:58:23 1995
--- ./sendmail.h	Sat Apr  1 14:48:19 1995
***************
*** 31,36 ****
--- 31,37 ----
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
+  *	@(#)sendmail.h	2.13 (motonori/WIDE) 3/12/95
   *	@(#)sendmail.h	8.43.1.3 (Berkeley) 3/5/95
   */
  
***************
*** 47,53 ****
--- 48,56 ----
  # define EXTERN extern
  # endif /* _DEFINE */
  
+ # ifndef NO_UNISTD_H
  # include <unistd.h>
+ # endif
  # include <stddef.h>
  # include <stdlib.h>
  # include <stdio.h>
***************
*** 55,66 ****
  # include <setjmp.h>
  # include <sysexits.h>
  # include <string.h>
- # include <time.h>
  # include <errno.h>
  
  # include "conf.h"
  # include "useful.h"
  
  # ifdef LOG
  # include <syslog.h>
  # endif /* LOG */
--- 58,74 ----
  # include <setjmp.h>
  # include <sysexits.h>
  # include <string.h>
  # include <errno.h>
  
  # include "conf.h"
  # include "useful.h"
  
+ # if NON_BLOCK_CONNECT
+ #  include <sys/time.h>
+ # else
+ #  include <time.h>
+ # endif
+ 
  # ifdef LOG
  # include <syslog.h>
  # endif /* LOG */
***************
*** 122,131 ****
--- 130,151 ----
  struct address
  {
  	char		*q_paddr;	/* the printname for the address */
+ # if !MULTI_MAILER
  	char		*q_user;	/* user name */
+ # endif
  	char		*q_ruser;	/* real user name, or NULL if q_user */
+ # if !MULTI_MAILER
  	char		*q_host;	/* host name */
  	struct mailer	*q_mailer;	/* mailer to use */
+ # endif
+ # if MULTI_MAILER
+ # define q_user		q_users[0]
+ # define q_host		q_hosts[0]
+ # define q_mailer	q_mailers[0]
+ 	char		*q_users[MAXDSPTMAILERS];	/* user name */
+ 	char		*q_hosts[MAXDSPTMAILERS];	/* host name */
+ 	struct mailer	*q_mailers[MAXDSPTMAILERS];	/* mailer to use */
+ # endif
  	u_short		q_flags;	/* status flags, see below */
  	uid_t		q_uid;		/* user-id of receiver (if known) */
  	gid_t		q_gid;		/* group-id of receiver (if known) */
***************
*** 136,141 ****
--- 156,164 ----
  	char		*q_owner;	/* owner of q_alias */
  	struct address	*q_tchain;	/* temporary use chain */
  	time_t		q_timeout;	/* timeout for this address */
+ #if NON_BLOCK_CONNECT
+ 	struct mailer_con_info *q_mci;	/* current MCI for this address */
+ #endif
  };
  
  typedef struct address ADDRESS;
***************
*** 289,294 ****
--- 312,321 ----
  	struct mailer	*mci_mailer;	/* ptr to the mailer for this conn */
  	char		*mci_host;	/* host name */
  	time_t		mci_lastuse;	/* last usage time */
+ #if NON_BLOCK_CONNECT
+ 	int		mci_sd;		/* socket descriptor of connection */
+ 	ADDRESS		*mci_to;	/* receipient */
+ #endif
  };
  
  
***************
*** 311,316 ****
--- 338,346 ----
  #define MCIS_QUITING	4		/* running quit protocol */
  #define MCIS_SSD	5		/* service shutting down */
  #define MCIS_ERROR	6		/* I/O error on connection */
+ #if NON_BLOCK_CONNECT
+ #define MCIS_CONNECTING	7		/* connection now in progress */
+ #endif
  /*
  **  Envelope structure.
  **	This structure defines the message itself.  There is usually
***************
*** 358,364 ****
--- 388,398 ----
  	char		*e_statmsg;	/* stat msg (changes per delivery) */
  	char		*e_msgboundary;	/* MIME-style message part boundary */
  	char		*e_origrcpt;	/* original recipient (one only) */
+ #if EXTEND_MACRO
+ 	char		*e_macro[256];	/* macro definitions */
+ #else /* not EXTEND_MACRO */
  	char		*e_macro[128];	/* macro definitions */
+ #endif /* not EXTEND_MACRO */
  };
  
  /* values for e_flags */
diff -c ../src.org/sendmail.hf ./sendmail.hf
*** ../src.org/sendmail.hf	Fri Feb 10 05:22:07 1995
--- ./sendmail.hf	Sat Apr  1 14:48:20 1995
***************
*** 3,8 ****
--- 3,9 ----
  cpyr	Copyright (c) 1988, 1993
  cpyr	    The Regents of the University of California.  All rights reserved.
  cpyr	
+ cpyr	@(#)sendmail.hf	2.2 (motonori/WIDE) 10/8/93
  cpyr	@(#)sendmail.hf	8.2 (Berkeley) 7/16/93
  cpyr
  smtp	Commands:
***************
*** 12,17 ****
--- 13,22 ----
  smtp	For more info use "HELP <topic>".
  smtp	To report bugs in the implementation send email to
  smtp		sendmail@CS.Berkeley.EDU.
+ smtp	This sendmail includes "WIDE-Internet patch package" which provides
+ smtp	some useful improvements.
+ smtp	To report bugs/questions about this patch send email to
+ smtp		motonori@wide.ad.jp
  smtp	For local information send email to Postmaster at your site.
  help	HELP [ <topic> ]
  help		The HELP command gives help info.
diff -c ../src.org/sendmail.restart ./sendmail.restart
*** ../src.org/sendmail.restart	Sat Apr  1 14:45:08 1995
--- ./sendmail.restart	Sat Apr  1 14:48:20 1995
***************
*** 0 ****
--- 1,29 ----
+ #! /bin/sh -
+ #
+ #	@(#)sendmail.restart	2.2 (motonori/WIDE) 3/19/94
+ #
+ 
+ PATH=/usr/ucb:/bin:/usr/bin
+ export PATH
+ 
+ PIDFILE=/etc/sendmail.pid
+ 
+ # unset TZ
+ # for old versions
+ unset NAME
+ unset HOSTALIASES
+ # for mailtonews
+ unset LOGNAME
+ unset USER
+ 
+ kill `head -1 $PIDFILE`
+ sleep 2
+ ARGS=`tail +2 $PIDFILE`
+ if [ "$ARGS" ]; then
+ 	eval $ARGS
+ else
+ 	/usr/lib/sendmail -bd -q1h
+ fi
+ 
+ # sleep 1
+ # tail -5 /var/log/syslog
diff -c ../src.org/srvrsmtp.c ./srvrsmtp.c
*** ../src.org/srvrsmtp.c	Sat Feb 11 00:54:38 1995
--- ./srvrsmtp.c	Sat Apr  1 14:48:20 1995
***************
*** 35,40 ****
--- 35,41 ----
  # include "sendmail.h"
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)srvrsmtp.c	2.9 (motonori/WIDE) 4/20/94";
  #ifdef SMTP
  static char sccsid[] = "@(#)srvrsmtp.c	8.37 (Berkeley) 4/13/94 (with SMTP)";
  #else
***************
*** 146,151 ****
--- 147,157 ----
  	char cmdbuf[MAXLINE];
  	extern char Version[];
  	extern ENVELOPE BlankEnvelope;
+ #if ESMTPPEERSCLS
+ 	STAB *st;
+ 	bool brokensmtppeers;
+ 	char bsp_buf[MAXHOSTNAMELEN];
+ #endif
  
  	if (fileno(OutChannel) != fileno(stdout))
  	{
***************
*** 163,169 ****
--- 169,205 ----
  
  	setproctitle("server %s startup", CurSmtpClient);
  	expand("\201e", inp, &inp[sizeof inp], e);
+ #if ESMTPPEERSCLS
+ 	brokensmtppeers = BrokenSmtpPeers;
+ 	p = RealHostName;
+ 	while (!brokensmtppeers && p != NULL)
+ 	{
+ 		if ((st = stab(p, ST_CLASS, ST_FIND)) != NULL &&
+ 		    bitnset('e', st->s_class))
+ 		{
+ 			break;
+ 		}
+ 		sprintf(bsp_buf, "!%s", p);
+ 		if ((st = stab(bsp_buf, ST_CLASS, ST_FIND)) != NULL &&
+ 		    bitnset('e', st->s_class))
+ 		{
+ 			brokensmtppeers = TRUE;
+ 			break;
+ 		}
+ 		p = strchr(p+1, '.');
+ 	}
+ 	if (p == NULL)
+ 	{
+ 		if ((st = stab("!all", ST_CLASS, ST_FIND)) != NULL &&
+ 		    bitnset('e', st->s_class))
+ 		{
+ 			brokensmtppeers = TRUE;
+ 		}
+ 	}
+ 	if (brokensmtppeers)
+ #else
  	if (BrokenSmtpPeers)
+ #endif
  	{
  		p = strchr(inp, '\n');
  		if (p != NULL)
diff -c ../src.org/strcasecmp.c ./strcasecmp.c
*** ../src.org/strcasecmp.c	Sat Apr  1 14:45:08 1995
--- ./strcasecmp.c	Sat Apr  1 14:48:21 1995
***************
*** 0 ****
--- 1,89 ----
+ /*
+  * Copyright (c) 1987 Regents of the University of California.
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms are permitted
+  * provided that the above copyright notice and this paragraph are
+  * duplicated in all such forms and that any documentation,
+  * advertising materials, and other materials related to such
+  * distribution and use acknowledge that the software was developed
+  * by the University of California, Berkeley.  The name of the
+  * University may not be used to endorse or promote products derived
+  * from this software without specific prior written permission.
+  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+  */
+ 
+ #if defined(LIBC_SCCS) && !defined(lint)
+ static char sccsid[] = "@(#)strcasecmp.c	5.6 (Berkeley) 6/27/88";
+ #endif /* LIBC_SCCS and not lint */
+ 
+ #include <sys/types.h>
+ 
+ /*
+  * This array is designed for mapping upper and lower case letter
+  * together for a case independent comparison.  The mappings are
+  * based upon ascii character sequences.
+  */
+ static u_char charmap[] = {
+ 	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
+ 	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
+ 	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
+ 	'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
+ 	'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
+ 	'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
+ 	'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
+ 	'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
+ 	'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+ 	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+ 	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+ 	'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
+ 	'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
+ 	'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
+ 	'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
+ 	'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
+ 	'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
+ 	'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
+ 	'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
+ 	'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
+ 	'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
+ 	'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
+ 	'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
+ 	'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
+ 	'\300', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+ 	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+ 	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+ 	'\370', '\371', '\372', '\333', '\334', '\335', '\336', '\337',
+ 	'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
+ 	'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
+ 	'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
+ 	'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
+ };
+ 
+ strcasecmp(s1, s2)
+ 	char *s1, *s2;
+ {
+ 	register u_char	*cm = charmap,
+ 			*us1 = (u_char *)s1,
+ 			*us2 = (u_char *)s2;
+ 
+ 	while (cm[*us1] == cm[*us2++])
+ 		if (*us1++ == '\0')
+ 			return(0);
+ 	return(cm[*us1] - cm[*--us2]);
+ }
+ 
+ strncasecmp(s1, s2, n)
+ 	char *s1, *s2;
+ 	register int n;
+ {
+ 	register u_char	*cm = charmap,
+ 			*us1 = (u_char *)s1,
+ 			*us2 = (u_char *)s2;
+ 
+ 	while (--n >= 0 && cm[*us1] == cm[*us2++])
+ 		if (*us1++ == '\0')
+ 			return(0);
+ 	return(n < 0 ? 0 : cm[*us1] - cm[*--us2]);
+ }
diff -c ../src.org/usersmtp.c ./usersmtp.c
*** ../src.org/usersmtp.c	Fri Feb 10 05:21:57 1995
--- ./usersmtp.c	Sat Apr  1 14:48:21 1995
***************
*** 35,40 ****
--- 35,41 ----
  # include "sendmail.h"
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)usersmtp.c	2.2 (motonori/WIDE) 2/9/94";
  #ifdef SMTP
  static char sccsid[] = "@(#)usersmtp.c	8.18 (Berkeley) 1/24/94 (with SMTP)";
  #else
***************
*** 533,541 ****
--- 534,549 ----
  	}
  
  	timeout = e->e_msgsize / 16;
+ # if 0	/* original */
+ 	/* longer value is required, this value should be configurable */
  	if (timeout < (time_t) 60)
  		timeout = (time_t) 60;
  	timeout += e->e_nrcpts * 90;
+ # else
+ 	if (timeout < (time_t) 600)
+ 		timeout = (time_t) 600;
+ 	timeout += e->e_nrcpts * 300;
+ # endif
  	ev = setevent(timeout, datatimeout, 0);
  
  	/* now output the actual message */
diff -c ../src.org/version.c ./version.c
*** ../src.org/version.c	Wed Mar 29 11:27:07 1995
--- ./version.c	Fri Apr 14 12:21:27 1995
***************
*** 33,39 ****
   */
  
  #ifndef lint
  static char sccsid[] = "@(#)version.c	8.6.12.1 (Berkeley) 3/28/95";
  #endif /* not lint */
  
! char	Version[] = "8.6.12";
--- 33,251 ----
   */
  
  #ifndef lint
+ static char Wsccsid[] = "@(#)version.c	2.5beta4 (motonori/WIDE) 4/1/95";
  static char sccsid[] = "@(#)version.c	8.6.12.1 (Berkeley) 3/28/95";
  #endif /* not lint */
  
! char	Version[] = "8.6.12+2.5Wb4";
! #if NAMED_BIND
! char	WVersion[] = "@(#)sendmail.mx 8.6.12+2.5Wbeta4 %VERSION%";
! #else
! char	WVersion[] = "@(#)sendmail.nomx 8.6.12+2.5Wbeta4 %VERSION%";
! #endif
! char	WhoAndWhere[] = "@(#)%WHOANDWHERE%";
! 
! 
! #include "sendmail.h"
! #if COMPILEOPTIONS
! /*
! **  Compile Options
! */
! 
! char	*CompileOptions[] = {
! 	"Compile options:",
! # if ADJUST_TZ
! 	"[ADJUST_TZ]",
! # endif
! # if ALL_HASH_CMNT
! 	"[ALL_HASH_CMNT]",
! # endif
! # if ANOTHER_MXPB
! 	"[ANOTHER_MXBP]",
! # endif
! # if AUTH_LOG
! 	"[AUTH_LOG]",
! # endif
! # if BROKEN_LISTEN
! 	"[BROKEN_LISTEN]",
! # endif
! # ifdef BROKENSMTPPEERS
! 	"[BROKENSMTPPEERS]",
! # endif
! # if CANON_MX_CNTL
! 	"[CANON_MX_CNTL]",
! # endif
! # if CANON_OTHER
! 	"[CANON_OTHER]",
! # endif
! # if CO_RESOLV
! 	"[CO_RESOLV]",
! # endif
! # if ESMTPPEERSCLS
! 	"[ESMTPPEERSCLS]",
! # endif
! # if EXTEND_CLASS
! 	"[EXTEND_CLASS]",
! # endif
! # if EXTEND_MACRO
! 	"[EXTEND_MACRO]",
! # endif
! # if FILEMACRO
! 	"[FILEMACRO]",
! # endif
! # if HASFLOCK
! 	"[HASFLOCK]",
! # endif
! # ifdef HASGETDTABLESIZE
! 	"[HASGETDTABLESIZE]",
! # endif
! # if HASGETUSERSHELL
! 	"[HASGETUSERSHELL]",
! # endif
! # ifdef HASINITGROUPS
! 	"[HASINITGROUPS]",
! # endif
! # ifdef HASLSTAT
! 	"[HASLSTAT]",
! # endif
! # ifdef HASSETREUID
! 	"[HASSETREUID]",
! # endif
! # ifdef HASSETSID
! 	"[HASSETSID]",
! # endif
! # ifdef HASSETVBUF
! 	"[HASSETVBUF]",
! # endif
! # ifdef HASUNAME
! 	"[HASUNAME]",
! # endif
! # ifdef HASUNSETENV
! 	"[HASUNSETENV]",
! # endif
! # ifdef HASWAITPID
! 	"[HASWAITPID]",
! # endif
! # if IDENTPEERSCLS
! 	"[IDENTPEERSCLS]",
! # endif
! # if IDENTPROTO
! 	"[IDENTPROTO]",
! # endif
! # if LHS_CHECK_CNTL
! 	"[LHS_CHECK_CNTL]",
! # endif
! # ifdef LOG
! 	"[LOG]",
! # endif
! # if LOGWVERSION
! 	"[LOGWVERSION]",
! # endif
! # ifdef MATCHGECOS
! 	"[MATCHGECOS]",
! # endif
! # ifdef MIME
! 	"[MIME]",
! # endif
! # if MULTI_MAILER
! 	"[MULTI_MAILER]",
! # endif
! # if MX_SAFETY
! 	"[MX_SAFETY]",
! # endif
! # ifdef NAMED_BIND
! 	"[NAMED_BIND]",
! # endif
! # ifdef NDBM
! 	"[NDBM]",
! # endif
! # ifdef NEEDFSYNC
! 	"[NEEDFSYNC]",
! # endif
! # ifdef NEEDGETOPT
! 	"[NEEDGETOPT]",
! # endif
! # ifdef NEEDSTRTOL
! 	"[NEEDSTRTOL]",
! # endif
! # ifdef NEEDVPRINTF
! 	"[NEEDVPRINTF]",
! # endif
! # ifdef NETINET
! 	"[NETINET]",
! # endif
! # ifdef NETISO
! 	"[NETISO]",
! # endif
! # ifdef NETNS
! 	"[NETNS]",
! # endif
! # ifdef NETUNIX
! 	"[NETUNIX]",
! # endif
! # ifdef NETX25
! 	"[NETX25]",
! # endif
! # ifdef NEWDB
! 	"[NEWDB]",
! # endif
! # ifdef NIS
! 	"[NIS]",
! # endif
! # if NO_ALIAS_ON_REBUILD
! 	"[NO_ALIAS_ON_REBUILD]",
! # endif
! # ifdef NOLOOPBACKCHECK
! 	"[NOLOOPBACKCHECK]",
! # endif
! # if NON_BLOCK_CONNECT
! 	"[NON_BLOCK_CONNECT]",
! # endif
! # if NOTUNIX
! 	"[NOTUNIX]",
! # endif
! # ifdef OLD_NEWDB
! 	"[OLD_NEWDB]",
! # endif
! # if QUICK_RESPONSE
! 	"[QUICK_RESPONSE]",
! # endif
! # if RCPT_NEXT
! 	"[RCPT_NEXT]",
! # endif
! # ifdef RCPTSTREAM
! 	"[RCPTSTREAM]",
! # endif
! # ifdef SCANF
! 	"[SCANF]",
! # endif
! # ifdef SETPROCTITLE
! 	"[SETPROCTITLE]",
! # endif
! # if SHOW_MX_HOSTS
! 	"[SHOW_MX_HOSTS]",
! # endif
! # ifdef SMTPDEBUG
! 	"[SMTPDEBUG]",
! # endif
! # ifdef SUID_ROOT_FILES_OK
! 	"[SUID_ROOT_FILES_OK]",
! # endif
! # ifdef TRUST_POPEN
! 	"[TRUST_POPEN]",
! # endif
! # ifdef UGLYUUCP
! 	"[UGLYUUCP]",
! # endif
! # ifdef USERDB
! 	"[USERDB]",
! # endif
! # ifdef XDEBUG
! 	"[XDEBUG]",
! # endif
! # ifdef XLA
! 	"[XLA]",
! # endif
! 	0
! };
! #endif /* COMPILEOPTIONS */
diff -c ../src.org/Makefile.WIDE.BSDI ./Makefile.WIDE.BSDI
*** ../src.org/Makefile.WIDE.BSDI	Sat Apr  1 14:45:07 1995
--- ./Makefile.WIDE.BSDI	Sat Apr  1 14:48:05 1995
***************
*** 0 ****
--- 1,204 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.BSDI	2.12 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for BSDI's BSD/386
+ #  This has been tested on release 1.1
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.BSDI
+ MAKE=	make
+ 
+ # object directory for this architecture
+ OS=	bsdi.1.1
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client NIS support
+ # The really old (V7) DBM library is no longer supported.
+ # See READ_ME for a description of how these flags interact.
+ #
+ DBMDEF=	-DNEWDB
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ ENVDEF=
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/bsdi.1.1
+ 
+ # include directories
+ #BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ #NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS=
+ 
+ # library directories
+ #BIND_LIBDIRS=	-L${BINDDIR}/res
+ #NEWDB_LIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ LIBS=	-lutil -lkvm # -ldb
+ RESLIB=	-lresolv
+ 
+ # location of sendmail binary (usually /usr/sbin or /usr/lib)
+ BINDIR=	${DESTDIR}/usr/sbin
+ 
+ # location of sendmail.st file (usually /var/log or /usr/lib)
+ STDIR=	${DESTDIR}/var/log
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/usr/share/misc
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o
+ 
+ LINKS=	${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} \
+ 	    ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ NROFF=	nroff
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.EWS ./Makefile.WIDE.EWS
*** ../src.org/Makefile.WIDE.EWS	Sat Apr  1 14:45:07 1995
--- ./Makefile.WIDE.EWS	Sat Apr  1 14:48:05 1995
***************
*** 0 ****
--- 1,214 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.EWS	2.5 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for NEC/EWS-UX/V 4.1
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.EWS
+ MAKE=	make
+ 
+ # object directory for this architecture
+ OS=	ews.41
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ CC=	/usr/bin/cc	# do not use /usr/ucb/cc
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ ENVDEF=	-KOlimit=900
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/${OS}
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS=
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	ndbm.o -lsocket -lnsl -lelf	# with NDBM
+ #LIBS=	-lsocket -lnsl -lelf -ldb	# with NEWDB
+ RESLIB=	-lresolv # -l44bsd
+ 
+ # location of sendmail binary (usually /usr/sbin or /usr/lib)
+ BINDIR=	${DESTDIR}/usr/ucblib
+ 
+ # location of sendmail.st file (usually /var/log or /usr/lib)
+ STDIR=	${DESTDIR}/var/ucblib
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/var/ucblib
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c strcasecmp.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS=	daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=	daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o strcasecmp.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \
+ 			cp /usr/ucbinclude/sysexits.h .; \
+ 			if expr "${DBMDEF}" : ".*-DNDBM.*" > /dev/null; then \
+ 				cp /usr/ucbinclude/ndbm.h .; \
+ 				ar x /usr/ucblib/libucb.a ndbm.o; \
+ 			fi; \
+ 		fi; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	ln -s `expr $@ : '\(.*\)-mx.o'`.c `expr $@ : '\(.*-mx\).o'`.c
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*-mx\).o'`.c
+ 	rm `expr $@ : '\(.*-mx\).o'`.c
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.HP-UX ./Makefile.WIDE.HP-UX
*** ../src.org/Makefile.WIDE.HP-UX	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.HP-UX	Sat Apr  1 14:48:05 1995
***************
*** 0 ****
--- 1,212 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.HP-UX	2.4 (hayashi@kuic) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for HP-UX A.08.07 and A.09.01
+ #  This has been tested on HP-UX A.08.07 and A.09.01 (without -DNIS)
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.HP-UX
+ MAKE=	make
+ 
+ # object directory for this architecture
+ # ex) "HP-UX-A.08.07"
+ OS=	`uname -s`-`uname -r`
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ # +O2 is OK on 7xx at 8.07
+ #O=	-O
+ #O=	+O2	# for HP-UX A.08.07
+ O=	+O1	# for HP-UX A.09.01
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 -DNEWDB # -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ ENVDEF= -D__hpux
+ 
+ # directory for BIND
+ #BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/hpux.`uname -r`
+ 
+ # include directories
+ #BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS= 
+ 
+ # library directories
+ #BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	-ldb -ldbm
+ #RESLIB=	-lresolv # -l44bsd
+ 
+ # 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}/etc
+ STDIR=	${DESTDIR}/usr/lib
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/usr/lib
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o
+ 
+ LINKS=	${DESTDIR}/usr/bin/newaliases ${DESTDIR}/usr/bin/mailq
+ BINOWN=	root
+ BINGRP=	mail
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	if [ -f ${BINDIR}/sendmail.mx ]; then \
+ 		(mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD); \
+ 	fi
+ 	cpset sendmail.mx ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP}
+ 	if [ -f ${BINDIR}/sendmail.nomx ]; then \
+ 		(mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD); \
+ 	fi
+ 	cpset sendmail.nomx ${BINDIR} ${BINMODE} ${BINOWN} ${BINGRP}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail
+ 	for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done
+ 	cpset /dev/null ${STDIR}/sendmail.st 644 ${BINOWN} ${BINGRP}
+ 	if [ -f ${HFDIR}/sendmail.hf ]; then \
+ 		(mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD); \
+ 	fi
+ 	cpset sendmail.hf ${HFDIR} 444 ${BINOWN} ${BINGRP}
+ 
+ # doesn't actually install them -- you may want to install pre-nroff versions
+ install-docs: aliases.0 mailq.0 newaliases.0 sendmail.0
+ 
+ clean:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.IRIX ./Makefile.WIDE.IRIX
*** ../src.org/Makefile.WIDE.IRIX	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.IRIX	Sun Apr 16 20:20:15 1995
***************
*** 0 ****
--- 1,212 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.IRIXV     (kazu/WIDE) 2/2895
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for IRIX 5.x
+ #  This has been tested on IRIX 5.2.
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.IRIX
+ MAKE=	make
+ 
+ # object directory for this architecture
+ OS=	`uname`-`uname -r`
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ CC=gcc
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ #ENVDEF=-DIRIX
+ ENVDEF=-DIRIXV
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ # If you are using JLE, you must modify correspondence of directory name
+ #NEWDBDIR=../../../db/PORT/sunos.`uname -r`
+ 
+ # include directories
+ #BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ #NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS= 
+ 
+ # library directories
+ #BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ #NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	-lmld
+ RESLIB=	
+ 
+ # 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}/etc
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/usr/lib
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o # strcasecmp.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		if [ `uname -r` = "4.0" ]; then \
+ 			echo Creating lacked headers....; \
+ 			echo '#define SUNOS403' > stddef.h; \
+ 			touch stdlib.h; \
+ 		fi; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ res_send-mx.o:	res_send.c
+ Version-mx.o:	Version.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ NROFF=  nroff
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.LUNA ./Makefile.WIDE.LUNA
*** ../src.org/Makefile.WIDE.LUNA	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.LUNA	Sat Apr  1 14:48:06 1995
***************
*** 0 ****
--- 1,220 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.LUNA	2.16 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for OMRON/LUNA UniOS-B 3.0, LUNA2 Mach and LUNA88K Mach
+ #
+ #  You may need to prepare following softwares before making sendmail.
+ #     for LUNA/UniOS-B  -- new Berkeley DB, BIND 4.8.3 or later
+ #     for LUNA2/Mach    -- new Berkeley DB
+ #     for LUNA88K/Mach  -- new Berkeley DB, BIND 4.8.3 or later
+ 
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.LUNA
+ MAKE=	make
+ #CC=	gcc
+ 
+ # object directory for this architecture
+ OS=	unios-b3.0
+ #OS=	luna2m
+ #OS=	luna88k
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions.
+ ENVDEF=
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/${OS}
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS=
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	# -ldb
+ RESLIB=	-lresolv # -l44bsd
+ 
+ # 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 .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		if [ "${OS}" != luna88k ]; then \
+ 			touch limits.h stddef.h stdlib.h unistd.h; \
+ 		fi; \
+ 		echo Creating lacked headers....; \
+ 		echo "#include <sys/dir.h>" > dirent.h; \
+ 		echo "#define dirent	direct" >> dirent.h; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	ln -s `expr $@ : '\(.*\)-mx.o'`.c `expr $@ : '\(.*-mx\).o'`.c
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*-mx\).o'`.c
+ 	rm `expr $@ : '\(.*-mx\).o'`.c
+ 
+ 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
+ 
+ restart:
+ 	chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.NEWS ./Makefile.WIDE.NEWS
*** ../src.org/Makefile.WIDE.NEWS	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.NEWS	Sat Apr  1 14:48:07 1995
***************
*** 0 ****
--- 1,220 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.NEWS	2.19 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for SONY/NEWS NEWS-OS 4.1/4.2, NEWS-OS 6.0.1
+ #  This has been tested on NEWS-OS 4.2R.
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.NEWS
+ MAKE=	make
+ 
+ # object directory for this architecture
+ #OS=     newsos.41
+ #OS=     newsos.42r
+ OS=     newsos.60	# do not use /usr/ucb/cc
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ # for 4.1
+ #ENVDEF=	-DSLEEP_T=void
+ # for 4.2 or later
+ ENVDEF=
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/${OS}
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS=
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ #LIBS=	-lmld # -ldb			# for NEWS-OS 4
+ LIBS=	ndbm.o -lmld -lsocket -lnsl	# for NEWS-OS 6 with NDBM
+ #LIBS=	-lmld -lsocket -lnsl -ldb	# for NEWS-OS 6 with NEWDB
+ RESLIB=	-lresolv # -l44bsd
+ 
+ # 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 .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ SHELL=	/bin/sh
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS=	daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=	daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \
+ 			cp /usr/ucbinclude/sysexits.h .; \
+ 			if expr "${DBMDEF}" : ".*-DNDBM.*" > /dev/null; then \
+ 				cp /usr/ucbinclude/ndbm.h .; \
+ 				ar x /usr/ucblib/libucb.a ndbm.o; \
+ 			fi; \
+ 		fi; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.SEIUX ./Makefile.WIDE.SEIUX
*** ../src.org/Makefile.WIDE.SEIUX	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.SEIUX	Sat Apr  1 14:48:07 1995
***************
*** 0 ****
--- 1,201 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.SEIUX	2.12 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for SEIUX 3.2
+ #  This has been tested on SUMISTATION/SEIUX.3.2.
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.SEIUX
+ MAKE=	make
+ 
+ # object directory for this architecture
+ OS=	`uname -v`-`uname -r`
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ ENVDEF= -D`uname -v` -Olimit 2000 -Wf,-XNd8400,-XNp12000
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/seiux.`uname -r`
+ 
+ # include directories
+ #BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS=
+ 
+ # library directories
+ #BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	-ldbm -lmld # -ldb
+ #RESLIB=	-lresolv # -l44bsd
+ 
+ # 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 .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD}
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS=	daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=	daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ NROFF=  nroff
+ 
+ aliases.0: aliases.5
+ 	${NROFF} -mandoc aliases.5 > aliases.0
+ 
+ mailq.0: mailq.1
+ 	${NROFF} -mandoc mailq.1 > mailq.0
+ 
+ sendmail.0: sendmail.8
+ 	${NROFF} -mandoc sendmail.8 > sendmail.0
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.Solaris ./Makefile.WIDE.Solaris
*** ../src.org/Makefile.WIDE.Solaris	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.Solaris	Sat Apr  1 14:48:08 1995
***************
*** 0 ****
--- 1,217 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.Solaris	2.6 (motonori/WIDE) 3/11/95
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for SunOS 5.3
+ #  This has been tested on SunOS 5.3
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.Solaris
+ MAKE=	make
+ 
+ # object directory for this architecture
+ OS=	`/usr/kvm/arch`-`uname -r`
+ 
+ # name of C Compiler
+ #CC=	gcc
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ # warning: do not use -O with gcc
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB # -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ # need to add -DSUNOS403 if you are on a SunOS 4.0.3 system
+ # (SUNOS403 will be defined in pseudo stddef.h)
+ # need to add -DSOLARIS if you are on a SunOS 5.x system
+ #ENVDEF= -DSOLARIS
+ ENVDEF= -DSOLARIS_2_3
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ # If you are using JLE, you must modify correspondence of directory name
+ NEWDBDIR=../../../db/PORT/sunos.`uname -r`
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS= # -Bstatic
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res # -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=   -lsocket -lnsl -lelf # -ldb
+ RESLIB=	-lresolv # -l44bsd
+ 
+ # 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}/etc/mail
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/etc/mail
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o # strcasecmp.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	sys
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+                 if [ ! -f /usr/include/sysexits.h -a -f /usr/ucbinclude/sysexits.h ]; then \
+ 			cp /usr/ucbinclude/sysexits.h .; \
+ 		fi; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	/usr/ccs/bin/size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	/usr/ccs/bin/size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	/usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	/usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${BINDIR}/sendmail
+ 	for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done
+ 	/usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
+ 	    ${STDIR}/sendmail.st
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	/usr/ucb/install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.Sun ./Makefile.WIDE.Sun
*** ../src.org/Makefile.WIDE.Sun	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.Sun	Sat Apr  1 14:48:09 1995
***************
*** 0 ****
--- 1,213 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.Sun	2.21 (motonori/WIDE) 3/11/95
+ #	@(#)Makefile.dist	8.1 (Berkeley) 6/7/93
+ #
+ #  Makefile for SunOS 4.1.X and 4.0.3
+ #  This has been tested on SunOS 4.1.1 and 4.0.3.
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.Sun
+ MAKE=	make
+ 
+ # object directory for this architecture
+ # NOTE: uname is located in /usr/5bin in case of SunOS 4.0.3
+ OS=	`arch`-`uname -r`
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ O=	-O
+ 
+ # define the database mechanisms available for map & alias lookups:
+ #	-DNDBM -- use new DBM
+ #	-DNEWDB -- use new Berkeley DB
+ #	-DNIS -- include client 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 # -DNEWDB -DNIS
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # environment definitions (e.g., -D_AIX3)
+ # need to add -DSUNOS403 if you are on a SunOS 4.0.3 system
+ # (SUNOS403 will be defined in pseudo stddef.h)
+ ENVDEF=
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ # If you are using JLE, you must modify correspondence of directory name
+ NEWDBDIR=../../../db/PORT/sunos.`uname -r`
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS=	${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ LDOPTS= -Bstatic
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ # -l44bsd is needed with bind4.9 in RESLIB
+ LIBS=	-ldbm # -ldb
+ RESLIB=	-lresolv -l44bsd
+ 
+ # 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}/etc
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/usr/lib
+ 
+ # additional .c files needed
+ SRCADD=
+ # additional .o files needed
+ OBJADD=
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS= daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=       daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o # strcasecmp.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		${MAKE} -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; ${MAKE} ${ALL}); \
+ 	else \
+ 		${MAKE} ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	@test -x newvers.sh || chmod +x newvers.sh
+ 	@if [ ! -d ${OS} ]; then \
+ 		echo Creating directory ${OS}....; \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../mailq.1 ../newaliases.1 ../sendmail.8 .; \
+ 		if [ `uname -r` = "4.0" ]; then \
+ 			echo Creating lacked headers....; \
+ 			echo '#define SUNOS403' > stddef.h; \
+ 			touch stdlib.h; \
+ 		fi; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ 
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ NROFF=  nroff
+ 
+ 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
+ 
+ restart:
+ 	test -x sendmail.restart || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} ${INSTALL}); \
+ 	else \
+ 		${MAKE} ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	-mv -f ${BINDIR}/sendmail.mx ${BINDIR}/sendmail.mx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}
+ 	-mv -f ${BINDIR}/sendmail.nomx ${BINDIR}/sendmail.nomx.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}
+ 	rm -f ${BINDIR}/sendmail; ln -s ${BINDIR}/sendmail.mx ${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
+ 	-mv -f ${HFDIR}/sendmail.hf ${HFDIR}/sendmail.hf.OLD
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 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:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; ${MAKE} clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 		      sendmail.mx sendmail.nomx \
+ 		      aliases.0 mailq.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
diff -c ../src.org/Makefile.WIDE.ULTRIX ./Makefile.WIDE.ULTRIX
*** ../src.org/Makefile.WIDE.ULTRIX	Sat Apr  1 14:45:08 1995
--- ./Makefile.WIDE.ULTRIX	Sat Apr  1 14:48:09 1995
***************
*** 0 ****
--- 1,211 ----
+ #
+ #  This Makefile is designed to work on the old "make" program.  It does
+ #  not use the obj subdirectory.  It also does not install documentation
+ #  automatically -- think of it as a quick start for sites that have the
+ #  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.WIDE.ULTRIX	1.0 (s-yama@ics.es.osaka-u.ac.jp) 1995/02/25
+ #	@(#)Makefile.WIDE.Sun   2.20 (motonori/WIDE) 12/21/94
+ #	@(#)Makefile.ULTRIX 8.3 (Berkeley) 4/11/94
+ #	This has been tested on Ultrix 4.2A and 4.3A.
+ #
+ 
+ # name of this Makefile
+ MAKEFILE=Makefile.WIDE.ULTRIX
+ 
+ #CC=gcc
+ 
+ # object directory for this architecture
+ OS= `uname -s`-`uname -r`
+ 
+ # use O=-O (usual) or O=-g (debugging)
+ #O=	-g -O
+ O=	-O
+ 
+ # define the database mechanisms available for map & 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 -DNEWDB -DNIS
+ 
+ # environment definitions (e.g., -D_AIX3)
+ #ENVDEF=
+ ENVDEF=	-Olimit 800
+ 
+ # see also conf.h for additional compilation flags
+ 
+ # directory for BIND
+ BINDDIR=../../../bind
+ # directory for new Berkeley DB
+ NEWDBDIR=../../../db/PORT/ultrix.`uname -r`
+ 
+ # include directories
+ BINDINCDIRS=	-I${BINDDIR}/include -I${BINDDIR}/compat/include
+ NEWDBINCDIRS=	-I${NEWDBDIR}/include -I${NEWDBDIR}
+ INCDIRS= ${BINDINCDIRS} ${NEWDBINCDIRS}
+ 
+ # loader options
+ #LDOPTS=
+ LDOPTS= -x
+ 
+ # library directories
+ BINDLIBDIRS=	-L${BINDDIR}/res -L${BINDDIR}/compat/lib
+ NEWDBLIBDIRS=	-L${NEWDBDIR}
+ LIBDIRS=	${BINDLIBDIRS} ${NEWDBLIBDIRS}
+ 
+ # libraries required on your system
+ LIBS=	-ldb -lc
+ RESLIB=	#-lresolv -l44bsd
+ 
+ # 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}/etc
+ 
+ # location of sendmail.hf file (usually /usr/share/misc or /usr/lib)
+ HFDIR=	${DESTDIR}/usr/lib
+ 
+ # additional .c files needed
+ SRCADD= usleep.c	# Using usleep.c from NetBSD package.
+ # additional .o files needed
+ OBJADD= usleep.o
+ 
+ ###################  end of user configuration flags  ######################
+ 
+ CFLAGS=	-I. $O ${INCDIRS} ${DBMDEF} ${ENVDEF}
+ 
+ SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
+ 	deliver.c domain.c envelope.c err.c headers.c macro.c main.c \
+ 	map.c mci.c parseaddr.c queue.c readcf.c recipient.c \
+ 	savemail.c srvrsmtp.c stab.c stats.c sysexits.c \
+ 	trace.c udb.c usersmtp.c util.c ${SRCADD} # strcasecmp.c
+ OBJS=	alias.o arpadate.o clock.o collect.o conf.o convtime.o envelope.o \
+ 	headers.o macro.o map.o mci.o parseaddr.o queue.o recipient.o \
+ 	srvrsmtp.o stab.o stats.o sysexits.o trace.o usersmtp.o util.o ${OBJADD}
+ MXOBJS=	daemon-mx.o deliver-mx.o domain-mx.o err-mx.o main-mx.o readcf-mx.o \
+ 	savemail-mx.o udb-mx.o res_send-mx.o
+ NOMXOBJS=	daemon.o deliver.o domain.o err.o main.o readcf.o \
+ 	savemail.o udb.o # strcasecmp.o
+ 
+ LINKS=	${DESTDIR}/usr/ucb/newaliases ${DESTDIR}/usr/ucb/mailq
+ BINOWN=	root
+ BINGRP=	kmem
+ BINMODE=6555
+ 
+ ALL=	sendmail aliases.0 newaliases.0 sendmail.0
+ 
+ SendmailVersion=`awk -F\" '/[ 	]Version/, /;/ {print $$2}' < version.c`
+ 
+ all:
+ 	if [ -f ${MAKEFILE} ]; then \
+ 		make -f ${MAKEFILE} mkdir; \
+ 		(cd ${OS}; make ${ALL}); \
+ 	else \
+ 		make ${ALL}; \
+ 	fi
+ 
+ mkdir:
+ 	if [ -f newvers.sh ]; \
+ 	then \
+ 		chmod +x newvers.sh ;\
+ 	fi
+ 	@echo Creating ${OS}
+ 	if [ ! -d ${OS} ]; then \
+ 		(mkdir ${OS}; cd ${OS}; \
+ 		ln -s ../*.[ch] ../newvers.sh .; \
+ 		ln -s ../sendmail.restart ../sendmail.hf .; \
+ 		ln -s ../aliases.5 ../newaliases.1 ../sendmail.8 .; \
+ 		ln -s ../${MAKEFILE} Makefile); \
+ 	else true; fi
+ 
+ sendmail: sendmail.mx sendmail.nomx
+ 
+ sendmail.nomx: ${OBJS} ${NOMXOBJS} Version.o
+ 	${CC} -o $@ ${OBJS} ${NOMXOBJS} Version.o ${LDOPTS} ${LIBDIRS} ${LIBS}
+ 	size $@; ls -l $@; what < Version.o
+ sendmail.mx: ${OBJS} ${MXOBJS} Version-mx.o
+ 	${CC} -o $@ ${OBJS} ${MXOBJS} Version-mx.o ${LDOPTS} ${LIBDIRS} ${RESLIB} ${LIBS}
+ 	size $@; ls -l $@; what < Version-mx.o
+ 
+ Version.c: ${SRCS} version.c
+ 	@echo generating Version.c from version.c
+ 	sh newvers.sh
+ 
+ version:
+ 	@echo "version: "${SendmailVersion}
+ 
+ usleep.c:
+ 	@echo "ULTRIX has not a \"usleep()\" function."
+ 	@echo "Please use \"usleep.c\" in a 4.4BSD-Lite distribution or a NetBSD distribution."
+ 
+ # Here are MX depend sources.
+ daemon-mx.o:	daemon.c
+ deliver-mx.o:	deliver.c
+ domain-mx.o:	domain.c
+ err-mx.o:	err.c
+ main-mx.o:	main.c
+ readcf-mx.o:	readcf.c
+ savemail-mx.o:	savemail.c
+ udb-mx.o:	udb.c
+ Version-mx.o:	Version.c
+ res_send-mx.o:	res_send.c
+ 
+ ${MXOBJS} Version-mx.o:
+ 	${CC} ${CFLAGS} -DNAMED_BIND=1 -c `expr $@ : '\(.*\)-mx.o'`.c -o $@
+ 
+ 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
+ 
+ restart:
+ 	-[ -x sendmail.restart ] || chmod +x sendmail.restart
+ 	sh sendmail.restart
+ 
+ INSTALL=install-sendmail # install-docs
+ 
+ install:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; make ${INSTALL}); \
+ 	else \
+ 		make ${INSTALL}; \
+ 	fi
+ 
+ install-sendmail: sendmail
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.mx ${BINDIR}/sendmail.mx.${SendmailVersion}
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ 	    sendmail.nomx ${BINDIR}/sendmail.nomx.${SendmailVersion}
+ 	rm -f ${BINDIR}/sendmail; \
+ 		ln -s ${BINDIR}/sendmail.mx.${SendmailVersion} ${BINDIR}/sendmail
+ 	for i in ${LINKS}; do (rm -f $$i; ln -s ${BINDIR}/sendmail $$i); done
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 666 /dev/null \
+ 	    ${STDIR}/sendmail.st
+ 	install -c -o ${BINOWN} -g ${BINGRP} -m 444 sendmail.hf ${HFDIR}
+ 
+ # doesn't actually install them -- you may want to install pre-nroff versions
+ install-docs: aliases.0 newaliases.0 sendmail.0
+ 
+ clean:
+ 	if [ -d ${OS} ]; then \
+ 		(cd ${OS}; make clean); \
+ 	else \
+ 		rm -f ${OBJS} ${MXOBJS} ${NOMXOBJS} Version.o Version-mx.o \
+ 			sendmail.mx sendmail.nomx \
+ 			aliases.0 newaliases.0 sendmail.0 core; \
+ 	fi
+ 
+ # dependencies
+ #   gross overkill, and yet still not quite enough....
+ ${OBJS}: sendmail.h conf.h
+ ${MXOBJS}: sendmail.h conf.h
+ ${NOMXOBJS}: sendmail.h conf.h
