home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / ida2 / part05 < prev    next >
Encoding:
Internet Message Format  |  1988-11-13  |  40.9 KB

  1. Subject:  v16i077:  IDA Sendmail kit, Part05/08
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Lennart Lovstrand <lovstran@arisia.xerox.com>
  7. Posting-number: Volume 16, Issue 77
  8. Archive-name: ida2/part05
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then unpack
  12. # it by saving it into a file and typing "sh file".  To overwrite existing
  13. # files, type "sh file -c".  You can also feed this as standard input via
  14. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  15. # will see the following message at the end:
  16. #        "End of archive 5 (of 8)."
  17. # Contents:  ida/lib/xaliases ida/patches/parseaddr.c.diff
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. if test -f ida/lib/xaliases -a "${1}" != "-c" ; then 
  20.   echo shar: Will not over-write existing file \"ida/lib/xaliases\"
  21. else
  22. echo shar: Extracting \"ida/lib/xaliases\" \(16825 characters\)
  23. sed "s/^X//" >ida/lib/xaliases <<'END_OF_ida/lib/xaliases'
  24. X##########################################################################
  25. X## Alias file for IDA.LiU.SE aka liuida.UUCP                ##
  26. X##########################################################################
  27. X#  Aliases in this file will NOT be expanded in message headers.
  28. X#
  29. X#  Aliases are recognized in any mix of upper and lower case,
  30. X#  since they are all converted to lower case.
  31. X#
  32. X#    >>>>>>>>>>    A consequence of the above line is that mail
  33. X#    >> BUG! >>    can't be aliased to addresses with capital
  34. X#    >>>>>>>>>>    letters (eg. files).
  35. X#
  36. X#    >>>>>>>>>>    The program "newaliases" may need to be run after
  37. X#    >> NOTE >>    this file is updated for any changes to
  38. X#    >>>>>>>>>>    show through to sendmail.
  39. X#
  40. X##
  41. X
  42. X# Following alias is required by the new mail protocol, RFC 822
  43. X# Set it to the address of a HUMAN who deals with this system's mail problems.
  44. XPostmaster@ida:        lel@ida
  45. XPostmaster:        Postmaster@ida
  46. X
  47. X# Alias for mailer daemon; returned messages from our MAILER-DAEMON
  48. X# should be routed to our local Postmaster.
  49. XMAILER-DAEMON, MAILER-DAEMON@ida:    Postmaster@ida
  50. X
  51. X# Aliases to handle mail to programs or files, eg news
  52. Xb-smtp, b-smtp@ida:    "|egrep '^#' | sed 's/^#//' | /usr/lib/sendmail -bs"
  53. Xdecode, decode@ida:    "|/usr/bin/uudecode"
  54. Xnamelist, namelist@ida:    "|/usr/lib/uucp/reclist"
  55. Xnobody, nobody@ida:    /dev/null
  56. Xrnews, rnews@ida:    "|/usr/lib/news/uurec"
  57. X
  58. Xxlp@ida, xlp-e-1tr@ida:    xlp-e-1tr-s@ida
  59. Xxlp-e-bv@ida:        xlp-e-bv-s@ida
  60. Xxlp-b-1tr@ida:        xlp-b-1tr-s@ida
  61. X
  62. Xxlp-e-1tr-e@ida:    "|/usr/lib/mail/mahafilter -Pxlp-e-1tr"
  63. Xxlp-e-bv-e@ida:        "|/usr/lib/mail/mahafilter -Pxlp-e-bv"
  64. Xxlp-b-1tr-e@ida:    "|/usr/lib/mail/mahafilter -Pxlp-b-1tr"
  65. X
  66. Xxlp-e-1tr-s@ida:    "|/usr/lib/mail/mahafilter -Pxlp-e-1tr -S"
  67. Xxlp-e-bv-s@ida:        "|/usr/lib/mail/mahafilter -Pxlp-e-bv -S"
  68. Xxlp-b-1tr-s@ida:    "|/usr/lib/mail/mahafilter -Pxlp-b-1tr -S"
  69. X
  70. Xalw, alw-e-1tr:        "|lpr -Palw"
  71. X
  72. X#########################################################################
  73. X# Specific mail -> news entries                        #
  74. X#########################################################################
  75. X
  76. Xtest-news@ida:        "|/usr/lib/news/inews -h -n test"
  77. X
  78. Xida-mac@ida:        "|/usr/lib/news/altrecnews ida.mac"
  79. X
  80. Xowner-ida-mac@ida:    Postmaster@ida
  81. X
  82. X#########################################################################
  83. X# Misc generic system users                        #
  84. X#########################################################################
  85. X
  86. Xnews, news@ida:        Postmaster@ida
  87. Xusenet, usenet@ida:    Postmaster@ida
  88. Xdaemon, daemon@ida:    Postmaster@ida
  89. Xuucp, uucp@ida:        Postmaster@ida
  90. X
  91. X#########################################################################
  92. X# Misc mail group links                            #
  93. X#########################################################################
  94. X
  95. XIDA, IDA@IDA, IDA@LiU.SE:    IDA@LISBET
  96. XADB@ida:            ADB@LISBET
  97. XAIELAB@ida, AILAB@ida:        AIELAB@LISBET
  98. XASLAB@ida:            ASLAB@LISBET
  99. XCADLAB@ida:            CADLAB@LISBET
  100. XLIBLAB@ida:            LIBLAB@LISBET
  101. XNLPLAB@ida:            NLPLAB@LISBET
  102. XPELAB@ida:            PELAB@LISBET
  103. XRKLLAB@ida, RKL@ida:        RKLLAB@LISBET
  104. X
  105. Xowner-IDA, owner-IDA@IDA, owner-IDA@LiU.SE:    Postmaster@ida
  106. Xowner-ADB@ida:            Postmaster@ida
  107. Xowner-AIELAB@ida:        Postmaster@ida
  108. Xowner-ASLAB@ida:        Postmaster@ida
  109. Xowner-CADLAB@ida:        Postmaster@ida
  110. Xowner-LIBLAB@ida:        Postmaster@ida
  111. Xowner-NLPLAB@ida:        Postmaster@ida
  112. Xowner-PELAB@ida:        Postmaster@ida
  113. X
  114. X#########################################################################
  115. X# Arpanet mail group links                        #
  116. X#########################################################################
  117. X
  118. Xakt@ida:            AKT@LISBET
  119. XARPAnet-BBoards@ida:        ARPANET-BBOARDS@LISBET
  120. XExPhi-Group@ida:        :include:/usr/lib/mail/groups/exphi-group
  121. XHorse-List@ida:            HORSE-LIST@LISBET
  122. XIDA-Info-1100@ida:        :include:/usr/lib/mail/groups/ida-info-1100
  123. XIDA-Bug-1100@ida:        BUG-1100@LISBET
  124. Xida-info-gnu@ida:        :include:/usr/lib/mail/groups/ida-info-gnu
  125. XInfo-Postscript@ida:        INFO-POSTSCRIPT@LISBET
  126. Xlll@ida:            LASER-LOVERS@LISBET, Leif.Finmo@IDA
  127. XMusic-Research@ida:        MUSIC-RESEARCH@LISBET, JANNE@TOKER
  128. XNL-KR@ida:            NL-KR@LISBET
  129. XParsym@ida:            PARSYM@LISBET
  130. XProlog-Digest@ida:        PROLOG-DIGEST@LISBET
  131. XPsychNet@ida:            PsychNet@LISBET
  132. XSMAuG@ida:            SMAuG@LISBET
  133. Xsunflash@ida:            :include: /usr/lib/mail/groups/sunflash
  134. XTekTCP@ida:            TEKTCP@LISBET
  135. XTeXHAX@ida:            TEXHAX@LISBET, Arne.Faldt@IDA
  136. Xtester@ida:            :include:/usr/lib/mail/groups/foo
  137. XTOPS-20-Experts@ida:        lenlo@ida, arnfa@ida
  138. XTransputer@ida:            Transputer@LISBET, "|/usr/lib/news/altrecnews -h -a daemon@ida.liu.se -n fa.transputer"
  139. X
  140. Xowner-akt@ida:            Postmaster@ida
  141. Xowner-ARPAnet-BBoards@ida:    Postmaster@ida
  142. Xowner-ExPhi-Group@ida:        Postmaster@ida
  143. Xowner-Horse-List@ida:        Postmaster@ida
  144. Xowner-IDA-Info-1100@ida:    Postmaster@ida
  145. Xowner-IDA-Bug-1100@ida:        Postmaster@ida
  146. Xowner-ida-info-gnu@ida:        Postmaster@ida
  147. Xowner-Info-Postscript@ida:    Postmaster@ida
  148. Xowner-lll@ida:            Postmaster@ida
  149. Xowner-Music-Research@ida:    Postmaster@ida
  150. Xowner-nl-kr@ida:        Postmaster@ida
  151. Xowner-parsym@ida:        Postmaster@ida
  152. Xowner-prolog-digest@ida:    Postmaster@ida
  153. Xowner-psychnet@ida:        Postmaster@ida
  154. Xowner-SMAuG@ida:        Postmaster@ida
  155. Xowner-sunflash@ida:        Postmaster@ida
  156. Xowner-TekTCP@ida:        Postmaster@ida
  157. Xowner-TeXHAX@ida:        Postmaster@ida
  158. Xowner-tester@ida:        lel@ida
  159. Xowner-TOPS-20-Experts@ida:    Postmaster@ida
  160. Xowner-Transputer@ida:        Postmaster@ida
  161. X
  162. X#########################################################################
  163. X# Individual local aliases                        #
  164. X#########################################################################
  165. X
  166. Xlennart:        lenlo
  167. Xlin-p:            linpa                (Lin Padgham)
  168. X
  169. Xbly@ida:        jbl@ida                (Bryan Lyles)
  170. Xbud@ida:        hla@ida                (Harald Lawson)
  171. Xes@ida:            ejs@ida                (Erik Sandewall)
  172. Xjac@ida:        lel@ida                (Jacek's mail sent to LeL)
  173. Xjanba@ida:        lel@ida                (Janell's mail sent to lel)
  174. Xjim@ida:        jwg@ida                (James W Goodwin)
  175. Xlpa@ida:        lin@ida                (Lin Padgham)
  176. Xola@ida:        olast@ida
  177. Xpeter-f@ida:        petfr@majestix            (Peter Fritzsons bror, suck)
  178. Xralf@ida:        rni@ida                (Ralf Nilsson)
  179. Xralf-n@ida:        rni@ida                (Ralf Nilsson)
  180. Xralf_n@ida:        rni@ida                (Ralf Nilsson)
  181. Xrolf-k@ida:        rolka@ida            (Rolf Karlsson)
  182. Xsandewal@ida:        ejs@ida                (Erik Sandewall)
  183. Xsandewall@ida:        ejs@ida                (Erik Sandewall)
  184. X
  185. XvaxTest@ida:        lennart@hazel            (testing, testing...)
  186. X
  187. X# Temporary due to enea/seismo lossage
  188. Xj-maluszynski@ida:    J-MALUSZYNSKI@LISBET
  189. Xl-lovstrand@ida:    L-LOVSTRAND@LISBET
  190. Xw-drabent@ida:        W-DRABENT@LISBET
  191. X
  192. X
  193. X#########################################################################
  194. X# Signature aliases                            #
  195. X#                                    #
  196. X# The format here is:                            #
  197. X#    signature, altsign, full.name: alias-list            #
  198. X# where alias-list is a comma and/or newline-separated list of user    #
  199. X# names.  Each user name may be headed by a '<' and/or '>' with the    #
  200. X# following meaning:                            #
  201. X#     > user -- mail to this sign/full.name is delivered to the user    #
  202. X#    <  user -- mail from this user is rewritten with the signature    #
  203. X#           as new sender                    #
  204. X#    <> user -- the combination of the above                #
  205. X#       user -- same as '> user'                    #
  206. X#                                    #
  207. X# BE AWARE!  This special '<>' syntax is quite in antagony with RFC822    #
  208. X#         and was adapted only for its simplicity.  Any suggestions    #
  209. X#         for an alternative syntax are warmly welcomed.        #
  210. X#########################################################################
  211. X
  212. Xaha@ida, andha@ida, Anders.Haraldsson@ida:    <> A-HARALDSSON@LISBET
  213. Xajl@ida, andli@ida, Andrzej.Lingas@ida, lingas@ida: <> A-LINGAS@LISBET
  214. Xaka@ida, andka@ida, Andreas.Kagedal@ida:    <> A-KAGEDAL@LISBET
  215. Xalu@ida, andlu@ida, Anders.Lundberg@ida:    <> A-LUNDBERG@LISBET
  216. Xamj@ida, annja@ida, Anne-Marie.Jacobsson@ida:    <> AM-JACOBSON@LISBET
  217. Xany@ida, andny@ida, Anders.Nyberg@ida:        <> A-NYBERG@LISBET, < andny
  218. Xaoa@ida, andal@ida, Anders.Aleryd@ida:        <> A-ALERYD@LISBET, < andal
  219. Xara@ida, andra@ida, Anders.Rantila@ida:        <> A-RANTILA@LISBET, < ara
  220. Xarf@ida, arnfa@ida, Arne.Faldt@ida:        <> A-FAELDT@LISBET, <> arnfa
  221. Xarj@ida, arnjo@ida, Arne.Jonsson@ida:        <> ARNE-J@LISBET, < arnjo
  222. Xaro@ida, annro@ida, Annie.Rostlinger@ida:    <> A-ROSTLINGER@LISBET
  223. X#-- saknar userid!
  224. Xast@ida, arnst@ida, Arne.Stahre@ida:        <> A-STAHRE@LISBET, < arnst
  225. Xato@ida, andto@ida, Anders.Torne@ida:        <> A-TORNE@LISBET
  226. Xava@ida, arjva@ida, Arja.Vainio-Larsson@ida:     <> A-VAINIO@LISBET
  227. Xban@ida, bjoni@ida, Bjorn.Nilsson@ida:        <> B-NILSSON@LISBET, < bjoni
  228. Xbaw@ida, andwi@ida, Andreas.Wickberg@ida:    <> A-WICKBERG@LISBET, < andwi
  229. Xbda@ida, birda@ida, Birgitta.Dahlgren@ida:     <> B-DAHLGREN@LISBET
  230. Xbek@ida, barek@ida, Barbara.Ekman@ida:        <> BARBARA@LISBET
  231. Xbfa@ida, bjofj@ida, Bjorn.Fjellborg@ida, bfj@ida: <> B-FJELLBORG@LISBET
  232. Xbkn@ida, berni@ida, Bernt.Nilsson@ida:        <> BERNT-N@LISBET, < berni
  233. Xbln@ida, benle@ida, Bengt.Lennartsson@ida:    < BENGT@LISBET, <> bln
  234. Xbma@ida, briah@ida, Britt-Marie.Ahlenback@ida:    <> BM-AHLENBECK@LISBET
  235. Xbmk@ida, bodma@ida, Bodil.Mattson-Kihlstrom@ida: <> B-KIHLSTROM@LISBET
  236. Xbod@ida, benod@ida, Benny.Odenteg@ida:        <> B-ODENTEG@LISBET
  237. Xbol@ida, birol@ida, Birgitta.Olander@ida, bio@ida: <> B-OLANDER@LISBET, < birol
  238. Xbro@ida, borro@ida, Borje.Rosenberg@ida:    <> B-ROSENBERG@LISBET
  239. Xbsu@ida, bosu@ida, Bo.Sundgren@ida:        <> B-SUNDGREN@LISBET
  240. Xcba@ida, chrba@ida, Christer.Backstrom@ida:    <> C-BACKSTROM@LISBET
  241. Xccg@ida, chrgn@ida, Christian.Gnosspelius@ida:    <> C-GNOSSPELIUS@LISBET, < chrgn
  242. Xcha@ida, chrha@ida, Christer.Hansson@ida:    <> C-HANSSON@LISBET, < chrha
  243. Xchl@ida, chrle@ida, Christos.Levcopoulos@ida:    <> CHRISTOS@LISBET, < chrle
  244. Xcib@ida, carbj@ida, Carina.Bjorkman@ida:    <> CARINA@LISBET
  245. Xcil@ida, clail@ida, Claes.Illergard@ida:    <> C-ILLERGARD@LISBET, < clail
  246. Xckr@ida, chrkr@ida, Christian.Krysander@ida:    <> CHRISTIAN@LISBET, < chrkr
  247. Xdbu@ida, doubu@ida, Douglas.Busch@ida:        <> D-BUSCH@LISBET
  248. Xddr@ida, dimdr@ida, Dimiter.Driankov@ida:    <> D-DRIANKOV@LISBET, < dimdr
  249. Xdif@ida, dimfo@ida, Dimitrios.Fotiades@ida:    <> DIMITRIOS@LISBET, < dimfo
  250. Xeat@ida, erite@ida, Erik.Tengvald@ida:        <> E-TENGVALD@LISBET, < erite
  251. Xecs@ida, evasv@ida, Eva-Chris.Svensson@ida:    <> EVA-CHRIS@LISBET
  252. Xejs@ida, erisa@ida, Erik.Sandewall@ida:        <> E-SANDEWALL@LISBET, < erisa
  253. Xeno@ida, erlno@ida, Erling.Nordmark@ida:    <> E-NORDMARK@LISBET
  254. Xfli@ida, freli@ida, Fredrik.Lindstrom@ida:    <> F-LINDSTROM@LISBET
  255. Xggo@ida, gorgo@ida, Goran.Goldkuhl@ida:        <> G-GOLDKUHL@LISBET
  256. Xgka@ida, gorka@ida, Goran.Karlsson@ida:        <> G-KARLSON@LISBET
  257. Xglt@ida, gunli@ida, Gunilla.Lingenhult@ida:    <> G-LINGENHULT@LISBET
  258. Xgni@ida, gosni@ida, Gosta.Nilsson@ida:        <> G-NILSSON@LISBET
  259. Xher@ida, hener@ida, Henrik.Eriksson@ida:    <> H-ERIKSSON@LISBET, < her
  260. Xhbl@ida, hanbl@ida, Hans.Block@ida:        <> H-BLOCK@LISBET
  261. Xheh@ida, hanho@ida, Hans.Holmgren@ida:        <> H-HOLMGREN@LISBET, < hanho
  262. Xhjk@ida, janko@ida, Jan.Komorowski@ida:        <> J-KOMOROWSKI@LISBET
  263. Xhla@ida, harla@ida, Harold.Lawson@ida, budla@ida, Bud.Lawson@ida: <> BUD@LISBET, < harla
  264. Xhno@ida, henno@ida, Henrik.Nordin@ida:        <> H-NORDIN@LISBET, < henno
  265. Xhst@ida, hakst@ida, Hakan.Straaf@ida:        <> H-STRAAF@LISBET
  266. Xime@ida, ingem@ida, Inger.Emanuelson@ida:    <> INGER@LISBET, < ingem
  267. Xira@ida, ivara@ida, Ivan.Rankin@ida:        <> I-RANKIN@LISBET, < ivara
  268. Xjas@ida, johan@ida, Johan.Andersson@ida:    <> JOHAN@LISBET, < johan
  269. Xjbl@ida, bryly@ida, Bryan.Lyles@ida:        > Lyles.wbst@Xerox.COM
  270. X#-- tills vidare
  271. Xjfa@ida, johfa@ida, Johan.Fagerstrom@ida:    <> J-FAGERSTROM@LISBET, < johfa
  272. Xjhu@ida, johhu@ida, Johan.Hultman@ida:        <> J-HULTMAN@LISBET, < johhu
  273. Xjlo@ida, jonlo@ida, Jonas.Lowgren@ida:        <> J-LOWGREN@LISBET, < jlo
  274. Xjma@ida, jalma@ida, Jalal.Maleki@ida:        <> JALAL@LISBET, < jalma
  275. Xjmz@ida, janma@ida, Jan.Maluszynski@ida:    <> J-MALUSZYNSKI@LISBET, < janma
  276. Xjwc@ida, jonwa@ida, Jonas.Wallgren@ida:        <> J-WALLGREN@LISBET
  277. Xjwg@ida, jamgo@ida, James.Goodwin@ida, James.W.Goodwin@ida, jimgo@ida, Jim.Goodwin@ida: <> JIM@LISBET, < jimgo
  278. Xkku@ida, krzku@ida, Krzysztof.Kuchcinski@ida, krk@ida: <> K-KUCHCINSKI@LISBET, < krzku
  279. Xkol@ida, kerol@ida, Kerstin.Olsson@ida:        <> K-OLSSON@LISBET, < kerol
  280. Xkre@ida, krier@ida, Kristina.Ernstsson@ida:    <> KRISTINA@LISBET, < krier
  281. Xkrs@ida, krisa@ida, Kristian.Sandahl@ida:    <> K-SANDAHL@LISBET, < krisa
  282. Xkry@ida, kevry@ida, Kevin.Ryan@ida:        <> K-RYAN@LISBET, < kevry
  283. Xksd@ida, katsu@ida, Katarina.Sunnerud@ida:    <> KATARINA@LISBET, < katsu
  284. Xlah@ida, larah@ida, Lars.Ahrenberg@ida:        <> L-AHRENBERG@LISBET
  285. Xlbe@ida, larbe@ida, Lars.Bengtsson@ida:        <> L-BENGTSSON@LISBET, < larbe
  286. Xlbf@ida, leifi@ida, Leif.Finmo@ida:        <> LEIF@LISBET, < leifi
  287. Xlbj@ida, lisbj@ida, Lisbet.Bjorklund@ida:    <> L-BJORKLUND@LISBET
  288. Xlel@ida, lenlo@ida, Lennart.Lovstrand@ida:    <> L-LOVSTRAND@LISBET,
  289. X    < lel@obelix, < LENNART@HAZEL, <> lenlo
  290. Xlew@ida, lilwa@ida, Lillemor.Wallgren@ida:    <> LILLEMOR@LISBET
  291. Xlin@ida, linpa@ida, Lin.Padgham@ida:        < L-PADGHAM@LISBET, <> linpa
  292. Xlli@ida, lisli@ida, Lisbeth.Linge@ida:        <> LISBETH@LISBET
  293. Xlra@ida, lisra@ida, Lise-Lotte.Raunio@ida:    <> L-RAUNIO@LISBET
  294. Xlro@ida, lenro@ida, Lennart.Rohlin@ida:        <> L-ROHLIN@LISBET
  295. Xlst@ida, larst@ida, Lars.Stromberg@ida:        <> L-STROMBERG@LISBET, < larst
  296. Xlwi@ida, larwi@ida, Lars.Wikstrand@ida:        <> L-WIKSTRAND@LISBET
  297. Xmak@ida, marka@ida, Mariam.Kamkar@ida:        <> MARIAM@LISBET, < marka
  298. Xmgw@ida, matwi@ida, Mats.Wiren@ida:        <> M-WIREN@LISBET, < matwi
  299. Xmij@ida, maljo@ida, Malin.Johansson@ida:    <> MALIN@LISBET
  300. Xmip@ida, mikpa@ida, Mikael.Patel@ida:        <> MIKAEL@LISBET, < mikpa
  301. Xmja@ida, manja@ida, Manny.Jagerfeld@ida:    <> M-JAGERFELD@LISBET
  302. Xmme@ida, magme@ida, Magnus.Merkel@ida:        <> M-MERKEL@LISBET
  303. Xmre@ida, micre@ida, Michael.Reinfrank@ida:    <> M-REINFRANK@LISBET
  304. X# reinfra@ztivax.UUCP
  305. Xmru@ida, matru@ida, Mats.Rundquist@ida:        <> M-RUNDQUIST@LISBET, < mru
  306. Xmsa@ida, matan@ida, Mats.S.Andersson@ida, masan@ida, Mats.Andersson@ida: <> MATS@LISBET, < msa
  307. Xmsv@ida, miksv@ida, Mikael.Svensson@ida:    <> M-SVENSSON@LISBET, < miksv
  308. Xnda@ida, nilda@ida, Nils.Dahlback@ida:        <> N-DAHLBACK@LISBET
  309. Xnka@ida, naika@ida, Nail.Kavak@ida:        <> N-KAVAK@LISBET, < naika
  310. Xnos@ida, nossh@ida, Nosrat.Shahsavar@ida:    <> N-SHAHSAVAR@LISBET, < nos
  311. Xnsh@ida, nahsh@ida, Nahid.Shahmehri@ida:    <> NAHID@LISBET, < nahsh
  312. Xoha@ida, oveha@ida, Ove.Hanebring@ida:        <> O-HANEBRING@LISBET
  313. Xope@ida, olape@ida, Ola.Petersson@ida:        <> O-PETERSSON@LISBET
  314. Xowl@ida, ollwi@ida, Olle.Willen@ida:        <> OLLE-W@LISBET, < ollwi
  315. Xpab@ida, petab@ida, Peter.Aberg@ida:        <> P-ABERG@LISBET, < pab
  316. Xpaf@ida, petfr@ida, Peter.Fritzson@ida:        < P-FRITZSON@LISBET, <> petfr
  317. Xpdy@ida, patdo@ida, Patrick.Doherty@ida, pdo@ida: <> P-DOHERTY@LISBET, < patdo
  318. X#pem@ida, parem@ida, Par.Emanuelson@ida:    <> PAER@LISBET
  319. Xpha@ida, petha@ida, Peter.Haneklou@ida:        <> P-HANEKLO@LISBET, < petha
  320. Xphj@ida, hakja@ida, Hakan.Jakobsson@ida:    <> H-JAKOBSSON@LISBET, < hakja
  321. Xpjn@ida, pejni@ida, Peter.J.Nilsson@ida:    <> PJ-NILSSON@LISBET, <> pjn, < PJN@HAZEL
  322. Xplo@ida, petlo@ida, Peter.Loborg@ida:        <> P-LOBORG@LISBET
  323. Xpkw@ida, kriwa@ida, Kristian.Wallin@ida:    <> K-WALLIN@LISBET
  324. Xplv@ida, pablo@ida, Pablo.Lozan-Villegas@ida:    <> P-LOZAN-VILLEGAS@LISBET
  325. Xpsn@ida, pesni@ida, Peter.S.Nilsson@ida, pni@ida: <> P-NILSSON@LISBET, < pesni
  326. X# vilken g{ller?  'psn' torde vara b{ttre (med tanke p} 'pjn')
  327. Xpso@ida, palso@ida, Pal.Sorgaard@ida:        <> P-SORGAARD@LISBET
  328. Xpuo@ida, perov@ida, Per.Overnas@ida:        <> PER@LISBET, < perov
  329. Xrhj@ida, rolhj@ida, Roland.Hjerppe@ida:        <> R-HJERPPE@LISBET, < rolhj
  330. Xrka@ida, rolka@ida, Rolf.Karlsson@ida:        <> R-KARLSSON@LISBET, < rolka
  331. Xrni@ida, ralni@ida, Ralf.Nilsson@ida:        <> ralni, < RALF-N@LISBET
  332. X#-- slutat
  333. Xrob@ida, robbi@ida, Rober.Bilos@ida:        <> ROBER@LISBET, < robbi
  334. Xron@ida, rolni@ida, Rolf.Nilsson@ida:        <> R-NILSSON@LISBET
  335. Xrre@ida, rolre@ida, Roland.Rehmnert@ida:    <> R-REHMNERT@LISBET, < rolre
  336. Xsbo@ida, stabo@ida, Staffan.Bonnier@ida:    <> S-BONNIER@LISBET, < stabo
  337. Xrrq@ida, ralro@ida, Ralph.Ronnquist@ida:    <> RALPH-RONNQUIST@LISBET, < ralro
  338. Xrzo@ida, rogzo@ida, Roger.Zollner@ida:        <> R-ZOLLNER@LISBET
  339. Xsha@ida, steha@ida, Stefan.Hammar@ida:        <> S-HAMMAR@LISBET
  340. Xsic@ida, shach@ida, Shamsul.Chowdhury@ida:    <> SHAMSUL@LISBET, < shach
  341. Xsmn@ida, svemo@ida, Sven.Moen@ida:        < S-MOEN@LISBET, <> svemo
  342. Xsnt@ida, simna@ida, Simin.Nadjm-Tehrani@ida:    <> S-NADJM-TEHRANI@LISBET, < snt
  343. Xsos@ida, olast@ida, Ola.Stromfors@ida:        < OLA@LISBET, <> ola
  344. Xsso@ida, sivso@ida, Siv.Soderlund@ida:        <> S-SODERLUND@LISBET
  345. Xsth@ida, stuha@ida, Sture.Hagglund@ida:        <> STURE@LISBET, < stuha
  346. Xswr@ida, stewr@ida, Stefan.Wrammerfors@ida:    <> stewr
  347. Xtao@ida, tomol@ida, Tommy.Olsson@ida:        <> TOMMY@LISBET, < tao
  348. Xtha@ida, timha@ida, Tim.Hansen@ida:        <> T-HANSEN@LISBET
  349. Xtla@ida, tonla@ida, Tony.Larsson@ida:        <> T-LARSSON@LISBET, < tonla
  350. Xton@ida, torna@ida, Torbjorn.Naslund@ida, tna@ida: < T-NASLUND@LISBET, <> torna
  351. Xtoh@ida, tomoh@ida, Tommy.Ohlsson@ida:        <> T-OHLSSON@LISBET
  352. Xtor@ida, totna@ida, Torbjorn.Naslund.ADB@ida:    <> TORBJORN-NASLUND-ADB@LISBET
  353. Xtps@ida, tomso@ida, Tomas.Sokolnicki@ida:    <> T-SOKOLNICKI@LISBET
  354. Xtri@ida, tomri@ida, Tom.Rindborg@ida:        <> T-RINDBORG@LISBET, < tomri
  355. Xtti@ida, tooti@ida, Toomas.Timpka@ida:        <> T-TIMPKA@LISBET
  356. Xuda@ida, ulfda@ida, Ulf.Dahlen@ida:        <> U-DAHLEN@LISBET, < uda
  357. Xurn@ida, ulfni@ida, Ulf.Nilsson@ida:        <> U-NILSSON@LISBET, < ulfni
  358. Xwdr@ida, wlodr@ida, Wlodek.Drabent@ida, Wlodzimierz.Drabent@ida: <> W-DRABENT@LISBET, < wlodr
  359. Xyla@ida, yngla@ida, Yngve.Larsson@ida:        <  Y-LARSSON@LISBET, <> yngla
  360. Xzpe@ida, zebpe@ida, Zebo.Peng@ida:        <> ZEBO@LISBET, < zebpe
  361. END_OF_ida/lib/xaliases
  362. if test 16825 -ne `wc -c <ida/lib/xaliases`; then
  363.     echo shar: \"ida/lib/xaliases\" unpacked with wrong size!
  364. fi
  365. # end of overwriting check
  366. fi
  367. if test -f ida/patches/parseaddr.c.diff -a "${1}" != "-c" ; then 
  368.   echo shar: Will not over-write existing file \"ida/patches/parseaddr.c.diff\"
  369. else
  370. echo shar: Extracting \"ida/patches/parseaddr.c.diff\" \(21670 characters\)
  371. sed "s/^X//" >ida/patches/parseaddr.c.diff <<'END_OF_ida/patches/parseaddr.c.diff'
  372. X*** parseaddr.c.orig    Mon Mar 14 05:31:53 1988
  373. X--- parseaddr.c    Wed Aug 31 14:31:06 1988
  374. X***************
  375. X*** 450,455 ****
  376. X--- 450,459 ----
  377. X      }
  378. X      if (c == MATCHCLASS || c == MATCHREPL || c == MATCHNCLASS)
  379. X          return (ONE);
  380. X+ #ifdef MACVALUE
  381. X+     if (c == MACVALUE)
  382. X+         return (ONE);
  383. X+ #endif MACVALUE
  384. X      if (c == '"')
  385. X          return (QST);
  386. X      if (!isascii(c))
  387. X***************
  388. X*** 500,510 ****
  389. X--- 504,523 ----
  390. X  
  391. X  # define MAXMATCH    9    /* max params per rewrite */
  392. X  
  393. X+ static int nrw;
  394. X  
  395. X  rewrite(pvp, ruleset)
  396. X      char **pvp;
  397. X      int ruleset;
  398. X  {
  399. X+     nrw = 0;
  400. X+     _rewrite(pvp, ruleset);
  401. X+ }
  402. X+ 
  403. X+ _rewrite(pvp, ruleset)
  404. X+     char **pvp;
  405. X+     int ruleset;
  406. X+ {
  407. X      register char *ap;        /* address pointer */
  408. X      register char *rp;        /* rewrite pointer */
  409. X      register char **avp;        /* address vector pointer */
  410. X***************
  411. X*** 513,527 ****
  412. X      register struct rewrite *rwr;    /* pointer to current rewrite rule */
  413. X      struct match mlist[MAXMATCH];    /* stores match on LHS */
  414. X      char *npvp[MAXATOM+1];        /* temporary space for rebuild */
  415. X  
  416. X      if (OpMode == MD_TEST || tTd(21, 2))
  417. X      {
  418. X          printf("rewrite: ruleset %2d   input:", ruleset);
  419. X!         printav(pvp);
  420. X      }
  421. X      if (pvp == NULL)
  422. X          return;
  423. X  
  424. X      /*
  425. X      **  Run through the list of rewrite rules, applying
  426. X      **    any that match.
  427. X--- 526,552 ----
  428. X      register struct rewrite *rwr;    /* pointer to current rewrite rule */
  429. X      struct match mlist[MAXMATCH];    /* stores match on LHS */
  430. X      char *npvp[MAXATOM+1];        /* temporary space for rebuild */
  431. X+     char tokbuf[MAXNAME+1];        /* for concatenated class tokens */
  432. X+      int nloops, nmatches = 0;    /* for looping rule checks */
  433. X  
  434. X      if (OpMode == MD_TEST || tTd(21, 2))
  435. X      {
  436. X          printf("rewrite: ruleset %2d   input:", ruleset);
  437. X!         printcav(pvp);
  438. X      }
  439. X      if (pvp == NULL)
  440. X          return;
  441. X  
  442. X+     if (++nrw > 100) {
  443. X+         char buf[MAXLINE];
  444. X+ 
  445. X+         buf[0] = buf[MAXLINE-1] = 0;
  446. X+         while (*pvp)
  447. X+             strncat(buf, *pvp++, sizeof buf);
  448. X+         syserr("address causes rewrite loop: <%s>", buf);
  449. X+         return;
  450. X+     }
  451. X+ 
  452. X      /*
  453. X      **  Run through the list of rewrite rules, applying
  454. X      **    any that match.
  455. X***************
  456. X*** 533,539 ****
  457. X          if (tTd(21, 12))
  458. X          {
  459. X              printf("-----trying rule:");
  460. X!             printav(rwr->r_lhs);
  461. X          }
  462. X  # endif DEBUG
  463. X  
  464. X--- 558,564 ----
  465. X          if (tTd(21, 12))
  466. X          {
  467. X              printf("-----trying rule:");
  468. X!             printcav(rwr->r_lhs);
  469. X          }
  470. X  # endif DEBUG
  471. X  
  472. X***************
  473. X*** 541,548 ****
  474. X--- 566,579 ----
  475. X          mlp = mlist;
  476. X          rvp = rwr->r_lhs;
  477. X          avp = pvp;
  478. X+         nloops = 0;
  479. X          while ((ap = *avp) != NULL || *rvp != NULL)
  480. X          {
  481. X+             if (nloops++ > 200) {
  482. X+                 syserr("Looping on ruleset %d, rule %d",
  483. X+                     ruleset, rwr-RewriteRules[ruleset]);
  484. X+                 break;
  485. X+             }
  486. X              rp = *rvp;
  487. X  # ifdef DEBUG
  488. X              if (tTd(21, 35))
  489. X***************
  490. X*** 568,588 ****
  491. X              switch (*rp)
  492. X              {
  493. X                  register STAB *s;
  494. X  
  495. X-               case MATCHCLASS:
  496. X                case MATCHNCLASS:
  497. X!                 /* match any token in (not in) a class */
  498. X                  s = stab(ap, ST_CLASS, ST_FIND);
  499. X!                 if (s == NULL || !bitnset(rp[1], s->s_class))
  500. X!                 {
  501. X!                     if (*rp == MATCHCLASS)
  502. X!                         goto backup;
  503. X!                 }
  504. X!                 else if (*rp == MATCHNCLASS)
  505. X                      goto backup;
  506. X  
  507. X!                 /* explicit fall-through */
  508. X  
  509. X                case MATCHONE:
  510. X                case MATCHANY:
  511. X                  /* match exactly one token */
  512. X--- 599,639 ----
  513. X              switch (*rp)
  514. X              {
  515. X                  register STAB *s;
  516. X+                 char **oldavp;
  517. X  
  518. X                case MATCHNCLASS:
  519. X!                 /* match any single token not in a class */
  520. X                  s = stab(ap, ST_CLASS, ST_FIND);
  521. X!                 if (s != NULL && bitnset(rp[1], s->s_class))
  522. X                      goto backup;
  523. X  
  524. X!                 /* match exactly one token */
  525. X!                 mlp->first = avp;
  526. X!                 mlp->last = avp++;
  527. X!                 mlp++;
  528. X!                 break;
  529. X  
  530. X+               case MATCHCLASS:
  531. X+                 /* match any token in a class */
  532. X+                 /* slow, concat version by lel@ida.liu.se */
  533. X+                 /* handles multi-token class matches, though */
  534. X+                 oldavp = avp;
  535. X+                 *tokbuf = NULL;
  536. X+                 do {
  537. X+                   if (*avp == NULL) {
  538. X+                     avp = oldavp;
  539. X+                     goto backup;
  540. X+                   }
  541. X+                   strcat(tokbuf, *avp++);
  542. X+                   s = stab(tokbuf, ST_CLASS, ST_FIND);
  543. X+                 } while (s == NULL ||
  544. X+                      !bitnset(rp[1], s->s_class));
  545. X+ 
  546. X+                 mlp->first = oldavp;
  547. X+                 mlp->last = avp-1;
  548. X+                 mlp++;
  549. X+                 break;
  550. X+ 
  551. X                case MATCHONE:
  552. X                case MATCHANY:
  553. X                  /* match exactly one token */
  554. X***************
  555. X*** 615,620 ****
  556. X--- 666,702 ----
  557. X              while (--rvp >= rwr->r_lhs)
  558. X              {
  559. X                  rp = *rvp;
  560. X+                 if (*rp == MATCHCLASS) {
  561. X+                   register STAB *s;
  562. X+                   char **oldavp;
  563. X+ 
  564. X+                   /* attempt to extend binding */
  565. X+                   /* slow, concat version by lel@ida.liu.se */
  566. X+ 
  567. X+                   oldavp = avp;
  568. X+                   *tokbuf = NULL;
  569. X+                   for (avp = mlp[-1].first;
  570. X+                        avp <= mlp[-1].last; avp++)
  571. X+                     strcat(tokbuf, *avp);
  572. X+ 
  573. X+                   do {
  574. X+                     if (*avp == NULL) {
  575. X+                       /* back out binding */
  576. X+                       avp = oldavp;
  577. X+                       mlp--;
  578. X+                       goto cantextend;
  579. X+                     }
  580. X+                     strcat(tokbuf, *avp++);
  581. X+                     s = stab(tokbuf, ST_CLASS, ST_FIND);
  582. X+                   } while (s == NULL ||
  583. X+                        !bitnset(rp[1], s->s_class));
  584. X+ 
  585. X+                   /* found an extension */
  586. X+                   mlp[-1].last = avp-1;
  587. X+                   rvp++;
  588. X+                   break;
  589. X+                 }
  590. X+                   cantextend:
  591. X                  if (*rp == MATCHANY || *rp == MATCHZANY)
  592. X                  {
  593. X                      /* extend binding and continue */
  594. X***************
  595. X*** 624,631 ****
  596. X                      break;
  597. X                  }
  598. X                  avp--;
  599. X!                 if (*rp == MATCHONE || *rp == MATCHCLASS ||
  600. X!                     *rp == MATCHNCLASS)
  601. X                  {
  602. X                      /* back out binding */
  603. X                      mlp--;
  604. X--- 706,712 ----
  605. X                      break;
  606. X                  }
  607. X                  avp--;
  608. X!                 if (*rp == MATCHONE || *rp == MATCHNCLASS)
  609. X                  {
  610. X                      /* back out binding */
  611. X                      mlp--;
  612. X***************
  613. X*** 650,657 ****
  614. X--- 731,747 ----
  615. X                  printf("----- rule fails\n");
  616. X  # endif DEBUG
  617. X              rwr = rwr->r_next;
  618. X+             nmatches = 0;
  619. X              continue;
  620. X          }
  621. X+         
  622. X+         if (nmatches++ > 200) {
  623. X+             syserr("Loop in ruleset %d, rule %d (too many matches)",
  624. X+                 ruleset, rwr-RewriteRules[ruleset]);
  625. X+             rwr = rwr->r_next;
  626. X+             nmatches = 0;
  627. X+             continue;
  628. X+         }
  629. X  
  630. X          rvp = rwr->r_rhs;
  631. X  # ifdef DEBUG
  632. X***************
  633. X*** 658,664 ****
  634. X          if (tTd(21, 12))
  635. X          {
  636. X              printf("-----rule matches:");
  637. X!             printav(rvp);
  638. X          }
  639. X  # endif DEBUG
  640. X  
  641. X--- 748,754 ----
  642. X          if (tTd(21, 12))
  643. X          {
  644. X              printf("-----rule matches:");
  645. X!             printcav(rvp);
  646. X          }
  647. X  # endif DEBUG
  648. X  
  649. X***************
  650. X*** 667,672 ****
  651. X--- 757,763 ----
  652. X          {
  653. X              rvp++;
  654. X              rwr = rwr->r_next;
  655. X+             nmatches = 0;
  656. X          }
  657. X          else if (*rp == CANONHOST)
  658. X          {
  659. X***************
  660. X*** 689,695 ****
  661. X                  m = &mlist[rp[1] - '1'];
  662. X                  if (m >= mlp)
  663. X                  {
  664. X!                     syserr("rewrite: ruleset %d: replacement out of bounds", ruleset);
  665. X                      return;
  666. X                  }
  667. X  # ifdef DEBUG
  668. X--- 780,786 ----
  669. X                  m = &mlist[rp[1] - '1'];
  670. X                  if (m >= mlp)
  671. X                  {
  672. X!                     syserr("rewrite: ruleset %d: replacement #%c out of bounds", ruleset, rp[1]);
  673. X                      return;
  674. X                  }
  675. X  # ifdef DEBUG
  676. X***************
  677. X*** 726,732 ****
  678. X                      syserr("rewrite: expansion too long");
  679. X                      return;
  680. X                  }
  681. X!                 *avp++ = rp;
  682. X              }
  683. X          }
  684. X          *avp++ = NULL;
  685. X--- 817,836 ----
  686. X                      syserr("rewrite: expansion too long");
  687. X                      return;
  688. X                  }
  689. X! #ifdef MACVALUE
  690. X!                 if (*rp == MACVALUE) {
  691. X!                     extern char *macvalue();
  692. X! #ifdef DEBUG
  693. X!                     char *p = macvalue(rp[1], CurEnv);
  694. X!                     if (tTd(21, 2))
  695. X!                         printf("expanding runtime macro '%c' to \"%s\"\n",
  696. X!                            rp[1], p ? p : "(null)");
  697. X! #endif DEBUG
  698. X!                     if (p)
  699. X!                         *avp++ = p;
  700. X!                 } else
  701. X! #endif MACVALUE
  702. X!                     *avp++ = rp;
  703. X              }
  704. X          }
  705. X          *avp++ = NULL;
  706. X***************
  707. X*** 737,826 ****
  708. X  
  709. X          for (rvp = npvp; *rvp != NULL; rvp++)
  710. X          {
  711. X!             char **hbrvp;
  712. X              char **xpvp;
  713. X              int trsize;
  714. X              char *olddelimchar;
  715. X!             char buf[MAXNAME + 1];
  716. X              char *pvpb1[MAXATOM + 1];
  717. X              char pvpbuf[PSBUFSIZE];
  718. X              extern char *DelimChar;
  719. X  
  720. X!             if (**rvp != HOSTBEGIN)
  721. X                  continue;
  722. X  
  723. X              /*
  724. X!             **  Got a hostname lookup.
  725. X              **
  726. X              **    This could be optimized fairly easily.
  727. X              */
  728. X  
  729. X              hbrvp = rvp;
  730. X  
  731. X              /* extract the match part */
  732. X!             while (*++rvp != NULL && **rvp != HOSTEND)
  733. X                  continue;
  734. X              if (*rvp != NULL)
  735. X                  *rvp++ = NULL;
  736. X  
  737. X!             /* save the remainder of the input string */
  738. X              trsize = (int) (avp - rvp + 1) * sizeof *rvp;
  739. X              bcopy((char *) rvp, (char *) pvpb1, trsize);
  740. X  
  741. X!             /* look it up */
  742. X!             cataddr(++hbrvp, buf, sizeof buf);
  743. X!             maphostname(buf, sizeof buf);
  744. X! 
  745. X!             /* scan the new host name */
  746. X!             olddelimchar = DelimChar;
  747. X!             xpvp = prescan(buf, '\0', pvpbuf);
  748. X!             DelimChar = olddelimchar;
  749. X!             if (xpvp == NULL)
  750. X!             {
  751. X!                 syserr("rewrite: cannot prescan canonical hostname: %s", buf);
  752. X!                 return;
  753. X              }
  754. X  
  755. X!             /* append it to the token list */
  756. X!             for (avp = --hbrvp; *xpvp != NULL; xpvp++)
  757. X!             {
  758. X!                 *avp++ = newstr(*xpvp);
  759. X!                 if (avp >= &npvp[MAXATOM])
  760. X!                     goto toolong;
  761. X!             }
  762. X  
  763. X              /* restore the old trailing information */
  764. X!             for (xpvp = pvpb1; (*avp++ = *xpvp++) != NULL; )
  765. X!                 if (avp >= &npvp[MAXATOM])
  766. X!                     goto toolong;
  767. X  
  768. X!             break;
  769. X          }
  770. X  
  771. X          /*
  772. X          **  Check for subroutine calls.
  773. X          */
  774. X  
  775. X!         if (*npvp != NULL && **npvp == CALLSUBR)
  776. X!         {
  777. X!             bcopy((char *) &npvp[2], (char *) pvp,
  778. X!                 (int) (avp - npvp - 2) * sizeof *avp);
  779. X  # ifdef DEBUG
  780. X-             if (tTd(21, 3))
  781. X-                 printf("-----callsubr %s\n", npvp[1]);
  782. X- # endif DEBUG
  783. X-             rewrite(pvp, atoi(npvp[1]));
  784. X-         }
  785. X-         else
  786. X-         {
  787. X-             bcopy((char *) npvp, (char *) pvp,
  788. X-                 (int) (avp - npvp) * sizeof *avp);
  789. X-         }
  790. X- # ifdef DEBUG
  791. X          if (tTd(21, 4))
  792. X          {
  793. X              printf("rewritten as:");
  794. X!             printav(pvp);
  795. X          }
  796. X  # endif DEBUG
  797. X      }
  798. X--- 841,973 ----
  799. X  
  800. X          for (rvp = npvp; *rvp != NULL; rvp++)
  801. X          {
  802. X!             char **hbrvp, **ubrvp;
  803. X              char **xpvp;
  804. X              int trsize;
  805. X              char *olddelimchar;
  806. X!             char hbuf[MAXNAME + 1], ubuf[MAXNAME + 1];
  807. X              char *pvpb1[MAXATOM + 1];
  808. X              char pvpbuf[PSBUFSIZE];
  809. X+             bool match, defaultpart;
  810. X              extern char *DelimChar;
  811. X+             char begintype, db;
  812. X  
  813. X!             if (**rvp != HOSTBEGIN && **rvp != KEYBEGIN)
  814. X                  continue;
  815. X  
  816. X              /*
  817. X!             **  Got a hostname or database lookup.
  818. X              **
  819. X              **    This could be optimized fairly easily.
  820. X              */
  821. X  
  822. X+             begintype = **rvp;
  823. X              hbrvp = rvp;
  824. X+             ubrvp = NULL;
  825. X  
  826. X+             /* read database name if that's what we're up for */
  827. X+             if (begintype == KEYBEGIN) {
  828. X+                 if (*++rvp != NULL)
  829. X+                     db = **rvp;
  830. X+             }
  831. X+ 
  832. X              /* extract the match part */
  833. X!             if (begintype == HOSTBEGIN)
  834. X!                 while (*++rvp != NULL && **rvp != HOSTEND &&
  835. X!                    **rvp != CANONUSER)
  836. X                  continue;
  837. X+             else
  838. X+                 while (*++rvp != NULL && **rvp != KEYEND &&
  839. X+                    **rvp != CANONHOST && **rvp != CANONUSER)
  840. X+                 continue;
  841. X+             /* got a sprintf argument? */
  842. X+             if (**rvp == CANONHOST) {
  843. X+                 *rvp = NULL;
  844. X+                 ubrvp = rvp+1;
  845. X+                 while (*++rvp != NULL && **rvp != KEYEND &&
  846. X+                    **rvp != CANONUSER)
  847. X+                 continue;
  848. X+             }
  849. X+             defaultpart = **rvp == CANONUSER;
  850. X              if (*rvp != NULL)
  851. X                  *rvp++ = NULL;
  852. X  
  853. X!             /* Save the remainder of the input string */
  854. X              trsize = (int) (avp - rvp + 1) * sizeof *rvp;
  855. X              bcopy((char *) rvp, (char *) pvpb1, trsize);
  856. X  
  857. X!             /* Look it up (lowercase version) */
  858. X!             cataddr(hbrvp + (begintype == HOSTBEGIN ? 1 : 2),
  859. X!                 hbuf, sizeof hbuf);
  860. X!             if (begintype == HOSTBEGIN)
  861. X!                 match = maphostname(hbuf, sizeof hbuf);
  862. X!             else {
  863. X!                 if (ubrvp == NULL) {
  864. X!                 /* no sprintf argument part */
  865. X!                 match = mapkey(db, hbuf, sizeof hbuf, NULL);
  866. X!                 } else {
  867. X!                 cataddr(ubrvp, ubuf, sizeof ubuf);
  868. X!                 match = mapkey(db, hbuf, sizeof hbuf, ubuf);
  869. X!                 }
  870. X              }
  871. X+             if (match || !defaultpart) {
  872. X+                 /* scan the new route/host name */
  873. X+                 olddelimchar = DelimChar;
  874. X+                 xpvp = prescan(hbuf, '\0', pvpbuf);
  875. X+                 DelimChar = olddelimchar;
  876. X+                 if (xpvp == NULL) {
  877. X+                     syserr("rewrite: cannot prescan %s: %s", 
  878. X+                            begintype == HOSTBEGIN ?
  879. X+                            "new hostname" :
  880. X+                            "dbm lookup result",
  881. X+                            hbuf);
  882. X+                     return;
  883. X+                 }
  884. X  
  885. X!                 /* append it to the token list */
  886. X!                 for (avp = hbrvp; *xpvp != NULL; xpvp++) {
  887. X!                     *avp++ = newstr(*xpvp);
  888. X!                     if (avp >= &npvp[MAXATOM])
  889. X!                         goto toolong;
  890. X!                 }
  891. X!             } else
  892. X!                 avp = hbrvp;
  893. X  
  894. X              /* restore the old trailing information */
  895. X!             rvp = avp - 1;
  896. X!             for (xpvp = pvpb1; *xpvp != NULL; xpvp++) {
  897. X!                 if (defaultpart && (begintype == HOSTBEGIN ?
  898. X!                         **xpvp == HOSTEND :
  899. X!                         **xpvp == KEYEND)) {
  900. X!                 defaultpart = FALSE;
  901. X!                 rvp = avp - 1;
  902. X!                 } else if (!defaultpart || !match)
  903. X!                 *avp++ = *xpvp;
  904. X!                 if (avp >= &npvp[MAXATOM])
  905. X!                   goto toolong;
  906. X!             }
  907. X!             *avp++ = NULL;
  908. X  
  909. X!             /*break;*/
  910. X          }
  911. X  
  912. X          /*
  913. X          **  Check for subroutine calls.
  914. X+         **  Then copy vector back into original space.
  915. X          */
  916. X  
  917. X!         callsubr(npvp);
  918. X! 
  919. X!         for (avp = npvp; *avp++ != NULL;);
  920. X!         bcopy((char *) npvp, (char *) pvp,
  921. X!               (int) (avp - npvp) * sizeof *avp);
  922. X! 
  923. X! 
  924. X  # ifdef DEBUG
  925. X          if (tTd(21, 4))
  926. X          {
  927. X              printf("rewritten as:");
  928. X!             printcav(pvp);
  929. X          }
  930. X  # endif DEBUG
  931. X      }
  932. X***************
  933. X*** 828,837 ****
  934. X      if (OpMode == MD_TEST || tTd(21, 2))
  935. X      {
  936. X          printf("rewrite: ruleset %2d returns:", ruleset);
  937. X!         printav(pvp);
  938. X      }
  939. X  }
  940. X   /*
  941. X  **  BUILDADDR -- build address from token vector.
  942. X  **
  943. X  **    Parameters:
  944. X--- 975,1033 ----
  945. X      if (OpMode == MD_TEST || tTd(21, 2))
  946. X      {
  947. X          printf("rewrite: ruleset %2d returns:", ruleset);
  948. X!         printcav(pvp);
  949. X      }
  950. X  }
  951. X   /*
  952. X+ **  CALLSUBR -- call subroutines in rewrite vector
  953. X+ **
  954. X+ **    Parameters:
  955. X+ **        pvp -- pointer to token vector.
  956. X+ **
  957. X+ **    Returns:
  958. X+ **        none.
  959. X+ **
  960. X+ **    Side Effects:
  961. X+ **        pvp is modified.
  962. X+ */
  963. X+ 
  964. X+ callsubr(pvp)
  965. X+     char **pvp;
  966. X+ {
  967. X+     char **rvp;
  968. X+     int subr;
  969. X+ 
  970. X+     for (; *pvp != NULL; pvp++)
  971. X+     if (**pvp == CALLSUBR) {
  972. X+ 
  973. X+         subr = atoi(pvp[1]);
  974. X+ 
  975. X+ # ifdef DEBUG
  976. X+         if (tTd(21, 3))
  977. X+         printf("-----callsubr %d\n", subr);
  978. X+ # endif DEBUG
  979. X+ 
  980. X+         /*
  981. X+         **  Take care of possible inner calls.
  982. X+         */
  983. X+         callsubr(pvp+2);
  984. X+ 
  985. X+         /*
  986. X+         **  Move vector up over calling opcode.
  987. X+         */
  988. X+         for (rvp = pvp+2; *rvp != NULL; rvp++)
  989. X+         rvp[-2] = rvp[0];
  990. X+         rvp[-2] = NULL;
  991. X+ 
  992. X+         /*
  993. X+         **  Call inferior ruleset.
  994. X+         */
  995. X+         rewrite(pvp, subr);
  996. X+ 
  997. X+         break;
  998. X+     }
  999. X+ }
  1000. X+  /*
  1001. X  **  BUILDADDR -- build address from token vector.
  1002. X  **
  1003. X  **    Parameters:
  1004. X***************
  1005. X*** 899,919 ****
  1006. X      a->q_mailer = m;
  1007. X  
  1008. X      /* figure out what host (if any) */
  1009. X!     tv++;
  1010. X!     if (!bitnset(M_LOCAL, m->m_flags))
  1011. X!     {
  1012. X!         if (**tv++ != CANONHOST)
  1013. X!         {
  1014. X              syserr("buildaddr: no host");
  1015. X              return (NULL);
  1016. X!         }
  1017. X          buf[0] = '\0';
  1018. X!         while (*tv != NULL && **tv != CANONUSER)
  1019. X!             (void) strcat(buf, *tv++);
  1020. X          a->q_host = newstr(buf);
  1021. X      }
  1022. X-     else
  1023. X-         a->q_host = NULL;
  1024. X  
  1025. X      /* figure out the user */
  1026. X      if (**tv != CANONUSER)
  1027. X--- 1095,1112 ----
  1028. X      a->q_mailer = m;
  1029. X  
  1030. X      /* figure out what host (if any) */
  1031. X!     if (**++tv != CANONHOST) {
  1032. X!         if (!bitnset(M_LOCAL, m->m_flags)) {
  1033. X              syserr("buildaddr: no host");
  1034. X              return (NULL);
  1035. X!         } else
  1036. X!             a->q_host = NULL;
  1037. X!     } else {
  1038. X          buf[0] = '\0';
  1039. X!         while (*++tv != NULL && **tv != CANONUSER)
  1040. X!             (void) strcat(buf, *tv);
  1041. X          a->q_host = newstr(buf);
  1042. X      }
  1043. X  
  1044. X      /* figure out the user */
  1045. X      if (**tv != CANONUSER)
  1046. X***************
  1047. X*** 922,931 ****
  1048. X          return (NULL);
  1049. X      }
  1050. X  
  1051. X      /* rewrite according recipient mailer rewriting rules */
  1052. X      rewrite(++tv, 2);
  1053. X!     if (m->m_r_rwset > 0)
  1054. X!         rewrite(tv, m->m_r_rwset);
  1055. X      rewrite(tv, 4);
  1056. X  
  1057. X      /* save the result for the command line/RCPT argument */
  1058. X--- 1115,1127 ----
  1059. X          return (NULL);
  1060. X      }
  1061. X  
  1062. X+     /* define tohost before running mailer rulesets */
  1063. X+     define('h', a->q_host, CurEnv);
  1064. X+ 
  1065. X      /* rewrite according recipient mailer rewriting rules */
  1066. X      rewrite(++tv, 2);
  1067. X!     if (m->m_re_rwset > 0)
  1068. X!         rewrite(tv, m->m_re_rwset);
  1069. X      rewrite(tv, 4);
  1070. X  
  1071. X      /* save the result for the command line/RCPT argument */
  1072. X***************
  1073. X*** 1006,1012 ****
  1074. X          return (FALSE);
  1075. X  
  1076. X      /* if the user isn't the same, we can drop out */
  1077. X!     if (strcmp(a->q_user, b->q_user) != 0)
  1078. X          return (FALSE);
  1079. X  
  1080. X      /* if the mailer ignores hosts, we have succeeded! */
  1081. X--- 1202,1208 ----
  1082. X          return (FALSE);
  1083. X  
  1084. X      /* if the user isn't the same, we can drop out */
  1085. X!     if (strcasecmp(a->q_user, b->q_user))
  1086. X          return (FALSE);
  1087. X  
  1088. X      /* if the mailer ignores hosts, we have succeeded! */
  1089. X***************
  1090. X*** 1016,1022 ****
  1091. X      /* otherwise compare hosts (but be careful for NULL ptrs) */
  1092. X      if (a->q_host == NULL || b->q_host == NULL)
  1093. X          return (FALSE);
  1094. X!     if (strcmp(a->q_host, b->q_host) != 0)
  1095. X          return (FALSE);
  1096. X  
  1097. X      return (TRUE);
  1098. X--- 1212,1218 ----
  1099. X      /* otherwise compare hosts (but be careful for NULL ptrs) */
  1100. X      if (a->q_host == NULL || b->q_host == NULL)
  1101. X          return (FALSE);
  1102. X!     if (strcasecmp(a->q_host, b->q_host))
  1103. X          return (FALSE);
  1104. X  
  1105. X      return (TRUE);
  1106. X***************
  1107. X*** 1076,1081 ****
  1108. X--- 1272,1279 ----
  1109. X  **            rather than the recipient rewriting rules.
  1110. X  **        canonical -- if set, strip out any comment information,
  1111. X  **            etc.
  1112. X+ **        headeraddress -- if set, use header specific rewriting
  1113. X+ **            rulesets and uurelativize if M_RELATIVIZE is set.
  1114. X  **
  1115. X  **    Returns:
  1116. X  **        the text string representing this address relative to
  1117. X***************
  1118. X*** 1090,1100 ****
  1119. X  */
  1120. X  
  1121. X  char *
  1122. X! remotename(name, m, senderaddress, canonical)
  1123. X      char *name;
  1124. X      struct mailer *m;
  1125. X      bool senderaddress;
  1126. X      bool canonical;
  1127. X  {
  1128. X      register char **pvp;
  1129. X      char *fancy;
  1130. X--- 1288,1299 ----
  1131. X  */
  1132. X  
  1133. X  char *
  1134. X! remotename(name, m, senderaddress, canonical, headeraddress)
  1135. X      char *name;
  1136. X      struct mailer *m;
  1137. X      bool senderaddress;
  1138. X      bool canonical;
  1139. X+     bool headeraddress;
  1140. X  {
  1141. X      register char **pvp;
  1142. X      char *fancy;
  1143. X***************
  1144. X*** 1112,1118 ****
  1145. X  # endif DEBUG
  1146. X  
  1147. X      /* don't do anything if we are tagging it as special */
  1148. X!     if ((senderaddress ? m->m_s_rwset : m->m_r_rwset) < 0)
  1149. X          return (name);
  1150. X  
  1151. X      /*
  1152. X--- 1311,1319 ----
  1153. X  # endif DEBUG
  1154. X  
  1155. X      /* don't do anything if we are tagging it as special */
  1156. X!     if ((senderaddress ?
  1157. X!          (headeraddress ? m->m_sh_rwset : m->m_se_rwset) :
  1158. X!          (headeraddress ? m->m_rh_rwset : m->m_re_rwset)) < 0)
  1159. X          return (name);
  1160. X  
  1161. X      /*
  1162. X***************
  1163. X*** 1158,1180 ****
  1164. X  
  1165. X      /*
  1166. X      **  Do more specific rewriting.
  1167. X!     **    Rewrite using ruleset 1 or 2 depending on whether this is
  1168. X!     **        a sender address or not.
  1169. X      **    Then run it through any receiving-mailer-specific rulesets.
  1170. X      */
  1171. X  
  1172. X!     if (senderaddress)
  1173. X!     {
  1174. X!         rewrite(pvp, 1);
  1175. X!         if (m->m_s_rwset > 0)
  1176. X!             rewrite(pvp, m->m_s_rwset);
  1177. X      }
  1178. X-     else
  1179. X-     {
  1180. X-         rewrite(pvp, 2);
  1181. X-         if (m->m_r_rwset > 0)
  1182. X-             rewrite(pvp, m->m_r_rwset);
  1183. X-     }
  1184. X  
  1185. X      /*
  1186. X      **  Do any final sanitation the address may require.
  1187. X--- 1359,1391 ----
  1188. X  
  1189. X      /*
  1190. X      **  Do more specific rewriting.
  1191. X!     **    Rewrite using ruleset 1 or 2 for envelope addresses and
  1192. X!     **    5 or 6 for header addresses depending on whether this
  1193. X!     **    is a sender address or not.
  1194. X      **    Then run it through any receiving-mailer-specific rulesets.
  1195. X      */
  1196. X  
  1197. X!     if (senderaddress) {
  1198. X!         if (headeraddress) {
  1199. X!             rewrite(pvp, SplitRewriting ? 5 : 1);
  1200. X!             if (m->m_sh_rwset > 0)
  1201. X!                 rewrite(pvp, m->m_sh_rwset);
  1202. X!         } else {
  1203. X!             rewrite(pvp, 1);
  1204. X!             if (m->m_se_rwset > 0)
  1205. X!                 rewrite(pvp, m->m_se_rwset);
  1206. X!         }
  1207. X!     } else {
  1208. X!         if (headeraddress) {
  1209. X!             rewrite(pvp, SplitRewriting ? 6 : 2);
  1210. X!             if (m->m_rh_rwset > 0)
  1211. X!                 rewrite(pvp, m->m_rh_rwset);
  1212. X!         } else {
  1213. X!             rewrite(pvp, 2);
  1214. X!             if (m->m_re_rwset > 0)
  1215. X!                 rewrite(pvp, m->m_re_rwset);
  1216. X!         }
  1217. X      }
  1218. X  
  1219. X      /*
  1220. X      **  Do any final sanitation the address may require.
  1221. X***************
  1222. X*** 1186,1191 ****
  1223. X--- 1397,1410 ----
  1224. X      rewrite(pvp, 4);
  1225. X  
  1226. X      /*
  1227. X+     **  Check if we're supposed to do make the address
  1228. X+     **  UUCP !-relative to the rcpt host vs ourselves.
  1229. X+     */
  1230. X+ 
  1231. X+     if (headeraddress && bitnset(M_RELATIVIZE, m->m_flags))
  1232. X+         uurelativize("\001k", "\001h", pvp);
  1233. X+ 
  1234. X+     /*
  1235. X      **  Now restore the comment information we had at the beginning.
  1236. X      */
  1237. X  
  1238. X***************
  1239. X*** 1199,1202 ****
  1240. X--- 1418,1483 ----
  1241. X          printf("remotename => `%s'\n", buf);
  1242. X  # endif DEBUG
  1243. X      return (buf);
  1244. X+ }
  1245. X+  /*
  1246. X+ **  UURELATIVIZE -- Make an address !-relative to recipient/sender nodes
  1247. X+ **
  1248. X+ **    Parameters:
  1249. X+ **        from -- the sending node (usually "$k" or "$w")
  1250. X+ **        to -- the receiving node (usually "$h")
  1251. X+ **        pvp -- address vector
  1252. X+ **
  1253. X+ **    Returns:
  1254. X+ **        none.
  1255. X+ **
  1256. X+ **    Side Effects:
  1257. X+ **        The pvp is rewritten to be relative the "to" node
  1258. X+ **        wrt the "from" node.  In other words, if the pvp
  1259. X+ **        is headed by "to!" that part is stripped; otherwise
  1260. X+ **        "from!" is prepended.  Exception: "to!user" addresses
  1261. X+ **        with no '!'s in the user part are sent as is.
  1262. X+ **
  1263. X+ **    Bugs:
  1264. X+ **        The pvp may overflow, but we don't catch it.
  1265. X+ */
  1266. X+ 
  1267. X+ uurelativize(from, to, pvp)
  1268. X+     char *from, *to;
  1269. X+     char **pvp;
  1270. X+ {
  1271. X+     register char **pxp = pvp;
  1272. X+     char expfrom[MAXNAME], expto[MAXNAME];
  1273. X+ 
  1274. X+     expand(from, expfrom, &expfrom[sizeof expfrom - 1], CurEnv);
  1275. X+     expand(to, expto, &expto[sizeof expto - 1], CurEnv);
  1276. X+ 
  1277. X+     /*
  1278. X+      * supposing that we've got something, should
  1279. X+      * we add "from!" or remove "to!"?
  1280. X+      */
  1281. X+     if (pvp[0] != NULL)
  1282. X+         if (pvp[1] == NULL || strcmp(pvp[1], "!") != 0 ||
  1283. X+             /*strcasecmp?*/ strcmp(pvp[0], expto) != 0) {
  1284. X+         /* either local name, no UUCP address, or not to "to!"    */
  1285. X+         /* ==> prepend address with "from!"            */
  1286. X+ 
  1287. X+         /* already there? */
  1288. X+         if (pvp[1] == NULL || strcmp(pvp[1], "!") != 0 ||
  1289. X+             /*strcasecmp?*/ strcmp(pvp[0], expfrom) != 0) {
  1290. X+             /* no, put it there */
  1291. X+             while (*pxp != NULL)
  1292. X+             pxp++;
  1293. X+             do
  1294. X+             pxp[2] = *pxp;
  1295. X+             while (pxp-- != pvp);
  1296. X+             pvp[0] = newstr(expfrom);
  1297. X+             pvp[1] = "!";
  1298. X+         }
  1299. X+         } else {
  1300. X+         /* address is to "to!" -- remove if not "to!user" */
  1301. X+         for (pxp = &pvp[2]; *pxp != NULL && strcmp(*pxp, "!") != 0; pxp++);
  1302. X+         if (*pxp != NULL)
  1303. X+             for (pxp = pvp; *pxp != NULL; pxp++)
  1304. X+             *pxp = pxp[2];
  1305. X+         }
  1306. X  }
  1307. END_OF_ida/patches/parseaddr.c.diff
  1308. if test 21670 -ne `wc -c <ida/patches/parseaddr.c.diff`; then
  1309.     echo shar: \"ida/patches/parseaddr.c.diff\" unpacked with wrong size!
  1310. fi
  1311. # end of overwriting check
  1312. fi
  1313. echo shar: End of archive 5 \(of 8\).
  1314. cp /dev/null ark5isdone
  1315. MISSING=""
  1316. for I in 1 2 3 4 5 6 7 8 ; do
  1317.     if test ! -f ark${I}isdone ; then
  1318.     MISSING="${MISSING} ${I}"
  1319.     fi
  1320. done
  1321. if test "${MISSING}" = "" ; then
  1322.     echo You have unpacked all 8 archives.
  1323.     echo "See ida/README and ida/INSTALL for further directions."
  1324.     rm -f ark[1-9]isdone
  1325. else
  1326.     echo You still need to unpack the following archives:
  1327.     echo "        " ${MISSING}
  1328. fi
  1329. ##  End of shell archive.
  1330. exit 0
  1331.  
  1332.