home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / ida / part02 < prev    next >
Encoding:
Internet Message Format  |  1987-06-22  |  56.1 KB

  1. Path: seismo!uwvax!uwmacc!uwmcsd1!leah!itsgw!steinmetz!uunet!rs
  2. From: rs@uunet.UU.NET (Rich Salz)
  3. Newsgroups: comp.sources.unix
  4. Subject: v10i013:  The IDA Sendmail Kit, Part02/07
  5. Message-ID: <425@uunet.UU.NET>
  6. Date: 23 Jun 87 04:41:44 GMT
  7. Organization: UUNET Communications Services, Arlington, VA
  8. Lines: 2060
  9. Approved: rs@uunet.uu.net
  10.  
  11. Mod.sources: Volume 10, Number 13
  12. Submitted by: Lennart Lovstrand <mcvax!ida.liu.se!lel>
  13. Archive-name: ida/Part02
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 2 (of 7)."
  22. # Contents:  ida/INSTALL ida/README ida/doc/dbm.1 ida/lib/domaintable
  23. #   ida/lib/pathtable ida/patches/BSD29.diff ida/patches/MDBM.diff
  24. #   ida/patches/daemon.c.diff ida/patches/deliver.c.diff
  25. #   ida/patches/main.c.diff ida/patches/recipient.c.diff
  26. #   ida/patches/srvrsmtp.c.diff
  27. # Wrapped by lenlo@prefix on Wed Jun 10 15:39:51 1987
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f ida/INSTALL -a "${1}" != "-c" ; then 
  30.   echo shar: Will not over-write existing file \"ida/INSTALL\"
  31. else
  32. echo shar: Extracting \"ida/INSTALL\" \(3311 characters\)
  33. sed "s/^X//" >ida/INSTALL <<'END_OF_ida/INSTALL'
  34. X#
  35. X#  INSTALL -- The IDA Sendmail Enhancement Kit.
  36. X#  Copyright (c) 1987 Lennart Lovstrand
  37. X#  CIS Dept, Univ of Linkoping, Sweden
  38. X#
  39. X#  Use it, abuse it, but don't sell it.
  40. X#
  41. X
  42. XINSTALLATION INSTRUCTIONS
  43. X
  44. XThese instructions will tell you step-by-step how to install and bring
  45. Xthe Kit's sendmail system up.  The source code modifications are given
  46. Xas context diff(1)'s, based on the BSD 4.3 release of sendmail (version
  47. X5.11), ready to be installed using Larry Wall's eminent patch program.
  48. XYou will also need Maryland's mdbm library if you intend to use this
  49. Xinstead of ndbm.  Finally, in order to automatically produce routing
  50. Xtables, you will need Peter Honeyman's pathalias program.  All of these
  51. Xare available from your nearest USENET comp.sources.unix archive.
  52. X
  53. X [1] Unpack the Kit in the sendmail directory (preferably).  This should
  54. X     give you a new ida subdirectory with all the Kit's files.  (Hmm,
  55. X     perhaps you've already done this since you are reading this file.)
  56. X
  57. X [2] Goto sendmail/ida and check that you agree with the Makefile's
  58. X     definitions.  If you change anything, do a "make configure" to
  59. X     propagate those changes to the subdirectories' Makefiles.
  60. X
  61. X [3] Goto sendmail/ida/doc.  Do "make doc" to print out the accompanying
  62. X     paper and "make man" to print the manual pages.  Do "make install"
  63. X     to install the latter in your manuals directory.
  64. X
  65. X [4] Goto sendmail/ida/patches and do "make backup."  This will create a
  66. X     backup copy of sendmail/src/*.[hc] and sendmail/doc/op.me in
  67. X     Backup.tar.  You can restore them if necessary by performing "make
  68. X     restore," still in the patches directory.
  69. X
  70. X [5] Do one of "make bsd43," "make bsd42," or "make bsd29" to patch the
  71. X     sendmail source to the required compatibility level.  You will need
  72. X     patch(1), for this or else edit the files by hand.  Look out for
  73. X     rejected patches.
  74. X
  75. X [6] Goto sendmail/src and recompile sendmail.  See that it still works.
  76. X     Your old configuration file should still work unless you depend on
  77. X     some obscure side effects.  Note that a BSD 4.2 configuration file
  78. X     might not work with sendmail 5.11.
  79. X
  80. X [7] Goto sendmail/ida/aux and do "make" to compile the auxiliary
  81. X     programs.  Try them out, guided with the newly printed manual
  82. X     pages.
  83. X
  84. X [8] Do "make install" to install the programs in BINDIR (/usr/local/bin
  85. X     by default; but another choice would be /usr/lib/mail if you only
  86. X     intend to use them with this kit).  It's also about time to
  87. X     (manually) do a (symbolic) link from /usr/ucb/bsmtp to
  88. X     /usr/lib/sendmail if you intend to receive batched SMTP mail.
  89. X
  90. X [9] Goto sendmail/ida/cf and inspect the supplied m4(1) configuration
  91. X     definitions.  Send Sendmail.mc to your line printer and study it.
  92. X     Do "make" to see how the sample configurations look expanded.
  93. X
  94. X[10] Goto sendmail/ida/lib and inspect the supplied sample data files.
  95. X     Try applying the xalparse program on the xaliases file if you feel
  96. X     like it.
  97. X
  98. X[11] Determine your site's routing capabilities and create your corre-
  99. X     sponding data files in LIBDIR.  Go back to sendmail/ida/cf and
  100. X     create your own m4(1) configuration file using the samples as
  101. X     templates.  Produce an actual, personal sendmail.cf file.
  102. X
  103. X[12] Try out your new sendmail system.
  104. X     Good Luck!
  105. END_OF_ida/INSTALL
  106. if test 3311 -ne `wc -c <ida/INSTALL`; then
  107.     echo shar: \"ida/INSTALL\" unpacked with wrong size!
  108. fi
  109. # end of overwriting check
  110. fi
  111. if test -f ida/README -a "${1}" != "-c" ; then 
  112.   echo shar: Will not over-write existing file \"ida/README\"
  113. else
  114. echo shar: Extracting \"ida/README\" \(2773 characters\)
  115. sed "s/^X//" >ida/README <<'END_OF_ida/README'
  116. X#
  117. X#  README -- The IDA Sendmail Enhancement Kit.
  118. X#  Copyright (c) 1987 Lennart Lovstrand
  119. X#  CIS Dept, Univ of Linkoping, Sweden
  120. X#
  121. X#  Use it, abuse it, but don't sell it.
  122. X#
  123. X#  Revision 1.0 of Wed May 27 04:29:05 MET DST 1987
  124. X
  125. X
  126. X    Hello and Welcome to The IDA Sendmail Enhancement Kit.
  127. X
  128. X
  129. XThis Kit includes a set of source code modifications to the BSD 4.3
  130. Xsendmail program (version 5.11), which will enable it to have direct
  131. Xaccess to dbm(3) files, separate envelope/header rewritings, multi-token
  132. Xclass matches, and many other things.  Also included is the IDA Sendmail
  133. XMaster Configuration file and a sample setup used at the CIS Dept, U of
  134. XLinkoping.  The configuration file together with the supplied data files
  135. Xand utility programs, implement such nice features as pathalias based
  136. Xsystems routing within sendmail, fully !-/@-translating rulesets, and
  137. Xgeneric local user addresses.
  138. X
  139. XThe new sendmail functions are breifly listed below and further
  140. Xdescribed in the accompanying paper, which also discusses electronic
  141. Xmail addressing in general and hybrid addresses in particular.  (The
  142. Xnumbers to the right indicate in what section of the paper they are
  143. Xdescribed.)
  144. X
  145. X   Nameserver Default Argument............................... 7.1
  146. X   Direct Access to Dbm(3) Files............................. 7.2
  147. X   Batched SMTP Support...................................... 7.3
  148. X   Separate Envelope/Header Rewriting Rulesets............... 7.4
  149. X   Separate Local UUCP Host Name............................. 7.5
  150. X   Return Path for UUCP Mailers.............................. 7.6
  151. X   UUCP Header Address Relativization........................ 7.7
  152. X   Support for Multi-Token Matches........................... 7.8
  153. X   Support for Embedded Subruleset Calls..................... 7.9
  154. X   Elaborate Matching Algorithm for Unknown Local Recipients 7.10
  155. X   Support for Maryland's Mdbm Package...................... 7.11
  156. X   Improved Test Mode Output................................ 7.12
  157. X   Better To: and Cc: Headers of Returned Messages.......... 7.13
  158. X   Queue Bug Fixed.......................................... 7.14
  159. X   Shared Input SMTP Bug Tentatively Fixed.................. 7.15
  160. X   Optional BSD 2.9 and 4.2 Compatibility Code.............. 7.16
  161. X   Miscellaneous Changes.................................... 7.17
  162. X
  163. XRead more in INSTALL about how to get it all together.  I will probably
  164. Xnot be able to help you much since I am moving to a new job.  I'll do
  165. Xwhat I can, anyway.  My old mail address should hopefully still work, so
  166. Xyou can try writing to:
  167. X
  168. X    Lennart Lovstrand
  169. X    Department of Computer and Information Science
  170. X    University of Linkoping
  171. X    S-581 83 Linkoping, SWEDEN
  172. X
  173. X    <lel@ida.liu.se> or {mcvax,munnari,seismo}!enea!liuida!lel
  174. X
  175. Xif you have comments or bugs to report.
  176. X
  177. XLive well,
  178. X--Lennart
  179. END_OF_ida/README
  180. if test 2773 -ne `wc -c <ida/README`; then
  181.     echo shar: \"ida/README\" unpacked with wrong size!
  182. fi
  183. # end of overwriting check
  184. fi
  185. if test -f ida/doc/dbm.1 -a "${1}" != "-c" ; then 
  186.   echo shar: Will not over-write existing file \"ida/doc/dbm.1\"
  187. else
  188. echo shar: Extracting \"ida/doc/dbm.1\" \(4959 characters\)
  189. sed "s/^X//" >ida/doc/dbm.1 <<'END_OF_ida/doc/dbm.1'
  190. X.TH DBM 1 "24 April 1987"                \" -*- nroff -*-
  191. X.SH NAME
  192. Xdbm \- general
  193. X.IR dbm (3)
  194. Xdatabase management tool
  195. X.SH SYNOPSIS
  196. X.BR dbm
  197. X.RB [\| \-AILNRSU \|]
  198. X.RB [\| \-d
  199. X.IR dbm_file \|]
  200. X.RB [\| \-m
  201. X.IR mode \|]
  202. X.RB [\| \-o 
  203. X.IR output_file \|]
  204. X.I command
  205. X.RI [\| args\|.\|.\|. \|]
  206. X.SH DESCRIPTION
  207. X.I Dbm
  208. Xis used to manage
  209. X.IR dbm (3)
  210. Xtype databases.  Its function is controlled by the dbm
  211. X.I command
  212. Xgiven on the command line, possibly with additional arguments.  Its
  213. Xtypical usage is to load a
  214. X.I dbm
  215. Xdatabase from a input file or to dump it to a readable format.  It may
  216. Xalso be used to probe for selected keys or add specific key/value pairs. 
  217. XIn addition,
  218. X.I dbm
  219. Xprovides parsing routines for an extended textual format, suitable for
  220. Xbuilding tables or various kinds.  The format is further described in
  221. Xthe section about the
  222. X.B parse
  223. Xcommand below. 
  224. X.SH OPTIONS
  225. X.TP
  226. X.B \-A
  227. XAppend mode, don't automatically clear the database on the
  228. X.BR load
  229. Xand
  230. X.B make
  231. Xoperations. 
  232. X.TP
  233. X.B \-I
  234. XInsert mode; will supply the \s-1DBM_INSERT\s+1 flag to all
  235. X.I dbm_store
  236. Xoperations.  This means that if two entries with equal keys are given,
  237. Xonly the first will actually be entered to the database (default) and no
  238. Xwarning will be given. 
  239. X.TP
  240. X.B \-L
  241. XLowercase mode.  Change all keys to lowercase before reading from or writing
  242. Xto the database.
  243. X.TP
  244. X.B \-R
  245. XReplace mode; will supply the \s-1DBM_REPLACE\s+1 flag to all
  246. X.I dbm_store
  247. Xoperations.  This means that if two entries with equal keys are given,
  248. Xonly the last will actually be entered to the database and no warning
  249. Xmessages are given. 
  250. X.TP
  251. X.B \-S
  252. XAdd a
  253. X.B @@@
  254. Xsenteniel after the last entry has been written to the database. 
  255. X.TP
  256. X.B \-U
  257. XUppercase mode.  Turn all keys to uppercase before reading from or
  258. Xwriting to the database.
  259. X.TP
  260. X.BI \-d " dbm_file"
  261. XPerform all operations on the named database file.  If no
  262. X.B \-d
  263. Xoption is given, the last argument after the
  264. X.I command
  265. Xwill be used as the
  266. X.IR dbm_file. 
  267. X.TP
  268. X.BI \-m " mode"
  269. XUse the given
  270. X.I mode
  271. Xwhen creating new databases. 
  272. X.TP
  273. X.BI \-o " output_file"
  274. XSend all output from the
  275. X.B dump
  276. Xand
  277. X.B parse
  278. Xoperations to the named output file instead of stdout. 
  279. X.SH COMMANDS
  280. X.PP
  281. X.TP
  282. X.B clear
  283. XCreats an empty
  284. X.I dbm
  285. Xdatabase, either by clearing an old one or by creating a new.
  286. X.TP
  287. X.BR delete " key \fR[\|.\|.\|.\|]\fP"
  288. XRemoves entries with the specified keys from the database.
  289. X.TP
  290. X.B dump
  291. XDumps the
  292. X.I dbm
  293. Xdatabase to stdout (or to
  294. X.IR output_file ,
  295. Xif the 
  296. X.B \-o
  297. Xoption is used).  The output will consist of one entry per line with a
  298. Xtab between each key and value. 
  299. X.TP
  300. X.BI fetch " key \fR[\|.\|.\|.\|]\fP"
  301. X.B Fetch
  302. Xwill search for the
  303. X.I key
  304. Xin the database and print both key and value in
  305. X.B dump
  306. Xformat if found on the standard output.  Non-existing
  307. X.IR keys
  308. Xwill be signalled by a [\s-1NOT_FOUND\s+1] message. 
  309. X.TP
  310. X.BR load " [\|\fIfile\fP\|.\|.\|.\|]"
  311. XLoad the database with entries from the specified
  312. X.IR files .
  313. XIf no
  314. X.I files
  315. Xare given or if a file is specified as `-', the database will be loaded
  316. Xfrom standard input.  Each line of the file should have a key and value
  317. Xseparated by a tab.  (Incidentally, this is the same format as
  318. X.B dump
  319. Xand
  320. X.IR pathalias (1)
  321. Xwill produce.)  The database is first cleared unless the append
  322. X(\fB\-A\fP) switch has been given. 
  323. X.TP
  324. X.BR make " [\|\fIfile\fP\|.\|.\|.\|]"
  325. X.B Make
  326. Xcombines the operations of
  327. X.B parse
  328. Xand
  329. X.BR load
  330. X(q.v.), by storing each record after it has been parsed. 
  331. X.TP
  332. X.BR parse " [\|\fIfile\fP\|.\|.\|.\|]"
  333. XThis command will parse the contents of the specified
  334. X.IR files
  335. X(or stdin if no
  336. X.I files
  337. Xare given or when a file is `-'), according to the following syntax:
  338. X.in +\n()Iu
  339. Xvalue key key .\|.\|. 
  340. X.in -\n()Iu
  341. XWhitespace delimit tokens and sharp signs (\fB#\fP) anywhere on a line
  342. Xbegins comments unless any of them are quoted by a backslash (\fB\\\fP)
  343. Xor put inside double quotes (\fB"\fP\|.\|.\|.\|\fB"\fP) or angle
  344. Xbrackets (\fB<\fP\|.\|.\|.\|\fB>\fP).  Lines beginning with whitespace
  345. Xare considered to be continuations of the previous line.
  346. X.TP
  347. X.BI store " key value \fR[\|\fI key value \fR\|.\|.\|.\|]\fI"
  348. XStore one or more key/value pairs explicitly mentioned on the command
  349. Xline.
  350. X.SH EXAMPLES
  351. X.nf
  352. X.ta \w'dbm parse xfile | dbm -AI load foo'u+6n
  353. Xdbm -d foo clear    \fIcreate the database foo\fP
  354. Xcat infile | dbm load foo    \fIload it from the infile\fP
  355. Xdbm parse xfile | dbm -AI load foo    \fIadd keys from the xfile...\fP
  356. X.I "(or, shorter)    \fI...not already present...\fP"
  357. Xdbm -I make xfile foo    \fI...in the database\fP
  358. Xdbm fetch keya keyb foo    \fIfetch values for the keys\fP
  359. Xdbm -R store keyc valuec foo    \fIoverwrite previous value for keyc\fP
  360. X.fi
  361. X.SH AUTHOR
  362. X.nf
  363. XLennart Lovstrand <lel@ida.liu.se>
  364. XCIS Dept, Univ of Linkoping, Sweden
  365. X.fi
  366. X.SH "SEE ALSO"
  367. X.IR pathalias (1),
  368. X.IR dbm (3),
  369. X.IR ndbm (3)
  370. X.SH BUGS
  371. XShould probably remove the senteniel when opening the database for write
  372. Xaccess (provided that the
  373. X.B \-S
  374. Xflag has been given).
  375. X.br
  376. XRequires
  377. X.IR ndbm (3)
  378. Xor
  379. X.IR mdbm (3)
  380. Xsupport for no real reason. 
  381. END_OF_ida/doc/dbm.1
  382. if test 4959 -ne `wc -c <ida/doc/dbm.1`; then
  383.     echo shar: \"ida/doc/dbm.1\" unpacked with wrong size!
  384. fi
  385. # end of overwriting check
  386. fi
  387. if test -f ida/lib/domaintable -a "${1}" != "-c" ; then 
  388.   echo shar: Will not over-write existing file \"ida/lib/domaintable\"
  389. else
  390. echo shar: Extracting \"ida/lib/domaintable\" \(4136 characters\)
  391. sed "s/^X//" >ida/lib/domaintable <<'END_OF_ida/lib/domaintable'
  392. X#
  393. X#    Primitive name server table -- version 3.0 of 20-Apr-87
  394. X#
  395. X#    Format is <official-name> <nickname-1> .. <nickname-n>,
  396. X#    where the <nicnames> are optional.  Comments start with
  397. X#    a sharp sign (#).  A line beginning with whitespace is
  398. X#    assumed to be a continuation of the previous line.
  399. X#
  400. X#    The order in which the names are givin is significant;
  401. X#    early entries will hide later entries with coinciding
  402. X#    nicknames.
  403. X#
  404. X
  405. X#    Misc known nodes
  406. X#
  407. X        # Direct UUCP nodes
  408. Xenea.se        enea    enea.UUCP
  409. Xerilin.UUCP    erilin
  410. Xerix.ericsson.se erix    erix.UUCP
  411. Xliutde.UUCP    liutde
  412. Xrainier.UUCP    rainier
  413. X        # UUCP Major Relays & Backbones
  414. Xcbosgd.UUCP    cbosgd
  415. Xcernvax.UUCP    cernvax
  416. Xdecvax.UUCP    decvax
  417. Xdiku.UUCP    diku
  418. Xenea.se        enea    enea.UUCP
  419. Xi2unix.UUCP    i2unix
  420. Xinria.UUCP    inria
  421. Xmcvax.cwi.nl    mcvax    mcvax.UUCP
  422. Xpenet.UUCP    penet
  423. Xprlb2.UUCP    prlb2
  424. Xukc.UUCP    ukc
  425. Xunido.UUCP    unido
  426. Xvmars.UUCP    vmars
  427. X
  428. X#
  429. X#    These are just here to help people through the ARPAnet name change
  430. X#
  431. X
  432. Xseismo.CSS.GOV        SEISMO.ARPA
  433. XHARVARD.HARVARD.EDU    HARVARD.ARPA
  434. Xucbvax.BERKELEY.EDU    UCB-VAX.ARPA
  435. XWISCVM.WISC.EDU        WISCVM.ARPA
  436. XAI.AI.MIT.EDU        MIT-AI.ARPA
  437. XMC.LCS.MIT.EDU        MIT-MC.ARPA
  438. XKL.SRI.COM        SRI-KL.ARPA
  439. XNIC.SRI.COM        SRI-NIC.ARPA
  440. XSAIL.STANFORD.EDU    SU-AI.ARPA
  441. XSCORE.STANFORD.EDU    SU-SCORE.ARPA
  442. XA.CS.CMU.EDU        CMU-CS-A.ARPA
  443. XC.CS.CMU.EDU        CMU-CS-C.ARPA
  444. XR20.UTEXAS.EDU        UTEXAS-20.ARPA
  445. XSALLY.UTEXAS.EDU    UT-SALLY.ARPA
  446. XRELAY.CS.NET        CSNET-RELAY.ARPA
  447. XSUMEX-AIM.STANFORD.EDU    SUMEX-AIM.ARPA
  448. XCSLI.STANFORD.EDU    CSLI.ARPA
  449. XXerox.COM        Xerox.ARPA
  450. X
  451. X#
  452. X#    Nodes within LiU.SE -- The University of Linkoping, Sweden
  453. X#
  454. X            # The IDA domain -- Dept of Comp and Info Science
  455. XIDA.LiU.SE        liuida.UUCP    liuida.liu.se    liuida.ida.liu.se
  456. X            # DECsystems
  457. XALADIN.LiU.SE        ALADIN.SUNET.SE
  458. XCLOVER.LiU.SE        CLOVER.SUNET.SE
  459. XDAISY.LiU.SE        DAISY.SUNET.SE
  460. XELINOR.LiU.SE        ELINOR.SUNET.SE
  461. XHAZEL.LiU.SE        HAZEL.SUNET.SE            HAZEL.IDA.LiU.SE
  462. XJINJIN.LiU.SE        JINJIN.SUNET.SE
  463. XLINA.LiU.SE        LINA.SUNET.SE
  464. XLINNEA.LiU.SE        LINNEA.SUNET.SE
  465. XLINUS.LiU.SE        LINUSE.SUNET.SE            LINUS.IDA.LiU.SE
  466. XLISBET.LiU.SE        LISBET.SUNET.SE            LISBET.IDA.LiU.SE
  467. XLUDVIG.LiU.SE        LUDVIG.SUNET.SE
  468. XMINMIN.LiU.SE        MINMIN.SUNET.SE
  469. XP13L00.LiU.SE        P13L00.SUNET.SE
  470. XTURTLE.LiU.SE        TURTLE.SUNET.SE
  471. XVIKTOR.LiU.SE        VIKTOR.SUNET.SE
  472. XWEIWEI.LiU.SE        WEIWEI.SUNET.SE
  473. X            # Unix systems
  474. Xasterix.liu.se        asterix.liu.uucp        asterix.ida.liu.se
  475. Xcrabbofix.liu.se                    crabbofix.ida.liu.se
  476. Xlillefix.liu.se                        lillefix.ida.li
  477. u.se
  478. Xmajestix.liu.se                        majestix.ida.li
  479. u.se
  480. Xmiraculix.liu.se                    miraculix.ida.liu.se
  481. Xobelix.liu.se        obelix.UUCP obelix.liu.uucp    obelix.ida.liu.se
  482. Xportofix.liu.se                        portofix.ida.li
  483. u.se
  484. Xprefix.liu.se                        prefix.ida.liu.se
  485. Xsenilix.liu.se                        senilix.ida.liu.se
  486. Xsmidefix.liu.se                        smidefix.ida.li
  487. u.se
  488. Xtragicomix.liu.se                    tragicomix.ida.liu.se
  489. X
  490. X#    Nodes within QZ.SE -- The Stockholm University Computing Center
  491. X#
  492. XFREJA.QZ.SE        FREJA.SUNET.SE
  493. X
  494. X#    Nodes within UU.SE -- University of Uppsala, Sweden
  495. X#
  496. XAIDA.UU.SE        AIDA.SUNET.SE            AIDA.UPPSALA.SE
  497. XBMC1.UU.SE        BMC1.SUNET.SE
  498. XCARMEN.UU.SE        CARMEN.SUNET.SE            CARMEN.UPPSALA.SE
  499. XCARTUS.UU.SE        CARTUS.SUNET.SE
  500. XCELL.UU.SE        CELL.SUNET.SE
  501. XESCIL.UU.SE        ESCIL.SUNET.SE
  502. Xemil.uu.se
  503. XEVA.UU.SE        EVA.SUNET.SE
  504. XFARFAR.UU.SE        FARFAR.SUNET.SE
  505. XGRAPH.UU.SE        GRAPH.SUNET.SE
  506. XGWAX1.UU.SE        GWAX1.SUNET.SE
  507. XGWAX2.UU.SE        GWAX2.SUNET.SE
  508. XIMMUNA.UU.SE        IMMUNA.SUNET.SE
  509. XIMUNIS.UU.SE        IMUNIS.SUNET.SE
  510. XKEMIST.UU.SE        KEMIST.SUNET.SE
  511. Xkuling.uu.se        kuling.UUCP            kuling.uppsala.se
  512. XKVAX1.UU.SE        KVAX1.SUNET.SE
  513. XKVAX2.UU.SE        KVAX2.SUNET.SE
  514. XLABAN.UU.SE        LABAN.SUNET.SE
  515. XLAPSE.UU.SE        LAPSE.SUNET.SE
  516. XMAJA.UU.SE        MAJA.SUNET.SE
  517. XMALIN.UU.SE        MALIN.SUNET.SE
  518. XMAX.UU.SE        MAX.SUNET.SE            MAX.UPPSALA.SE
  519. XMINC.UU.SE        MINC.SUNET.SE
  520. XNIMBUS.UU.SE        NIMBUS.SUNET.SE
  521. Xnumax.uu.se
  522. XPAX.UU.SE        PAX.SUNET.SE
  523. XPELLE.UU.SE        PELLE.SUNET.SE
  524. XPICTOR.UU.SE        PICTOR.SUNET.SE
  525. XRTR18A.UU.SE        RTR18A.SUNET.SE
  526. XSIGURD.UU.SE        SIGURD.SUNET.SE
  527. XSILVER.UU.SE        SILVER.SUNET.SE
  528. XTEKLA.UU.SE        TEKLA.SUNET.SE
  529. XTLU.UU.SE        TLU.SUNET.SE
  530. XXRAY.UU.SE        XRAY.SUNET.SE
  531. X
  532. X#    Nodes within LU.SE -- Universtiy of Lund, Sweden
  533. X#
  534. XAGATON.LU.SE        AGATON.SUNET.SE
  535. XPANDOR.LU.SE        PANDOR.SUNET.SE
  536. X
  537. X#    Nodes within SUNET.SE -- The Swedish University Network (DECnet)
  538. X#    are automatically inserted here.
  539. X
  540. XATHENA.SUNET.SE        # This one is not in the DECnet tables
  541. END_OF_ida/lib/domaintable
  542. if test 4136 -ne `wc -c <ida/lib/domaintable`; then
  543.     echo shar: \"ida/lib/domaintable\" unpacked with wrong size!
  544. fi
  545. # end of overwriting check
  546. fi
  547. if test -f ida/lib/pathtable -a "${1}" != "-c" ; then 
  548.   echo shar: Will not over-write existing file \"ida/lib/pathtable\"
  549. else
  550. echo shar: Extracting \"ida/lib/pathtable\" \(3889 characters\)
  551. sed "s/^X//" >ida/lib/pathtable <<'END_OF_ida/lib/pathtable'
  552. X#########################################################################
  553. X###  Pathalias Route Database    ##############################  v3.0  ###
  554. X#########################################################################
  555. X# Edited by Lennart.Lovstrand@IDA.LiU.SE Fri Apr 17 19:37:39 MET DST 1987
  556. X
  557. X###                #########################################
  558. X#    Special Links                            #
  559. X###                #########################################
  560. X
  561. Xasterix.liu.se        obelix.liu.se(DIRECT)        # UUCP/TTY
  562. Xmajestix.liu.se        alp.UUCP(DAILY),        # UUCP/modem-12
  563. 00
  564. X            enea.se(DEMAND),        # UUCP/modem-2400
  565. X            erilin.UUCP(DIRECT),        # UUCP/modem-2400
  566. X            erix.UUCP(DEMAND),        # UUCP/modem-2400
  567. X            kuling.uu.se(HOURLY),        # UUCP/modem-2400?
  568. X            liutde.UUCP(DAILY),        # UUCP/modem-1200
  569. X            prosys.UUCP(HOURLY),        # UUCP/modem-2400
  570. X            rainier.UUCP(HOURLY),        # UUCP/modem-2400?
  571. X            ida.liu.se(0),            # via aliases dbm
  572. X            IDA-TCP-NET            # SMTP/TCP-IP
  573. Xrainier.UUCP        carola.UUCP, adams.UUCP        # SMTP/TCP-IP
  574. Xaida.uu.se        carmen.uu.se            # Cafard/TTY
  575. Xathena.sunet.se        aida.uu.se            # Cafard/UPNET
  576. X
  577. X
  578. X###                #########################################
  579. X#    Physical Networks                        #
  580. X###                #########################################
  581. X
  582. XIDA-TCP-NET = {
  583. X    asterix.liu.se,        # Gould
  584. X    crabbofix.liu.se,    # Sun-3/75M
  585. X    lillefix.liu.se,    # Sun-3/52
  586. X    lisbet.liu.se,        # DEC-2060
  587. X    majestix.liu.se,    # Sun-3/160 FS
  588. X    miraculix.liu.se,    # Sun-3/75C
  589. X    portofix.liu.se,    # Sun-3/75M
  590. X    prefix.liu.se,        # Sun-3/75M
  591. X    senilix.liu.se,        # Sun-3/75M
  592. X    smidefix.liu.se,    # Sun-3/75M
  593. X    tragicomix.liu.se}    # Sun-3/75M
  594. X
  595. X##  The SUNET-xx definitions includes only nodes that know about DECnet
  596. X##  area addressing.
  597. X
  598. XSUNET = {
  599. X    .sunet.se, SUNET-08, SUNET-13, SUNET-18, SUNET-46}
  600. X
  601. XSUNET-08 = {
  602. X    freja.qz.se, vera.sunet.se}
  603. X
  604. XSUNET-13 = {
  605. X    aladin.liu.se, clover.liu.se, daisy.liu.se, elinor.liu.se,
  606. X    hazel.liu.se, jinjin.liu.se, lina.liu.se, linus.liu.se,
  607. X    linnea.liu.se, lisbet.liu.se, liuida.sunet.se, ludvig.liu.se,
  608. X    minmin.liu.se, p13l00.liu.se, turtle.liu.se, viktor.liu.se,
  609. X    weiwei.liu.se}
  610. X
  611. XSUNET-18 = {
  612. X    malin.uu.se, tekla.uu.se, cartus.uu.se, pelle.uu.se, pictor.uu.se,
  613. X    tlu.uu.se, max.uu.se, kvax1.uu.se, kvax2.uu.se, sigurd.uu.se,
  614. X    escil.uu.se, gwax1.uu.se, gwax2.uu.se, kemist.uu.se, cell.uu.se,
  615. X    minc.uu.se, silver.uu.se, lapse.uu.se, maja.uu.se, rtr18a.uu.se,
  616. X    imunis.uu.se, xray.uu.se, graph.uu.se, immuna.uu.se, bmc1.uu.se,
  617. X    farfar.uu.se, eva.uu.se, nimbus.uu.se, laban.uu.se, pax.uu.se}
  618. X
  619. XSUNET-46 = {
  620. X    agaton.lu.se, pandor.lu.se}
  621. X
  622. X##  DECNET-xx defintions include both area-addressing nodes (which
  623. X##  may serve as gateways) and non-area-addressing nodes.
  624. X
  625. XDECNET-08 = {
  626. X    athena.sunet.se, freja.qz.se, vera.sunet.se}
  627. X
  628. X
  629. X###                #########################################
  630. X#    Domain Gateways                            #
  631. X###                #########################################
  632. X
  633. Xenea.se        .ARPA, .BITNET, .CSNET, .DEC, .JUNET, .MAILNET, .UUCP,
  634. X        .com, .edu, .gov, .mil, .net, .org,
  635. X        .au, .ca, .de, .fi, .fr, .gb, .il, .jp, .kr, .nl, .no, .nz,
  636. X        .se, .uk, .us,
  637. X        .cdn, .oz
  638. Xerix.UUCP    .ericsson, .ericsson.se
  639. Xlisbet.liu.se    .sunet.se
  640. Xliuida.sunet.se    .psi
  641. Xmajestix.liu.se    .liu, .liu.se, .ida, .ida.liu, .ida.liu.se,
  642. X        .qz, .qz.se, .uu, .uu.se, .uppsala, .uppsala.se
  643. Xnta-vax.ARPA    .Uninett
  644. X
  645. X
  646. X###                #########################################
  647. X#    Implicit links                            #
  648. X###                #########################################
  649. X
  650. Xenea.se            calgary.UUCP, relay.cs.net, nta-vax.ARPA,
  651. X            uoregon.UUCP, ohio-state.arpa
  652. Xlisbet.liu.se        freja.qz.se
  653. X
  654. X###                #########################################
  655. X#    Other explict links                        #
  656. X###                #########################################
  657. X
  658. Xkuling.uu.se        emil.uu.se
  659. Xrelay.cs.net        csri.toronto.edu, isc.intel.com
  660. Xuoregon.UUCP        drizzle.UUCP
  661. Xcalgary.UUCP        vuw90x.UUCP
  662. Xohio-state.arpa        OSU-20.OHIO-STATE.EDU
  663. X
  664. X###                #########################################
  665. X#    Useful synonyms                            #
  666. X###                #########################################
  667. X
  668. Xida.liu.se    = liuida.UUCP
  669. Xobelix.liu.se    = obelix.UUCP
  670. X.ericsson    = .erix
  671. X.ericsson.se    = .erix.se
  672. END_OF_ida/lib/pathtable
  673. if test 3889 -ne `wc -c <ida/lib/pathtable`; then
  674.     echo shar: \"ida/lib/pathtable\" unpacked with wrong size!
  675. fi
  676. # end of overwriting check
  677. fi
  678. if test -f ida/patches/BSD29.diff -a "${1}" != "-c" ; then 
  679.   echo shar: Will not over-write existing file \"ida/patches/BSD29.diff\"
  680. else
  681. echo shar: Extracting \"ida/patches/BSD29.diff\" \(3463 characters\)
  682. sed "s/^X//" >ida/patches/BSD29.diff <<'END_OF_ida/patches/BSD29.diff'
  683. X*** conf.c.old    Wed May 27 04:04:08 1987
  684. X--- conf.c    Wed May 27 04:05:00 1987
  685. X***************
  686. X*** 556,562 ****
  687. X  
  688. X  #ifdef VMUNIX
  689. X  
  690. X! #include <nlist.h>
  691. X  
  692. X  struct    nlist Nl[] =
  693. X  {
  694. X--- 556,566 ----
  695. X  
  696. X  #ifdef VMUNIX
  697. X  
  698. X! #ifdef BSD29
  699. X! #  include <a.out.h>
  700. X! #else BSD29
  701. X! #  include <nlist.h>
  702. X! #endif BSD29
  703. X  
  704. X  struct    nlist Nl[] =
  705. X  {
  706. X***************
  707. X*** 581,587 ****
  708. X--- 585,595 ----
  709. X          if (kmem < 0)
  710. X              return (-1);
  711. X          (void) ioctl(kmem, (int) FIOCLEX, (char *) 0);
  712. X+ #ifdef BSD29
  713. X+         nlist("/unix", Nl);
  714. X+ #else BSD29
  715. X          nlist("/vmunix", Nl);
  716. X+ #endif BSD29
  717. X          if (Nl[0].n_type == 0)
  718. X              return (-1);
  719. X      }
  720. X***************
  721. X*** 691,699 ****
  722. X  **        Picks up extant zombies.
  723. X  */
  724. X  
  725. X! # ifdef VMUNIX
  726. X  # include <sys/wait.h>
  727. X! # endif VMUNIX
  728. X  
  729. X  reapchild()
  730. X  {
  731. X--- 699,707 ----
  732. X  **        Picks up extant zombies.
  733. X  */
  734. X  
  735. X! # if defined(VMUNIX) && !defined(BSD29)
  736. X  # include <sys/wait.h>
  737. X! # endif VMUNIX && !BSD29
  738. X  
  739. X  reapchild()
  740. X  {
  741. X*** daemon.c.old    Wed May 27 01:46:56 1987
  742. X--- daemon.c    Wed May 27 02:51:55 1987
  743. X***************
  744. X*** 553,564 ****
  745. X      register FILE *f;
  746. X  
  747. X      hostbuf[0] = '\0';
  748. X!     f = fopen("/usr/include/whoami", "r");
  749. X!     if (f != NULL)
  750. X      {
  751. X!         (void) fgets(hostbuf, size, f);
  752. X!         fixcrlf(hostbuf, TRUE);
  753. X!         (void) fclose(f);
  754. X      }
  755. X      return (NULL);
  756. X  }
  757. X--- 553,569 ----
  758. X      register FILE *f;
  759. X  
  760. X      hostbuf[0] = '\0';
  761. X! #ifdef BSD29
  762. X!     if (gethostname(hostbuf, size) < 0)
  763. X! #endif BSD29
  764. X      {
  765. X!         f = fopen("/usr/include/whoami", "r");
  766. X!         if (f != NULL)
  767. X!         {
  768. X!             (void) fgets(hostbuf, size, f);
  769. X!             fixcrlf(hostbuf, TRUE);
  770. X!             (void) fclose(f);
  771. X!         }
  772. X      }
  773. X      return (NULL);
  774. X  }
  775. X*** deliver.c.old    Wed May 27 01:46:59 1987
  776. X--- deliver.c    Wed May 27 02:51:56 1987
  777. X***************
  778. X*** 16,22 ****
  779. X  # include <errno.h>
  780. X  # include "sendmail.h"
  781. X  # include <sys/stat.h>
  782. X! # include <netdb.h>
  783. X  
  784. X  /*
  785. X  **  Status error messages
  786. X--- 16,24 ----
  787. X  # include <errno.h>
  788. X  # include "sendmail.h"
  789. X  # include <sys/stat.h>
  790. X! # ifndef BSD29
  791. X! #  include <netdb.h>
  792. X! # endif !BSD29
  793. X  
  794. X  /*
  795. X  **  Status error messages
  796. X*** err.c.old    Wed May 27 01:47:01 1987
  797. X--- err.c    Wed May 27 02:52:06 1987
  798. X***************
  799. X*** 14,20 ****
  800. X  
  801. X  # include "sendmail.h"
  802. X  # include <errno.h>
  803. X! # include <netdb.h>
  804. X  
  805. X  /*
  806. X  **  SYSERR -- Print error message.
  807. X--- 14,22 ----
  808. X  
  809. X  # include "sendmail.h"
  810. X  # include <errno.h>
  811. X! # ifndef BSD29
  812. X! #  include <netdb.h>
  813. X! # endif !BSD29
  814. X  
  815. X  /*
  816. X  **  SYSERR -- Print error message.
  817. X*** queue.c.old    Wed May 27 01:47:09 1987
  818. X--- queue.c    Wed May 27 02:27:44 1987
  819. X***************
  820. X*** 11,17 ****
  821. X  
  822. X  # include "sendmail.h"
  823. X  # include <sys/stat.h>
  824. X! # include <sys/dir.h>
  825. X  # include <signal.h>
  826. X  # include <errno.h>
  827. X  
  828. X--- 11,19 ----
  829. X  
  830. X  # include "sendmail.h"
  831. X  # include <sys/stat.h>
  832. X! # ifndef BSD29
  833. X! #  include <sys/dir.h>
  834. X! # endif !BSD29
  835. X  # include <signal.h>
  836. X  # include <errno.h>
  837. X  
  838. X***************
  839. X*** 231,237 ****
  840. X--- 233,243 ----
  841. X      if (tf != NULL)
  842. X      {
  843. X          (void) unlink(qf);
  844. X+ #ifdef BSD29
  845. X+         if (link(tf, qf) != 0 || unlink(tf) != 0)
  846. X+ #else BSD29
  847. X          if (rename(tf, qf) < 0)
  848. X+ #endif BSD29
  849. X              syserr("cannot unlink(%s, %s), df=%s", tf, qf, e->e_df)
  850. ;
  851. X          errno = 0;
  852. X      }
  853. X*** sendmail.h.old    Wed May 27 04:13:02 1987
  854. X--- sendmail.h    Wed May 27 04:16:10 1987
  855. X***************
  856. X*** 662,664 ****
  857. X--- 671,682 ----
  858. X  #ifndef LOG_MAIL
  859. X  # define LOG_MAIL    (2<<3)
  860. X  #endif LOG_MAIL
  861. X+ 
  862. X+ /*
  863. X+ **  BSD2.9 Compatibility Code
  864. X+ */
  865. X+ 
  866. X+ #ifdef BSD29
  867. X+ # define EPROCLIM    EAGAIN
  868. X+ # include "../lib/libndir/dir.h"
  869. X+ #endif BSD29
  870. END_OF_ida/patches/BSD29.diff
  871. if test 3463 -ne `wc -c <ida/patches/BSD29.diff`; then
  872.     echo shar: \"ida/patches/BSD29.diff\" unpacked with wrong size!
  873. fi
  874. # end of overwriting check
  875. fi
  876. if test -f ida/patches/MDBM.diff -a "${1}" != "-c" ; then 
  877.   echo shar: Will not over-write existing file \"ida/patches/MDBM.diff\"
  878. else
  879. echo shar: Extracting \"ida/patches/MDBM.diff\" \(3104 characters\)
  880. sed "s/^X//" >ida/patches/MDBM.diff <<'END_OF_ida/patches/MDBM.diff'
  881. X*** alias.c.old    Wed May 27 02:03:20 1987
  882. X--- alias.c    Wed May 27 01:46:52 1987
  883. X***************
  884. X*** 167,175 ****
  885. X  
  886. X  #ifdef NDBM
  887. X  /*
  888. X! **  NDBMINIT -- initialize the ndbm database
  889. X  **
  890. X! **    Only for use with NDBM and the keyed database table.
  891. X  **
  892. X  **    Parameters:
  893. X  **        aliasfile -- name of alias database file
  894. X--- 167,175 ----
  895. X  
  896. X  #ifdef NDBM
  897. X  /*
  898. X! **  NDBMINIT -- initialize the [mn]dbm database
  899. X  **
  900. X! **    Only for use with [MN]DBM and the keyed database table.
  901. X  **
  902. X  **    Parameters:
  903. X  **        aliasfile -- name of alias database file
  904. X***************
  905. X*** 602,607 ****
  906. X--- 602,610 ----
  907. X      (void) fclose(af);
  908. X      CurEnv->e_to = NULL;
  909. X      FileName = NULL;
  910. X+ #ifdef MDBM
  911. X+     (void) mdbm_sync(AliasDbm.dbm);
  912. X+ #endif MDBM
  913. X      message(Arpa_Info, "%d aliases, longest %d bytes, %d bytes total",
  914. X              naliases, longest, bytes);
  915. X  # ifdef LOG
  916. X*** conf.h.old    Wed May 27 02:07:56 1987
  917. X--- conf.h    Wed May 27 01:53:01 1987
  918. X***************
  919. X*** 42,47 ****
  920. X--- 42,48 ----
  921. X  
  922. X  # define DBM        1    /* use DBM library (requires -ldbm) */
  923. X  # define NDBM        1    /* new DBM library available (requires 
  924. DBM) */
  925. X+ # define MDBM        1    /* subst Maryland's mdbm package for nd
  926. bm */
  927. X  # define DEBUG        1    /* enable debugging */
  928. X  # define LOG        1    /* enable logging */
  929. X  # define SMTP        1    /* enable user and server SMTP */
  930. X*** sendmail.h.old    Wed May 27 01:58:25 1987
  931. X--- sendmail.h    Wed May 27 01:59:12 1987
  932. X***************
  933. X*** 483,489 ****
  934. X   */
  935. X  #define    MAX_ERRNO    100
  936. X   /*
  937. X! **  Database ([n]dbm) definitions.
  938. X  */
  939. X  
  940. X  #ifdef DBM
  941. X--- 483,489 ----
  942. X   */
  943. X  #define    MAX_ERRNO    100
  944. X   /*
  945. X! **  Database ([mn]dbm) definitions.
  946. X  */
  947. X  
  948. X  #ifdef DBM
  949. X***************
  950. X*** 493,507 ****
  951. X      int    dsize;
  952. X  } DATUM;
  953. X  
  954. X! # define DB_DIREXT    ".dir"
  955. X! # define DB_PAGEXT    ".pag"
  956. X  
  957. X! # ifdef NDBM
  958. X  
  959. X! #  undef DBM            /* while including ndbm.h */
  960. X! #  include <ndbm.h>        /* DBM is typedef'ed here */
  961. X  typedef DBM DBMFILE;        /* move typedef to DBMFILE */
  962. X! #  define DBM            /* and restore DBM definition */
  963. X  #  include <fcntl.h>        /* needed for dbm_open */
  964. X  
  965. X  #  define DATUM datum        /* use the definition in ndbm.h */
  966. X--- 493,516 ----
  967. X      int    dsize;
  968. X  } DATUM;
  969. X  
  970. X! # ifdef MDBM
  971. X! #  define DB_DIREXT    ".map"
  972. X! #  define DB_PAGEXT    ".dat"
  973. X! # else MDBM
  974. X! #  define DB_DIREXT    ".dir"
  975. X! #  define DB_PAGEXT    ".pag"
  976. X! # endif MDBM
  977. X  
  978. X! # if defined(NDBM) || defined(MDBM)
  979. X  
  980. X! #  ifdef MDBM
  981. X! #   include "mdbm_compat.h"    /* mdbm compatibility file */
  982. X! #  else MDBM
  983. X! #   undef DBM            /* while including ndbm.h */
  984. X! #   include <ndbm.h>        /* DBM is typedef'ed here */
  985. X  typedef DBM DBMFILE;        /* move typedef to DBMFILE */
  986. X! #   define DBM            /* and restore DBM definition */
  987. X! #  endif MDBM
  988. X  #  include <fcntl.h>        /* needed for dbm_open */
  989. X  
  990. X  #  define DATUM datum        /* use the definition in ndbm.h */
  991. X***************
  992. X*** 517,523 ****
  993. X  #  define DB_ALIAS    '@'    /* "name" of aliases database */
  994. X  #  define AliasDbm    DbmTab[DB_ALIAS]
  995. X  
  996. X! # endif NDBM
  997. X  #endif DBM
  998. X   /*
  999. X  **  Global variables.
  1000. X--- 526,532 ----
  1001. X  #  define DB_ALIAS    '@'    /* "name" of aliases database */
  1002. X  #  define AliasDbm    DbmTab[DB_ALIAS]
  1003. X  
  1004. X! # endif NDBM || MDBM
  1005. X  #endif DBM
  1006. X   /*
  1007. X  **  Global variables.
  1008. END_OF_ida/patches/MDBM.diff
  1009. if test 3104 -ne `wc -c <ida/patches/MDBM.diff`; then
  1010.     echo shar: \"ida/patches/MDBM.diff\" unpacked with wrong size!
  1011. fi
  1012. # end of overwriting check
  1013. fi
  1014. if test -f ida/patches/daemon.c.diff -a "${1}" != "-c" ; then 
  1015.   echo shar: Will not over-write existing file \"ida/patches/daemon.c.diff\"
  1016. else
  1017. echo shar: Extracting \"ida/patches/daemon.c.diff\" \(4391 characters\)
  1018. sed "s/^X//" >ida/patches/daemon.c.diff <<'END_OF_ida/patches/daemon.c.diff'
  1019. X*** daemon.c.orig    Fri Mar 13 18:51:04 1987
  1020. X--- daemon.c    Mon May 25 15:55:13 1987
  1021. X***************
  1022. X*** 481,487 ****
  1023. X  **        hbsize -- the size of hbuf.
  1024. X  **
  1025. X  **    Returns:
  1026. X! **        none.
  1027. X  **
  1028. X  **    Side Effects:
  1029. X  **        Looks up the host specified in hbuf.  If it is not
  1030. X--- 481,488 ----
  1031. X  **        hbsize -- the size of hbuf.
  1032. X  **
  1033. X  **    Returns:
  1034. X! **        An exit code telling if the hostname was found and
  1035. X! **        canonicalized.
  1036. X  **
  1037. X  **    Side Effects:
  1038. X  **        Looks up the host specified in hbuf.  If it is not
  1039. X***************
  1040. X*** 496,501 ****
  1041. X--- 497,503 ----
  1042. X  {
  1043. X      register struct hostent *hp;
  1044. X      extern struct hostent *gethostbyname();
  1045. X+     static char tmphbuf[MAXNAME];
  1046. X  
  1047. X      /*
  1048. X      **  If first character is a bracket, then it is an address
  1049. X***************
  1050. X*** 508,520 ****
  1051. X      {
  1052. X          extern struct hostent *gethostbyaddr();
  1053. X          u_long in_addr;
  1054. X-         char ptr[256];
  1055. X-         char *bptr;
  1056. X  
  1057. X!         (void) strcpy(ptr, hbuf);
  1058. X!         bptr = index(ptr,']');
  1059. X!         *bptr = '\0';
  1060. X!         in_addr = inet_addr(&ptr[1]);
  1061. X          hp = gethostbyaddr((char *) &in_addr, sizeof(struct in_addr), A
  1062. F_INET);
  1063. X          if (hp == NULL)
  1064. X              return;
  1065. X--- 510,518 ----
  1066. X      {
  1067. X          extern struct hostent *gethostbyaddr();
  1068. X          u_long in_addr;
  1069. X  
  1070. X!         (void) strncpy(tmphbuf, hbuf+1, strlen(hbuf)-2);
  1071. X!         in_addr = inet_addr(tmphbuf);
  1072. X          hp = gethostbyaddr((char *) &in_addr, sizeof(struct in_addr), A
  1073. F_INET);
  1074. X          if (hp == NULL)
  1075. X              return;
  1076. X***************
  1077. X*** 521,528 ****
  1078. X      }
  1079. X      else
  1080. X      {
  1081. X!         makelower(hbuf);
  1082. X!         hp = gethostbyname(hbuf);
  1083. X      }
  1084. X      if (hp != NULL)
  1085. X      {
  1086. X--- 519,527 ----
  1087. X      }
  1088. X      else
  1089. X      {
  1090. X!         (void) strcpy(tmphbuf, hbuf);
  1091. X!         makelower(tmphbuf);
  1092. X!         hp = gethostbyname(tmphbuf);
  1093. X      }
  1094. X      if (hp != NULL)
  1095. X      {
  1096. X***************
  1097. X*** 532,537 ****
  1098. X--- 531,537 ----
  1099. X              hp->h_name[--i] = '\0';
  1100. X          (void) strcpy(hbuf, hp->h_name);
  1101. X      }
  1102. X+     return (hp != NULL);
  1103. X  }
  1104. X  
  1105. X  # else DAEMON
  1106. X***************
  1107. X*** 584,590 ****
  1108. X      char *hbuf;
  1109. X      int hbsize;
  1110. X  {
  1111. X!     return;
  1112. X  }
  1113. X  
  1114. X  #endif DAEMON
  1115. X--- 584,691 ----
  1116. X      char *hbuf;
  1117. X      int hbsize;
  1118. X  {
  1119. X!     return (FALSE);
  1120. X  }
  1121. X  
  1122. X  #endif DAEMON
  1123. X+ 
  1124. X+ /*
  1125. X+ **  MAPKEY -- Search a dbm database.
  1126. X+ **
  1127. X+ **    Search the named database using the given key.  If
  1128. X+ **    a result is found, sprintf the argument through the
  1129. X+ **    result back into the argument and return TRUE;
  1130. X+ **    otherwise return FALSE and do nothing.
  1131. X+ **
  1132. X+ **    Parameters:
  1133. X+ **        key -- search string
  1134. X+ **        argval -- sprintf argument & result
  1135. X+ **        argsiz -- size of argval
  1136. X+ **
  1137. X+ **    Returns:
  1138. X+ **        An exit code telling if there was a match.
  1139. X+ **
  1140. X+ **    Side Effects:
  1141. X+ **        The argval is rewritten to reflect what was found
  1142. X+ **        in the database.
  1143. X+ */
  1144. X+ 
  1145. X+ #ifdef NDBM
  1146. X+ 
  1147. X+ mapkey(db, key, keysiz, arg)
  1148. X+     char db, *key, *arg;
  1149. X+     int keysiz;
  1150. X+ {
  1151. X+     DATUM dkey, result;
  1152. X+     static char lowkey[MAXNAME];
  1153. X+ 
  1154. X+ #ifdef DEBUG
  1155. X+     if (tTd(60, 1))
  1156. X+     printf("mapkey(`%c', \"%s\", \"%s\") => ", db, key, arg);
  1157. X+ #endif DEBUG
  1158. X+ 
  1159. X+     if (DbmTab[db].name == NULL) {
  1160. X+     syserr("database `%c' has not been defined", db);
  1161. X+     return FALSE;
  1162. X+     }
  1163. X+ 
  1164. X+     if (DbmTab[db].dbm == DB_NOSUCHFILE) {
  1165. X+ #ifdef DEBUG
  1166. X+     if (tTd(60, 1))
  1167. X+         printf("NO_FILE\n");
  1168. X+ #endif DEBUG
  1169. X+     return FALSE;
  1170. X+     }
  1171. X+ 
  1172. X+     if (DbmTab[db].dbm == DB_NOTYETOPEN)
  1173. X+     DbmTab[db].dbm = dbm_open(DbmTab[db].name, O_RDONLY, 0);
  1174. X+ 
  1175. X+     if (DbmTab[db].dbm == DB_NOSUCHFILE) {
  1176. X+     syserr("can't open database `%c' [%s]", db, DbmTab[db].name);
  1177. X+ #ifdef DEBUG
  1178. X+     if (tTd(60, 1))
  1179. X+         printf("CAN'T OPEN %s\n", DbmTab[db].name);
  1180. X+ #endif DEBUG
  1181. X+     return FALSE;
  1182. X+     }
  1183. X+ 
  1184. X+     (void) strcpy(lowkey, key);
  1185. X+     makelower(lowkey);
  1186. X+     dkey.dptr = lowkey;
  1187. X+     dkey.dsize = strlen(dkey.dptr) + 1;
  1188. X+ 
  1189. X+     result = dbm_fetch(DbmTab[db].dbm, dkey);
  1190. X+     if (result.dptr == NULL) {
  1191. X+ #ifdef DEBUG
  1192. X+     if (tTd(60, 1))
  1193. X+         printf("NOT_FOUND\n");
  1194. X+ #endif DEBUG
  1195. X+     return FALSE;
  1196. X+     }
  1197. X+ 
  1198. X+     /* very crude & approximate length check */
  1199. X+     if (strlen(result.dptr) +
  1200. X+     (index(result.dptr, '%') == NULL ? 0 : strlen(arg)) > keysiz)
  1201. X+     syserr("mapkey: result \"%s\" too long after expansion (%d chars max)",
  1202. X+            result.dptr, keysiz);
  1203. X+     else
  1204. X+     (void) sprintf(key, result.dptr, arg);
  1205. X+ 
  1206. X+ #ifdef DEBUG
  1207. X+     if (tTd(60, 1))
  1208. X+     printf("%s\n", key);
  1209. X+ #endif DEBUG
  1210. X+     return TRUE;
  1211. X+ }
  1212. X+ 
  1213. X+ #else NDBM
  1214. X+ 
  1215. X+ /* should really read the table into the stab instead */
  1216. X+ mapkey(db, key, keysiz, arg)
  1217. X+     char db, *key, *arg;
  1218. X+     int keysiz;
  1219. X+ {
  1220. X+     return FALSE;
  1221. X+ }
  1222. X+ 
  1223. X+ #endif NDBM
  1224. END_OF_ida/patches/daemon.c.diff
  1225. if test 4391 -ne `wc -c <ida/patches/daemon.c.diff`; then
  1226.     echo shar: \"ida/patches/daemon.c.diff\" unpacked with wrong size!
  1227. fi
  1228. # end of overwriting check
  1229. fi
  1230. if test -f ida/patches/deliver.c.diff -a "${1}" != "-c" ; then 
  1231.   echo shar: Will not over-write existing file \"ida/patches/deliver.c.diff\"
  1232. else
  1233. echo shar: Extracting \"ida/patches/deliver.c.diff\" \(4822 characters\)
  1234. sed "s/^X//" >ida/patches/deliver.c.diff <<'END_OF_ida/patches/deliver.c.diff'
  1235. X*** deliver.c.orig    Fri Mar 13 18:51:05 1987
  1236. X--- deliver.c    Mon May 25 15:55:16 1987
  1237. X***************
  1238. X*** 19,24 ****
  1239. X--- 19,62 ----
  1240. X  # include <netdb.h>
  1241. X  
  1242. X  /*
  1243. X+ **  Status error messages
  1244. X+ */
  1245. X+ 
  1246. X+ 
  1247. X+ #define MAXENDERR    (sizeof(Enderr) / sizeof(*Enderr))
  1248. X+ char *Enderr[] = {
  1249. X+     "IMPOSSIBLE",
  1250. X+     "hangup",
  1251. X+     "interrupt",
  1252. X+     "quit",
  1253. X+     "illegal instruction",
  1254. X+     "trace trap",
  1255. X+     "IOT instruction",
  1256. X+     "EMT instruction",
  1257. X+     "floating point exception",
  1258. X+     "kill",
  1259. X+     "bus error",
  1260. X+     "segmentation violation",
  1261. X+     "bad argument to system call",
  1262. X+     "write on a pipe with no one to read it",
  1263. X+     "alarm clock",
  1264. X+     "software termination signal",
  1265. X+     "urgent condition present on socket",
  1266. X+     "stop",
  1267. X+     "stop signal generated from keyboard",
  1268. X+     "continue after stop",
  1269. X+     "child status has changed",
  1270. X+     "background read attempted from control terminal",
  1271. X+     "background write attempted to control terminal",
  1272. X+     "I/O is possible on a descriptor",
  1273. X+     "cpu time limit exceeded",
  1274. X+     "file size limit exceeded",
  1275. X+     "virtual time alarm",
  1276. X+     "profiling timer alarm",
  1277. X+     "window changed"
  1278. X+ };
  1279. X+ 
  1280. X+ /*
  1281. X  **  DELIVER -- Deliver a message to a list of addresses.
  1282. X  **
  1283. X  **    This routine delivers to everyone on the same host as the
  1284. X***************
  1285. X*** 116,122 ****
  1286. X  
  1287. X      /* rewrite from address, using rewriting rules */
  1288. X      expand("\001f", buf, &buf[sizeof buf - 1], e);
  1289. X!     (void) strcpy(tfrombuf, remotename(buf, m, TRUE, TRUE));
  1290. X  
  1291. X      define('g', tfrombuf, e);        /* translated sender address */
  1292. X      define('h', host, e);            /* to host */
  1293. X--- 154,160 ----
  1294. X  
  1295. X      /* rewrite from address, using rewriting rules */
  1296. X      expand("\001f", buf, &buf[sizeof buf - 1], e);
  1297. X!     (void) strcpy(tfrombuf, remotename(buf, m, TRUE, TRUE, FALSE));
  1298. X  
  1299. X      define('g', tfrombuf, e);        /* translated sender address */
  1300. X      define('h', host, e);            /* to host */
  1301. X***************
  1302. X*** 354,360 ****
  1303. X      **    If we are running SMTP, we just need to clean up.
  1304. X      */
  1305. X  
  1306. X!     message(Arpa_Info, "Connecting to %s.%s...", host, m->m_name);
  1307. X  
  1308. X      if (ctladdr == NULL)
  1309. X          ctladdr = &e->e_from;
  1310. X--- 392,398 ----
  1311. X      **    If we are running SMTP, we just need to clean up.
  1312. X      */
  1313. X  
  1314. X!     message(Arpa_Info, "Connecting to %s.#%s...", host, m->m_name);
  1315. X  
  1316. X      if (ctladdr == NULL)
  1317. X          ctladdr = &e->e_from;
  1318. X***************
  1319. X*** 629,635 ****
  1320. X      /* see if it died a horrid death */
  1321. X      if ((st & 0377) != 0)
  1322. X      {
  1323. X!         syserr("mailer %s died with signal %o", name, st);
  1324. X          ExitStat = EX_TEMPFAIL;
  1325. X          return (EX_TEMPFAIL);
  1326. X      }
  1327. X--- 667,675 ----
  1328. X      /* see if it died a horrid death */
  1329. X      if ((st & 0377) != 0)
  1330. X      {
  1331. X!         syserr("%s died because of %s (%d)--requeueing message",
  1332. X!                name, ((st >= 0) && (st < MAXENDERR)) ?
  1333. X!                Enderr[st] : "unknown error code", st);
  1334. X          ExitStat = EX_TEMPFAIL;
  1335. X          return (EX_TEMPFAIL);
  1336. X      }
  1337. X***************
  1338. X*** 1061,1092 ****
  1339. X      register FILE *fp;
  1340. X      register MAILER *m;
  1341. X  {
  1342. X!     char *template = "\001l\n";
  1343. X      char buf[MAXLINE];
  1344. X  
  1345. X      if (bitnset(M_NHDR, m->m_flags))
  1346. X          return;
  1347. X  
  1348. X  # ifdef UGLYUUCP
  1349. X      if (bitnset(M_UGLYUUCP, m->m_flags))
  1350. X      {
  1351. X          char *bang;
  1352. X-         char xbuf[MAXLINE];
  1353. X  
  1354. X          expand("\001g", buf, &buf[sizeof buf - 1], CurEnv);
  1355. X          bang = index(buf, '!');
  1356. X          if (bang == NULL)
  1357. X!             syserr("No ! in UUCP! (%s)", buf);
  1358. X          else
  1359. X          {
  1360. X              *bang++ = '\0';
  1361. X!             (void) sprintf(xbuf, "From %s  \001d remote from %s\n",
  1362.  bang, buf);
  1363. X!             template = xbuf;
  1364. X          }
  1365. X      }
  1366. X  # endif UGLYUUCP
  1367. X      expand(template, buf, &buf[sizeof buf - 1], CurEnv);
  1368. X      putline(buf, fp, m);
  1369. X  }
  1370. X   /*
  1371. X  **  PUTBODY -- put the body of a message.
  1372. X--- 1101,1154 ----
  1373. X      register FILE *fp;
  1374. X      register MAILER *m;
  1375. X  {
  1376. X!     extern char *macvalue();
  1377. X!     char *oldg = macvalue('g', CurEnv);
  1378. X!     char template[MAXLINE];
  1379. X!     char newg[MAXLINE];
  1380. X      char buf[MAXLINE];
  1381. X  
  1382. X+     strcpy(template, "\001l\n");
  1383. X+ 
  1384. X      if (bitnset(M_NHDR, m->m_flags))
  1385. X          return;
  1386. X  
  1387. X+     /* construct path through us if needed */
  1388. X+     if (bitnset(M_FROMPATH, m->m_flags)) {
  1389. X+         char myname[MAXLINE];
  1390. X+ 
  1391. X+         expand("\001k", myname, &myname[sizeof myname - 1], CurEnv);
  1392. X+         if (index(oldg, '!') == NULL
  1393. X+             || strncmp(oldg, myname, strlen(myname)) != 0) {
  1394. X+             sprintf(newg, "%s!%s", myname, oldg);
  1395. X+             define('g', newg, CurEnv);
  1396. X+         }
  1397. X+     }
  1398. X+ 
  1399. X  # ifdef UGLYUUCP
  1400. X      if (bitnset(M_UGLYUUCP, m->m_flags))
  1401. X      {
  1402. X          char *bang;
  1403. X  
  1404. X          expand("\001g", buf, &buf[sizeof buf - 1], CurEnv);
  1405. X          bang = index(buf, '!');
  1406. X          if (bang == NULL)
  1407. X!             syserr("No `!' in UUCP envelope from address! (%s)",
  1408. X!                    buf);
  1409. X          else
  1410. X          {
  1411. X              *bang++ = '\0';
  1412. X!             (void) sprintf(template,
  1413. X!                        "From %s  \001d remote from %s\n",
  1414. X!                        bang, buf);
  1415. X          }
  1416. X      }
  1417. X  # endif UGLYUUCP
  1418. X      expand(template, buf, &buf[sizeof buf - 1], CurEnv);
  1419. X      putline(buf, fp, m);
  1420. X+ 
  1421. X+     /* redefine old from address */
  1422. X+     if (bitnset(M_FROMPATH, m->m_flags))
  1423. X+         define('g', oldg, CurEnv);
  1424. X  }
  1425. X   /*
  1426. X  **  PUTBODY -- put the body of a message.
  1427. END_OF_ida/patches/deliver.c.diff
  1428. if test 4822 -ne `wc -c <ida/patches/deliver.c.diff`; then
  1429.     echo shar: \"ida/patches/deliver.c.diff\" unpacked with wrong size!
  1430. fi
  1431. # end of overwriting check
  1432. fi
  1433. if test -f ida/patches/main.c.diff -a "${1}" != "-c" ; then 
  1434.   echo shar: Will not over-write existing file \"ida/patches/main.c.diff\"
  1435. else
  1436. echo shar: Extracting \"ida/patches/main.c.diff\" \(3868 characters\)
  1437. sed "s/^X//" >ida/patches/main.c.diff <<'END_OF_ida/patches/main.c.diff'
  1438. X*** main.c.orig    Fri Mar 13 18:51:06 1987
  1439. X--- main.c    Mon May 25 15:55:19 1987
  1440. X***************
  1441. X*** 179,184 ****
  1442. X--- 179,192 ----
  1443. X          }
  1444. X          else if (strncmp(p, "-bz", 3) == 0)
  1445. X              nothaw = TRUE;
  1446. X+         else if (strncmp(p, "-Z", 2) == 0)
  1447. X+         {
  1448. X+             FreezeFile = &p[2];
  1449. X+             if (FreezeFile[0] == '\0')
  1450. X+                 FreezeFile = "sendmail.fc";
  1451. X+             (void) setgid(getrgid());
  1452. X+             (void) setuid(getruid());
  1453. X+         }
  1454. X  # ifdef DEBUG
  1455. X          else if (strncmp(p, "-d", 2) == 0)
  1456. X          {
  1457. X***************
  1458. X*** 250,255 ****
  1459. X--- 258,264 ----
  1460. X  #endif DEBUG
  1461. X              p = newstr(jbuf);
  1462. X              define('w', p, CurEnv);
  1463. X+             define('k', p, CurEnv);
  1464. X              setclass('w', p);
  1465. X          }
  1466. X          while (av != NULL && *av != NULL)
  1467. X***************
  1468. X*** 282,287 ****
  1469. X--- 291,298 ----
  1470. X          OpMode = MD_PRINT;
  1471. X      else if (strcmp(p, "smtpd") == 0)
  1472. X          OpMode = MD_DAEMON;
  1473. X+     else if (strcmp(p, "bsmtp") == 0)
  1474. X+         OpMode = MD_BSMTP;
  1475. X      while ((p = *++av) != NULL && p[0] == '-')
  1476. X      {
  1477. X          switch (p[1])
  1478. X***************
  1479. X*** 295,300 ****
  1480. X--- 306,312 ----
  1481. X                  break;
  1482. X  # endif DAEMON
  1483. X                case MD_SMTP:
  1484. X+               case MD_BSMTP:
  1485. X  # ifndef SMTP
  1486. X                  syserr("I don't speak SMTP");
  1487. X                  break;
  1488. X***************
  1489. X*** 318,323 ****
  1490. X--- 330,338 ----
  1491. X            case 'C':    /* select configuration file (already done) */
  1492. X              break;
  1493. X  
  1494. X+           case 'Z':    /* select frozen config file (already done) */
  1495. X+             break;
  1496. X+ 
  1497. X  # ifdef DEBUG
  1498. X            case 'd':    /* debugging -- redo in case frozen */
  1499. X              tTsetup(tTdvect, sizeof tTdvect, "0-99.1");
  1500. X***************
  1501. X*** 514,522 ****
  1502. X  
  1503. X              if (m == NULL)
  1504. X                  continue;
  1505. X!             printf("mailer %d (%s): P=%s S=%d R=%d M=%ld F=", i, m-
  1506. >m_name,
  1507. X!                 m->m_mailer, m->m_s_rwset, m->m_r_rwset,
  1508. X!                 m->m_maxsize);
  1509. X              for (j = '\0'; j <= '\177'; j++)
  1510. X                  if (bitnset(j, m->m_flags))
  1511. X                      (void) putchar(j);
  1512. X--- 529,538 ----
  1513. X  
  1514. X              if (m == NULL)
  1515. X                  continue;
  1516. X!             printf("mailer %d (%s): P=%s S=%d/%d R=%d/%d M=%ld F=",
  1517. X!                 i, m->m_name, m->m_mailer,
  1518. X!                 m->m_se_rwset, m->m_sh_rwset,
  1519. X!                 m->m_re_rwset, m->m_rh_rwset, m->m_maxsize);
  1520. X              for (j = '\0'; j <= '\177'; j++)
  1521. X                  if (bitnset(j, m->m_flags))
  1522. X                      (void) putchar(j);
  1523. X***************
  1524. X*** 543,548 ****
  1525. X--- 559,565 ----
  1526. X          char buf[MAXLINE];
  1527. X  
  1528. X          printf("ADDRESS TEST MODE\nEnter <ruleset> <address>\n");
  1529. X+         printf("[Note: No initial ruleset 3 call]\n");
  1530. X          for (;;)
  1531. X          {
  1532. X              register char **pvp;
  1533. X***************
  1534. X*** 569,575 ****
  1535. X                  pvp = prescan(++p, ',', pvpbuf);
  1536. X                  if (pvp == NULL)
  1537. X                      continue;
  1538. X!                 rewrite(pvp, 3);
  1539. X                  p = q;
  1540. X                  while (*p != '\0')
  1541. X                  {
  1542. X--- 586,592 ----
  1543. X                  pvp = prescan(++p, ',', pvpbuf);
  1544. X                  if (pvp == NULL)
  1545. X                      continue;
  1546. X!                 /* rewrite(pvp, 3); */
  1547. X                  p = q;
  1548. X                  while (*p != '\0')
  1549. X                  {
  1550. X***************
  1551. X*** 647,654 ****
  1552. X      **  commands.  This will never return.
  1553. X      */
  1554. X  
  1555. X!     if (OpMode == MD_SMTP)
  1556. X!         smtp();
  1557. X  # endif SMTP
  1558. X  
  1559. X      /*
  1560. X--- 664,676 ----
  1561. X      **  commands.  This will never return.
  1562. X      */
  1563. X  
  1564. X!     if (OpMode == MD_SMTP || OpMode == MD_BSMTP) {
  1565. X!         bool batched = (OpMode == MD_BSMTP);
  1566. X!         OpMode = MD_SMTP;
  1567. X!         /* have to run unbuffered or else will lose synchronization */
  1568. X!         setbuf(InChannel, (char *) NULL);
  1569. X!         smtp(batched);
  1570. X!     }
  1571. X  # endif SMTP
  1572. X  
  1573. X      /*
  1574. X***************
  1575. X*** 787,798 ****
  1576. X  **        initializes several macros to be themselves.
  1577. X  */
  1578. X  
  1579. X- struct metamac
  1580. X- {
  1581. X-     char    metaname;
  1582. X-     char    metaval;
  1583. X- };
  1584. X- 
  1585. X  struct metamac    MetaMacros[] =
  1586. X  {
  1587. X      /* LHS pattern matching characters */
  1588. X--- 809,814 ----
  1589. X***************
  1590. X*** 805,812 ****
  1591. X      /* the conditional operations */
  1592. X      '?', CONDIF,    '|', CONDELSE,    '.', CONDFI,
  1593. X  
  1594. X!     /* and finally the hostname lookup characters */
  1595. X      '[', HOSTBEGIN,    ']', HOSTEND,
  1596. X  
  1597. X      '\0'
  1598. X  };
  1599. X--- 821,829 ----
  1600. X      /* the conditional operations */
  1601. X      '?', CONDIF,    '|', CONDELSE,    '.', CONDFI,
  1602. X  
  1603. X!     /* and finally the hostname and database lookup characters */
  1604. X      '[', HOSTBEGIN,    ']', HOSTEND,
  1605. X+     '(', KEYBEGIN,    ')', KEYEND,
  1606. X  
  1607. X      '\0'
  1608. X  };
  1609. END_OF_ida/patches/main.c.diff
  1610. if test 3868 -ne `wc -c <ida/patches/main.c.diff`; then
  1611.     echo shar: \"ida/patches/main.c.diff\" unpacked with wrong size!
  1612. fi
  1613. # end of overwriting check
  1614. fi
  1615. if test -f ida/patches/recipient.c.diff -a "${1}" != "-c" ; then 
  1616.   echo shar: Will not over-write existing file \"ida/patches/recipient.c.diff\"
  1617. else
  1618. echo shar: Extracting \"ida/patches/recipient.c.diff\" \(4813 characters\)
  1619. sed "s/^X//" >ida/patches/recipient.c.diff <<'END_OF_ida/patches/recipient.c.di
  1620. ff'
  1621. X*** recipient.c.orig    Fri Mar 13 18:51:10 1987
  1622. X--- recipient.c    Mon May 25 15:51:43 1987
  1623. X***************
  1624. X*** 342,347 ****
  1625. X--- 342,350 ----
  1626. X  **        may modify name.
  1627. X  */
  1628. X  
  1629. X+ #define WORST_MATCH    -2        /* even worse than no match */
  1630. X+ #define NO_UID        -999        /* any "impossible" uid will do
  1631.  */
  1632. X+ 
  1633. X  struct passwd *
  1634. X  finduser(name)
  1635. X      char *name;
  1636. X***************
  1637. X*** 348,356 ****
  1638. X--- 351,364 ----
  1639. X  {
  1640. X      register struct passwd *pw;
  1641. X      register char *p;
  1642. X+     int best_match = WORST_MATCH;
  1643. X+     int best_uid = NO_UID;
  1644. X      extern struct passwd *getpwent();
  1645. X      extern struct passwd *getpwnam();
  1646. X+     extern struct passwd *getpwuid();
  1647. X  
  1648. X+     errno = 0;
  1649. X+ 
  1650. X      /* map upper => lower case */
  1651. X      for (p = name; *p != '\0'; p++)
  1652. X      {
  1653. X***************
  1654. X*** 358,363 ****
  1655. X--- 366,377 ----
  1656. X              *p = tolower(*p);
  1657. X      }
  1658. X  
  1659. X+ # ifdef DEBUG
  1660. X+     if (tTd(26, 6))
  1661. X+         printf("%s password entry for \"%s\"\n",
  1662. X+                getpwnam(name) ? "found" : "can't find", name);
  1663. X+ # endif DEBUG
  1664. X+ 
  1665. X      /* look up this login name using fast path */
  1666. X      if ((pw = getpwnam(name)) != NULL)
  1667. X          return (pw);
  1668. X***************
  1669. X*** 368,387 ****
  1670. X          if (*p == (SpaceSub & 0177) || *p == '_')
  1671. X              *p = ' ';
  1672. X      }
  1673. X      (void) setpwent();
  1674. X      while ((pw = getpwent()) != NULL)
  1675. X      {
  1676. X          char buf[MAXNAME];
  1677. X!         extern bool sameword();
  1678. X  
  1679. X          buildfname(pw->pw_gecos, pw->pw_name, buf);
  1680. X!         if (index(buf, ' ') != NULL && sameword(buf, name))
  1681. X!         {
  1682. X!             message(Arpa_Info, "sending to login name %s", pw->pw_n
  1683. ame);
  1684. X!             return (pw);
  1685. X!         }
  1686. X      }
  1687. X!     return (NULL);
  1688. X  }
  1689. X   /*
  1690. X  **  WRITABLE -- predicate returning if the file is writable.
  1691. X--- 382,509 ----
  1692. X          if (*p == (SpaceSub & 0177) || *p == '_')
  1693. X              *p = ' ';
  1694. X      }
  1695. X+ # ifdef DEBUG
  1696. X+     if (tTd(26, 6))
  1697. X+         printf("looking for partial match to \"%s\"\n", name);
  1698. X+ # endif DEBUG
  1699. X      (void) setpwent();
  1700. X      while ((pw = getpwent()) != NULL)
  1701. X      {
  1702. X          char buf[MAXNAME];
  1703. X!         register int this_match;
  1704. X  
  1705. X          buildfname(pw->pw_gecos, pw->pw_name, buf);
  1706. X!         this_match = partialstring(buf, name);
  1707. X! # ifdef DEBUG
  1708. X!         if (tTd(26, 6 && this_match >= 0))
  1709. X!             printf("matched on level %d with \"%s\"\n",
  1710. X!                    this_match, buf);
  1711. X! # endif DEBUG
  1712. X!         if (this_match < best_match)
  1713. X!             continue;
  1714. X! 
  1715. X!         if (this_match > best_match) {
  1716. X!             best_match = this_match;
  1717. X!             best_uid = pw->pw_uid;
  1718. X!         } else
  1719. X!             best_uid = NO_UID;
  1720. X      }
  1721. X! # ifdef DEBUG
  1722. X!         if (tTd(26, 6))
  1723. X!             if (best_match == WORST_MATCH)
  1724. X!                 printf("no match, failing...\n");
  1725. X!             else if (best_uid == NO_UID)
  1726. X!                 printf("ambiguous match, failing...\n");
  1727. X!             else
  1728. X!                 printf("succeding on level %d...\n",
  1729. X!                        best_match);
  1730. X! # endif DEBUG
  1731. X! 
  1732. X!     if (best_uid == NO_UID)
  1733. X!         return (NULL);
  1734. X! 
  1735. X!     pw = getpwuid(best_uid);
  1736. X!     message(Arpa_Info, "sending to login name %s", pw->pw_name);
  1737. X!     return (pw);
  1738. X! }
  1739. X!  /*
  1740. X! **  PARTIALSTRING -- is one string of words contained by another?
  1741. X! **
  1742. X! **    See if one string of words can be found as part of
  1743. X! **    another string of words.  All substrings delimited by
  1744. X! **    one or more non-alphanumeric characters are considered
  1745. X! **    "words", and a partial match is such that all the words
  1746. X! **    of the pattern string are either full prefixes
  1747. X! **    of the target string.  Upper or lower case letters are
  1748. X! **    considered equal.
  1749. X! **
  1750. X! **    Parameters:
  1751. X! **        target -- target string
  1752. X! **        pattern -- pattern string
  1753. X! **
  1754. X! **    Returns:
  1755. X! **        The number of fully matched words, or -1 if none.
  1756. X! **
  1757. X! **    Side Effects:
  1758. X! **        None.
  1759. X! **
  1760. X! */
  1761. X! 
  1762. X! partialstring(target, pattern)
  1763. X!     char *target;
  1764. X!     char *pattern;
  1765. X! {
  1766. X!     register char *t, *p, *q;
  1767. X!     int full_words = 0;
  1768. X! 
  1769. X!     /* skip initial delimiters */
  1770. X!     for (t = target; *t != '\0' && !isalnum(*t); t++);
  1771. X!     for (p = pattern; *p != '\0' && !isalnum(*p); p++);
  1772. X!     q = p;
  1773. X! 
  1774. X!     while (*t != '\0' && *p != '\0') {
  1775. X!     /*
  1776. X!      * if at end of pattern word, find next, remember it,
  1777. X!      * and eat the current target word
  1778. X!      */
  1779. X!     if (!isalnum(*p)) {
  1780. X!         while (*p != '\0' && !isalnum(*p)) p++;
  1781. X!         if (*p == '\0')
  1782. X!         continue;
  1783. X!         q = p;
  1784. X!         if (!isalnum(*t)) {
  1785. X!         full_words++;
  1786. X!         }
  1787. X!         while (*t != '\0' && isalnum(*t)) t++;
  1788. X!         while (*t != '\0' && !isalnum(*t)) t++;
  1789. X!         continue;
  1790. X!     }
  1791. X! 
  1792. X!     /*
  1793. X!      * if match, advance both pointers
  1794. X!      */
  1795. X!     if ((isupper(*t) ? tolower(*t) : *t) ==
  1796. X!         (isupper(*p) ? tolower(*p) : *p)) {
  1797. X!         t++, p++;
  1798. X!         continue;
  1799. X!     }
  1800. X! 
  1801. X!     /*
  1802. X!      * if no match, backtrack to last unmatched pattern word and
  1803. X!      * eat current target word
  1804. X!      */
  1805. X!     p = q;
  1806. X!     while (*t != '\0' && isalnum(*t)) t++;
  1807. X!     while (*t != '\0' && !isalnum(*t)) t++;
  1808. X!     }
  1809. X! 
  1810. X!     /*
  1811. X!      * now, the pattern should be fully consumed if there was a match
  1812. X!      */
  1813. X!     if (*p == '\0')
  1814. X!     return isalnum(*t) ? full_words : full_words + 1;
  1815. X!     else
  1816. X!     return -1;
  1817. X  }
  1818. X   /*
  1819. X  **  WRITABLE -- predicate returning if the file is writable.
  1820. END_OF_ida/patches/recipient.c.diff
  1821. if test 4813 -ne `wc -c <ida/patches/recipient.c.diff`; then
  1822.     echo shar: \"ida/patches/recipient.c.diff\" unpacked with wrong size!
  1823. fi
  1824. # end of overwriting check
  1825. fi
  1826. if test -f ida/patches/srvrsmtp.c.diff -a "${1}" != "-c" ; then 
  1827.   echo shar: Will not over-write existing file \"ida/patches/srvrsmtp.c.diff\"
  1828. else
  1829. echo shar: Extracting \"ida/patches/srvrsmtp.c.diff\" \(4951 characters\)
  1830. sed "s/^X//" >ida/patches/srvrsmtp.c.diff <<'END_OF_ida/patches/srvrsmtp.c.diff
  1831. '
  1832. X*** srvrsmtp.c.orig    Fri Mar 13 18:51:13 1987
  1833. X--- srvrsmtp.c    Mon May 25 15:51:49 1987
  1834. X***************
  1835. X*** 95,101 ****
  1836. X  
  1837. X  #define EX_QUIT        22        /* special code for QUIT comman
  1838. d */
  1839. X  
  1840. X! smtp()
  1841. X  {
  1842. X      register char *p;
  1843. X      register struct cmd *c;
  1844. X--- 95,102 ----
  1845. X  
  1846. X  #define EX_QUIT        22        /* special code for QUIT comman
  1847. d */
  1848. X  
  1849. X! smtp(batched)
  1850. X!     bool batched;            /* running non-interactively? */
  1851. X  {
  1852. X      register char *p;
  1853. X      register struct cmd *c;
  1854. X***************
  1855. X*** 107,112 ****
  1856. X--- 108,114 ----
  1857. X      ADDRESS *a;
  1858. X      char inp[MAXLINE];
  1859. X      char cmdbuf[100];
  1860. X+     char hostbuf[MAXNAME];        /* for host name transformations */
  1861. X      extern char Version[];
  1862. X      extern tick();
  1863. X      extern bool iswiz();
  1864. X***************
  1865. X*** 194,200 ****
  1866. X            case CMDHELO:        /* hello -- introduce yourself */
  1867. X              SmtpPhase = "HELO";
  1868. X              setproctitle("%s: %s", CurHostName, inp);
  1869. X!             if (sameword(p, MyHostName))
  1870. X              {
  1871. X                  /* connected to an echo server */
  1872. X                  message("553", "%s I refuse to talk to myself",
  1873. X--- 196,205 ----
  1874. X            case CMDHELO:        /* hello -- introduce yourself */
  1875. X              SmtpPhase = "HELO";
  1876. X              setproctitle("%s: %s", CurHostName, inp);
  1877. X!             /* find canonical name */
  1878. X!             strcpy(hostbuf, p);
  1879. X!             maphostname(hostbuf, sizeof(hostbuf));
  1880. X!             if (sameword(hostbuf, MyHostName))
  1881. X              {
  1882. X                  /* connected to an echo server */
  1883. X                  message("553", "%s I refuse to talk to myself",
  1884. X***************
  1885. X*** 201,226 ****
  1886. X                      MyHostName);
  1887. X                  break;
  1888. X              }
  1889. X!             if (RealHostName != NULL && !sameword(p, RealHostName))
  1890. X              {
  1891. X-                 char hostbuf[MAXNAME];
  1892. X- 
  1893. X                  (void) sprintf(hostbuf, "%s (%s)", p, RealHostN
  1894. ame);
  1895. X!                 define('s', newstr(hostbuf), CurEnv);
  1896. X              }
  1897. X-             else
  1898. X-                 define('s', newstr(p), CurEnv);
  1899. X-             message("250", "%s Hello %s, pleased to meet you",
  1900. X-                 MyHostName, p);
  1901. X              break;
  1902. X  
  1903. X            case CMDMAIL:        /* mail -- designate sender */
  1904. X              SmtpPhase = "MAIL";
  1905. X  
  1906. X-             /* force a sending host even if no HELO given */
  1907. X-             if (RealHostName != NULL && macvalue('s', CurEnv) == NU
  1908. LL)
  1909. X-                 define('s', RealHostName, CurEnv);
  1910. X- 
  1911. X              /* check for validity of this command */
  1912. X              if (hasmail)
  1913. X              {
  1914. X--- 206,228 ----
  1915. X                      MyHostName);
  1916. X                  break;
  1917. X              }
  1918. X!             if (RealHostName != NULL &&
  1919. X!                 !sameword(p, RealHostName) &&
  1920. X!                 !sameword(hostbuf, RealHostName))
  1921. X              {
  1922. X                  (void) sprintf(hostbuf, "%s (%s)", p, RealHostN
  1923. ame);
  1924. X!                 CurHostName = newstr(hostbuf);
  1925. X!                 message("250", "Hello %s, why do you call yours
  1926. elf %s?",
  1927. X!                     RealHostName, p);
  1928. X!             } else {
  1929. X!                 CurHostName = newstr(p);
  1930. X!                 message("250", "Hello %s, pleased to meet you",
  1931.  p);
  1932. X              }
  1933. X              break;
  1934. X  
  1935. X            case CMDMAIL:        /* mail -- designate sender */
  1936. X              SmtpPhase = "MAIL";
  1937. X  
  1938. X              /* check for validity of this command */
  1939. X              if (hasmail)
  1940. X              {
  1941. X***************
  1942. X*** 237,242 ****
  1943. X--- 239,245 ----
  1944. X              if (runinchild("SMTP-MAIL") > 0)
  1945. X                  break;
  1946. X              initsys();
  1947. X+             define('s', CurHostName, CurEnv);
  1948. X              setproctitle("%s %s: %s", CurEnv->e_id,
  1949. X                  CurHostName, inp);
  1950. X  
  1951. X***************
  1952. X*** 260,266 ****
  1953. X                  CurHostName, inp);
  1954. X              if (setjmp(TopFrame) > 0)
  1955. X              {
  1956. X!                 CurEnv->e_flags &= ~EF_FATALERRS;
  1957. X                  break;
  1958. X              }
  1959. X              QuickAbort = TRUE;
  1960. X--- 263,270 ----
  1961. X                  CurHostName, inp);
  1962. X              if (setjmp(TopFrame) > 0)
  1963. X              {
  1964. X!                 if (!batched)
  1965. X!                     CurEnv->e_flags &= ~EF_FATALERRS;
  1966. X                  break;
  1967. X              }
  1968. X              QuickAbort = TRUE;
  1969. X***************
  1970. X*** 272,277 ****
  1971. X--- 276,282 ----
  1972. X                  break;
  1973. X              a->q_flags |= QPRIMARY;
  1974. X              a = recipient(a, &CurEnv->e_sendqueue);
  1975. X+ 
  1976. X              if (Errors != 0)
  1977. X                  break;
  1978. X  
  1979. X***************
  1980. X*** 291,303 ****
  1981. X              SmtpPhase = "DATA";
  1982. X              if (!hasmail)
  1983. X              {
  1984. X!                 message("503", "Need MAIL command");
  1985. X!                 break;
  1986. X              }
  1987. X              else if (CurEnv->e_nrcpts <= 0)
  1988. X              {
  1989. X!                 message("503", "Need RCPT (recipient)");
  1990. X!                 break;
  1991. X              }
  1992. X  
  1993. X              /* collect the text of the message */
  1994. X--- 296,314 ----
  1995. X              SmtpPhase = "DATA";
  1996. X              if (!hasmail)
  1997. X              {
  1998. X!                 message("503", "Need valid MAIL command");
  1999. X!                 if (batched)
  2000. X!                     Errors++;
  2001. X!                 else
  2002. X!                     break;
  2003. X              }
  2004. X              else if (CurEnv->e_nrcpts <= 0)
  2005. X              {
  2006. X!                 message("503", "Need valid RCPT (recipient)");
  2007. X!                 if (batched)
  2008. X!                     Errors++;
  2009. X!                 else
  2010. X!                     break;
  2011. X              }
  2012. X  
  2013. X              /* collect the text of the message */
  2014. X***************
  2015. X*** 327,339 ****
  2016. X              */
  2017. X  
  2018. X              SmtpPhase = "delivery";
  2019. X!             if (CurEnv->e_nrcpts != 1)
  2020. X              {
  2021. X                  HoldErrs = TRUE;
  2022. X                  ErrorMode = EM_MAIL;
  2023. X              }
  2024. X!             CurEnv->e_flags &= ~EF_FATALERRS;
  2025. X!             CurEnv->e_xfp = freopen(queuename(CurEnv, 'x'), "w", Cu
  2026. rEnv->e_xfp);
  2027. X  
  2028. X              /* send to all recipients */
  2029. X              sendall(CurEnv, SM_DEFAULT);
  2030. X--- 338,353 ----
  2031. X              */
  2032. X  
  2033. X              SmtpPhase = "delivery";
  2034. X!             if (CurEnv->e_nrcpts != 1 || batched)
  2035. X              {
  2036. X                  HoldErrs = TRUE;
  2037. X                  ErrorMode = EM_MAIL;
  2038. X              }
  2039. X!             if (!batched) {
  2040. X!                 CurEnv->e_flags &= ~EF_FATALERRS;
  2041. X!                 CurEnv->e_xfp = freopen(queuename(CurEnv, 'x'),
  2042. X!                             "w", CurEnv->e_xfp);
  2043. X!             }
  2044. X  
  2045. X              /* send to all recipients */
  2046. X              sendall(CurEnv, SM_DEFAULT);
  2047. END_OF_ida/patches/srvrsmtp.c.diff
  2048. if test 4951 -ne `wc -c <ida/patches/srvrsmtp.c.diff`; then
  2049.     echo shar: \"ida/patches/srvrsmtp.c.diff\" unpacked with wrong size!
  2050. fi
  2051. # end of overwriting check
  2052. fi
  2053. echo shar: End of archive 2 \(of 7\).
  2054. cp /dev/null ark2isdone
  2055. MISSING=""
  2056. for I in 1 2 3 4 5 6 7 ; do
  2057.     if test ! -f ark${I}isdone ; then
  2058.     MISSING="${MISSING} ${I}"
  2059.     fi
  2060. done
  2061. if test "${MISSING}" = "" ; then
  2062.     echo You have unpacked all 7 archives.
  2063.     echo "See ida/README and ida/INSTALL for further instructions."
  2064.     rm -f ark[1-9]isdone
  2065. else
  2066.     echo You still need to unpack the following archives:
  2067.     echo "        " ${MISSING}
  2068. fi
  2069. ##  End of shell archive.
  2070. exit 0
  2071.