v16i077: IDA Sendmail kit, Part05/08

Rich Salz rsalz at uunet.uu.net
Tue Nov 15 01:49:35 AEST 1988


Submitted-by: Lennart Lovstrand <lovstran at arisia.xerox.com>
Posting-number: Volume 16, Issue 77
Archive-name: ida2/part05

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 5 (of 8)."
# Contents:  ida/lib/xaliases ida/patches/parseaddr.c.diff
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f ida/lib/xaliases -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"ida/lib/xaliases\"
else
echo shar: Extracting \"ida/lib/xaliases\" \(16825 characters\)
sed "s/^X//" >ida/lib/xaliases <<'END_OF_ida/lib/xaliases'
X##########################################################################
X## Alias file for IDA.LiU.SE aka liuida.UUCP				##
X##########################################################################
X#  Aliases in this file will NOT be expanded in message headers.
X#
X#  Aliases are recognized in any mix of upper and lower case,
X#  since they are all converted to lower case.
X#
X#	>>>>>>>>>>	A consequence of the above line is that mail
X#	>> BUG! >>	can't be aliased to addresses with capital
X#	>>>>>>>>>>	letters (eg. files).
X#
X#	>>>>>>>>>>	The program "newaliases" may need to be run after
X#	>> NOTE >>	this file is updated for any changes to
X#	>>>>>>>>>>	show through to sendmail.
X#
X##
X
X# Following alias is required by the new mail protocol, RFC 822
X# Set it to the address of a HUMAN who deals with this system's mail problems.
XPostmaster at ida:		lel at ida
XPostmaster:		Postmaster at ida
X
X# Alias for mailer daemon; returned messages from our MAILER-DAEMON
X# should be routed to our local Postmaster.
XMAILER-DAEMON, MAILER-DAEMON at ida:	Postmaster at ida
X
X# Aliases to handle mail to programs or files, eg news
Xb-smtp, b-smtp at ida:	"|egrep '^#' | sed 's/^#//' | /usr/lib/sendmail -bs"
Xdecode, decode at ida:	"|/usr/bin/uudecode"
Xnamelist, namelist at ida:	"|/usr/lib/uucp/reclist"
Xnobody, nobody at ida:	/dev/null
Xrnews, rnews at ida:	"|/usr/lib/news/uurec"
X
Xxlp at ida, xlp-e-1tr at ida:	xlp-e-1tr-s at ida
Xxlp-e-bv at ida:		xlp-e-bv-s at ida
Xxlp-b-1tr at ida:		xlp-b-1tr-s at ida
X
Xxlp-e-1tr-e at ida:	"|/usr/lib/mail/mahafilter -Pxlp-e-1tr"
Xxlp-e-bv-e at ida:		"|/usr/lib/mail/mahafilter -Pxlp-e-bv"
Xxlp-b-1tr-e at ida:	"|/usr/lib/mail/mahafilter -Pxlp-b-1tr"
X
Xxlp-e-1tr-s at ida:	"|/usr/lib/mail/mahafilter -Pxlp-e-1tr -S"
Xxlp-e-bv-s at ida:		"|/usr/lib/mail/mahafilter -Pxlp-e-bv -S"
Xxlp-b-1tr-s at ida:	"|/usr/lib/mail/mahafilter -Pxlp-b-1tr -S"
X
Xalw, alw-e-1tr:		"|lpr -Palw"
X
X#########################################################################
X# Specific mail -> news entries						#
X#########################################################################
X
Xtest-news at ida:		"|/usr/lib/news/inews -h -n test"
X
Xida-mac at ida:		"|/usr/lib/news/altrecnews ida.mac"
X
Xowner-ida-mac at ida:	Postmaster at ida
X
X#########################################################################
X# Misc generic system users						#
X#########################################################################
X
Xnews, news at ida:		Postmaster at ida
Xusenet, usenet at ida:	Postmaster at ida
Xdaemon, daemon at ida:	Postmaster at ida
Xuucp, uucp at ida:		Postmaster at ida
X
X#########################################################################
X# Misc mail group links							#
X#########################################################################
X
XIDA, IDA at IDA, IDA at LiU.SE:	IDA at LISBET
XADB at ida:			ADB at LISBET
XAIELAB at ida, AILAB at ida:		AIELAB at LISBET
XASLAB at ida:			ASLAB at LISBET
XCADLAB at ida:			CADLAB at LISBET
XLIBLAB at ida:			LIBLAB at LISBET
XNLPLAB at ida:			NLPLAB at LISBET
XPELAB at ida:			PELAB at LISBET
XRKLLAB at ida, RKL at ida:		RKLLAB at LISBET
X
Xowner-IDA, owner-IDA at IDA, owner-IDA at LiU.SE:	Postmaster at ida
Xowner-ADB at ida:			Postmaster at ida
Xowner-AIELAB at ida:		Postmaster at ida
Xowner-ASLAB at ida:		Postmaster at ida
Xowner-CADLAB at ida:		Postmaster at ida
Xowner-LIBLAB at ida:		Postmaster at ida
Xowner-NLPLAB at ida:		Postmaster at ida
Xowner-PELAB at ida:		Postmaster at ida
X
X#########################################################################
X# Arpanet mail group links						#
X#########################################################################
X
Xakt at ida:			AKT at LISBET
XARPAnet-BBoards at ida:		ARPANET-BBOARDS at LISBET
XExPhi-Group at ida:		:include:/usr/lib/mail/groups/exphi-group
XHorse-List at ida:			HORSE-LIST at LISBET
XIDA-Info-1100 at ida:		:include:/usr/lib/mail/groups/ida-info-1100
XIDA-Bug-1100 at ida:		BUG-1100 at LISBET
Xida-info-gnu at ida:		:include:/usr/lib/mail/groups/ida-info-gnu
XInfo-Postscript at ida:		INFO-POSTSCRIPT at LISBET
Xlll at ida:			LASER-LOVERS at LISBET, Leif.Finmo at IDA
XMusic-Research at ida:		MUSIC-RESEARCH at LISBET, JANNE at TOKER
XNL-KR at ida:			NL-KR at LISBET
XParsym at ida:			PARSYM at LISBET
XProlog-Digest at ida:		PROLOG-DIGEST at LISBET
XPsychNet at ida:			PsychNet at LISBET
XSMAuG at ida:			SMAuG at LISBET
Xsunflash at ida:			:include: /usr/lib/mail/groups/sunflash
XTekTCP at ida:			TEKTCP at LISBET
XTeXHAX at ida:			TEXHAX at LISBET, Arne.Faldt at IDA
Xtester at ida:			:include:/usr/lib/mail/groups/foo
XTOPS-20-Experts at ida:		lenlo at ida, arnfa at ida
XTransputer at ida:			Transputer at LISBET, "|/usr/lib/news/altrecnews -h -a daemon at ida.liu.se -n fa.transputer"
X
Xowner-akt at ida:			Postmaster at ida
Xowner-ARPAnet-BBoards at ida:	Postmaster at ida
Xowner-ExPhi-Group at ida:		Postmaster at ida
Xowner-Horse-List at ida:		Postmaster at ida
Xowner-IDA-Info-1100 at ida:	Postmaster at ida
Xowner-IDA-Bug-1100 at ida:		Postmaster at ida
Xowner-ida-info-gnu at ida:		Postmaster at ida
Xowner-Info-Postscript at ida:	Postmaster at ida
Xowner-lll at ida:			Postmaster at ida
Xowner-Music-Research at ida:	Postmaster at ida
Xowner-nl-kr at ida:		Postmaster at ida
Xowner-parsym at ida:		Postmaster at ida
Xowner-prolog-digest at ida:	Postmaster at ida
Xowner-psychnet at ida:		Postmaster at ida
Xowner-SMAuG at ida:		Postmaster at ida
Xowner-sunflash at ida:		Postmaster at ida
Xowner-TekTCP at ida:		Postmaster at ida
Xowner-TeXHAX at ida:		Postmaster at ida
Xowner-tester at ida:		lel at ida
Xowner-TOPS-20-Experts at ida:	Postmaster at ida
Xowner-Transputer at ida:		Postmaster at ida
X
X#########################################################################
X# Individual local aliases						#
X#########################################################################
X
Xlennart:		lenlo
Xlin-p:			linpa				(Lin Padgham)
X
Xbly at ida:		jbl at ida				(Bryan Lyles)
Xbud at ida:		hla at ida				(Harald Lawson)
Xes at ida:			ejs at ida				(Erik Sandewall)
Xjac at ida:		lel at ida				(Jacek's mail sent to LeL)
Xjanba at ida:		lel at ida				(Janell's mail sent to lel)
Xjim at ida:		jwg at ida				(James W Goodwin)
Xlpa at ida:		lin at ida				(Lin Padgham)
Xola at ida:		olast at ida
Xpeter-f at ida:		petfr at majestix			(Peter Fritzsons bror, suck)
Xralf at ida:		rni at ida				(Ralf Nilsson)
Xralf-n at ida:		rni at ida				(Ralf Nilsson)
Xralf_n at ida:		rni at ida				(Ralf Nilsson)
Xrolf-k at ida:		rolka at ida			(Rolf Karlsson)
Xsandewal at ida:		ejs at ida				(Erik Sandewall)
Xsandewall at ida:		ejs at ida				(Erik Sandewall)
X
XvaxTest at ida:		lennart at hazel			(testing, testing...)
X
X# Temporary due to enea/seismo lossage
Xj-maluszynski at ida:	J-MALUSZYNSKI at LISBET
Xl-lovstrand at ida:	L-LOVSTRAND at LISBET
Xw-drabent at ida:		W-DRABENT at LISBET
X
X
X#########################################################################
X# Signature aliases							#
X#									#
X# The format here is:							#
X#	signature, altsign, full.name: alias-list			#
X# where alias-list is a comma and/or newline-separated list of user	#
X# names.  Each user name may be headed by a '<' and/or '>' with the	#
X# following meaning:							#
X#	 > user -- mail to this sign/full.name is delivered to the user	#
X#	<  user -- mail from this user is rewritten with the signature	#
X#		   as new sender					#
X#	<> user -- the combination of the above				#
X#	   user -- same as '> user'					#
X#									#
X# BE AWARE!  This special '<>' syntax is quite in antagony with RFC822	#
X#	     and was adapted only for its simplicity.  Any suggestions	#
X#	     for an alternative syntax are warmly welcomed.		#
X#########################################################################
X
Xaha at ida, andha at ida, Anders.Haraldsson at ida:	<> A-HARALDSSON at LISBET
Xajl at ida, andli at ida, Andrzej.Lingas at ida, lingas at ida: <> A-LINGAS at LISBET
Xaka at ida, andka at ida, Andreas.Kagedal at ida:	<> A-KAGEDAL at LISBET
Xalu at ida, andlu at ida, Anders.Lundberg at ida:	<> A-LUNDBERG at LISBET
Xamj at ida, annja at ida, Anne-Marie.Jacobsson at ida:	<> AM-JACOBSON at LISBET
Xany at ida, andny at ida, Anders.Nyberg at ida:		<> A-NYBERG at LISBET, < andny
Xaoa at ida, andal at ida, Anders.Aleryd at ida:		<> A-ALERYD at LISBET, < andal
Xara at ida, andra at ida, Anders.Rantila at ida:		<> A-RANTILA at LISBET, < ara
Xarf at ida, arnfa at ida, Arne.Faldt at ida:		<> A-FAELDT at LISBET, <> arnfa
Xarj at ida, arnjo at ida, Arne.Jonsson at ida:		<> ARNE-J at LISBET, < arnjo
Xaro at ida, annro at ida, Annie.Rostlinger at ida:	<> A-ROSTLINGER at LISBET
X#-- saknar userid!
Xast at ida, arnst at ida, Arne.Stahre at ida:		<> A-STAHRE at LISBET, < arnst
Xato at ida, andto at ida, Anders.Torne at ida:		<> A-TORNE at LISBET
Xava at ida, arjva at ida, Arja.Vainio-Larsson at ida: 	<> A-VAINIO at LISBET
Xban at ida, bjoni at ida, Bjorn.Nilsson at ida:		<> B-NILSSON at LISBET, < bjoni
Xbaw at ida, andwi at ida, Andreas.Wickberg at ida:	<> A-WICKBERG at LISBET, < andwi
Xbda at ida, birda at ida, Birgitta.Dahlgren at ida: 	<> B-DAHLGREN at LISBET
Xbek at ida, barek at ida, Barbara.Ekman at ida:		<> BARBARA at LISBET
Xbfa at ida, bjofj at ida, Bjorn.Fjellborg at ida, bfj at ida: <> B-FJELLBORG at LISBET
Xbkn at ida, berni at ida, Bernt.Nilsson at ida:		<> BERNT-N at LISBET, < berni
Xbln at ida, benle at ida, Bengt.Lennartsson at ida:	< BENGT at LISBET, <> bln
Xbma at ida, briah at ida, Britt-Marie.Ahlenback at ida:	<> BM-AHLENBECK at LISBET
Xbmk at ida, bodma at ida, Bodil.Mattson-Kihlstrom at ida: <> B-KIHLSTROM at LISBET
Xbod at ida, benod at ida, Benny.Odenteg at ida:		<> B-ODENTEG at LISBET
Xbol at ida, birol at ida, Birgitta.Olander at ida, bio at ida: <> B-OLANDER at LISBET, < birol
Xbro at ida, borro at ida, Borje.Rosenberg at ida:	<> B-ROSENBERG at LISBET
Xbsu at ida, bosu at ida, Bo.Sundgren at ida:		<> B-SUNDGREN at LISBET
Xcba at ida, chrba at ida, Christer.Backstrom at ida:	<> C-BACKSTROM at LISBET
Xccg at ida, chrgn at ida, Christian.Gnosspelius at ida:	<> C-GNOSSPELIUS at LISBET, < chrgn
Xcha at ida, chrha at ida, Christer.Hansson at ida:	<> C-HANSSON at LISBET, < chrha
Xchl at ida, chrle at ida, Christos.Levcopoulos at ida:	<> CHRISTOS at LISBET, < chrle
Xcib at ida, carbj at ida, Carina.Bjorkman at ida:	<> CARINA at LISBET
Xcil at ida, clail at ida, Claes.Illergard at ida:	<> C-ILLERGARD at LISBET, < clail
Xckr at ida, chrkr at ida, Christian.Krysander at ida:	<> CHRISTIAN at LISBET, < chrkr
Xdbu at ida, doubu at ida, Douglas.Busch at ida:		<> D-BUSCH at LISBET
Xddr at ida, dimdr at ida, Dimiter.Driankov at ida:	<> D-DRIANKOV at LISBET, < dimdr
Xdif at ida, dimfo at ida, Dimitrios.Fotiades at ida:	<> DIMITRIOS at LISBET, < dimfo
Xeat at ida, erite at ida, Erik.Tengvald at ida:		<> E-TENGVALD at LISBET, < erite
Xecs at ida, evasv at ida, Eva-Chris.Svensson at ida:	<> EVA-CHRIS at LISBET
Xejs at ida, erisa at ida, Erik.Sandewall at ida:		<> E-SANDEWALL at LISBET, < erisa
Xeno at ida, erlno at ida, Erling.Nordmark at ida:	<> E-NORDMARK at LISBET
Xfli at ida, freli at ida, Fredrik.Lindstrom at ida:	<> F-LINDSTROM at LISBET
Xggo at ida, gorgo at ida, Goran.Goldkuhl at ida:		<> G-GOLDKUHL at LISBET
Xgka at ida, gorka at ida, Goran.Karlsson at ida:		<> G-KARLSON at LISBET
Xglt at ida, gunli at ida, Gunilla.Lingenhult at ida:	<> G-LINGENHULT at LISBET
Xgni at ida, gosni at ida, Gosta.Nilsson at ida:		<> G-NILSSON at LISBET
Xher at ida, hener at ida, Henrik.Eriksson at ida:	<> H-ERIKSSON at LISBET, < her
Xhbl at ida, hanbl at ida, Hans.Block at ida:		<> H-BLOCK at LISBET
Xheh at ida, hanho at ida, Hans.Holmgren at ida:		<> H-HOLMGREN at LISBET, < hanho
Xhjk at ida, janko at ida, Jan.Komorowski at ida:		<> J-KOMOROWSKI at LISBET
Xhla at ida, harla at ida, Harold.Lawson at ida, budla at ida, Bud.Lawson at ida: <> BUD at LISBET, < harla
Xhno at ida, henno at ida, Henrik.Nordin at ida:		<> H-NORDIN at LISBET, < henno
Xhst at ida, hakst at ida, Hakan.Straaf at ida:		<> H-STRAAF at LISBET
Xime at ida, ingem at ida, Inger.Emanuelson at ida:	<> INGER at LISBET, < ingem
Xira at ida, ivara at ida, Ivan.Rankin at ida:		<> I-RANKIN at LISBET, < ivara
Xjas at ida, johan at ida, Johan.Andersson at ida:	<> JOHAN at LISBET, < johan
Xjbl at ida, bryly at ida, Bryan.Lyles at ida:		> Lyles.wbst at Xerox.COM
X#-- tills vidare
Xjfa at ida, johfa at ida, Johan.Fagerstrom at ida:	<> J-FAGERSTROM at LISBET, < johfa
Xjhu at ida, johhu at ida, Johan.Hultman at ida:		<> J-HULTMAN at LISBET, < johhu
Xjlo at ida, jonlo at ida, Jonas.Lowgren at ida:		<> J-LOWGREN at LISBET, < jlo
Xjma at ida, jalma at ida, Jalal.Maleki at ida:		<> JALAL at LISBET, < jalma
Xjmz at ida, janma at ida, Jan.Maluszynski at ida:	<> J-MALUSZYNSKI at LISBET, < janma
Xjwc at ida, jonwa at ida, Jonas.Wallgren at ida:		<> J-WALLGREN at LISBET
Xjwg at ida, jamgo at ida, James.Goodwin at ida, James.W.Goodwin at ida, jimgo at ida, Jim.Goodwin at ida: <> JIM at LISBET, < jimgo
Xkku at ida, krzku at ida, Krzysztof.Kuchcinski at ida, krk at ida: <> K-KUCHCINSKI at LISBET, < krzku
Xkol at ida, kerol at ida, Kerstin.Olsson at ida:		<> K-OLSSON at LISBET, < kerol
Xkre at ida, krier at ida, Kristina.Ernstsson at ida:	<> KRISTINA at LISBET, < krier
Xkrs at ida, krisa at ida, Kristian.Sandahl at ida:	<> K-SANDAHL at LISBET, < krisa
Xkry at ida, kevry at ida, Kevin.Ryan at ida:		<> K-RYAN at LISBET, < kevry
Xksd at ida, katsu at ida, Katarina.Sunnerud at ida:	<> KATARINA at LISBET, < katsu
Xlah at ida, larah at ida, Lars.Ahrenberg at ida:		<> L-AHRENBERG at LISBET
Xlbe at ida, larbe at ida, Lars.Bengtsson at ida:		<> L-BENGTSSON at LISBET, < larbe
Xlbf at ida, leifi at ida, Leif.Finmo at ida:		<> LEIF at LISBET, < leifi
Xlbj at ida, lisbj at ida, Lisbet.Bjorklund at ida:	<> L-BJORKLUND at LISBET
Xlel at ida, lenlo at ida, Lennart.Lovstrand at ida:	<> L-LOVSTRAND at LISBET,
X	< lel at obelix, < LENNART at HAZEL, <> lenlo
Xlew at ida, lilwa at ida, Lillemor.Wallgren at ida:	<> LILLEMOR at LISBET
Xlin at ida, linpa at ida, Lin.Padgham at ida:		< L-PADGHAM at LISBET, <> linpa
Xlli at ida, lisli at ida, Lisbeth.Linge at ida:		<> LISBETH at LISBET
Xlra at ida, lisra at ida, Lise-Lotte.Raunio at ida:	<> L-RAUNIO at LISBET
Xlro at ida, lenro at ida, Lennart.Rohlin at ida:		<> L-ROHLIN at LISBET
Xlst at ida, larst at ida, Lars.Stromberg at ida:		<> L-STROMBERG at LISBET, < larst
Xlwi at ida, larwi at ida, Lars.Wikstrand at ida:		<> L-WIKSTRAND at LISBET
Xmak at ida, marka at ida, Mariam.Kamkar at ida:		<> MARIAM at LISBET, < marka
Xmgw at ida, matwi at ida, Mats.Wiren at ida:		<> M-WIREN at LISBET, < matwi
Xmij at ida, maljo at ida, Malin.Johansson at ida:	<> MALIN at LISBET
Xmip at ida, mikpa at ida, Mikael.Patel at ida:		<> MIKAEL at LISBET, < mikpa
Xmja at ida, manja at ida, Manny.Jagerfeld at ida:	<> M-JAGERFELD at LISBET
Xmme at ida, magme at ida, Magnus.Merkel at ida:		<> M-MERKEL at LISBET
Xmre at ida, micre at ida, Michael.Reinfrank at ida:	<> M-REINFRANK at LISBET
X# reinfra at ztivax.UUCP
Xmru at ida, matru at ida, Mats.Rundquist at ida:		<> M-RUNDQUIST at LISBET, < mru
Xmsa at ida, matan at ida, Mats.S.Andersson at ida, masan at ida, Mats.Andersson at ida: <> MATS at LISBET, < msa
Xmsv at ida, miksv at ida, Mikael.Svensson at ida:	<> M-SVENSSON at LISBET, < miksv
Xnda at ida, nilda at ida, Nils.Dahlback at ida:		<> N-DAHLBACK at LISBET
Xnka at ida, naika at ida, Nail.Kavak at ida:		<> N-KAVAK at LISBET, < naika
Xnos at ida, nossh at ida, Nosrat.Shahsavar at ida:	<> N-SHAHSAVAR at LISBET, < nos
Xnsh at ida, nahsh at ida, Nahid.Shahmehri at ida:	<> NAHID at LISBET, < nahsh
Xoha at ida, oveha at ida, Ove.Hanebring at ida:		<> O-HANEBRING at LISBET
Xope at ida, olape at ida, Ola.Petersson at ida:		<> O-PETERSSON at LISBET
Xowl at ida, ollwi at ida, Olle.Willen at ida:		<> OLLE-W at LISBET, < ollwi
Xpab at ida, petab at ida, Peter.Aberg at ida:		<> P-ABERG at LISBET, < pab
Xpaf at ida, petfr at ida, Peter.Fritzson at ida:		< P-FRITZSON at LISBET, <> petfr
Xpdy at ida, patdo at ida, Patrick.Doherty at ida, pdo at ida: <> P-DOHERTY at LISBET, < patdo
X#pem at ida, parem at ida, Par.Emanuelson at ida:	<> PAER at LISBET
Xpha at ida, petha at ida, Peter.Haneklou at ida:		<> P-HANEKLO at LISBET, < petha
Xphj at ida, hakja at ida, Hakan.Jakobsson at ida:	<> H-JAKOBSSON at LISBET, < hakja
Xpjn at ida, pejni at ida, Peter.J.Nilsson at ida:	<> PJ-NILSSON at LISBET, <> pjn, < PJN at HAZEL
Xplo at ida, petlo at ida, Peter.Loborg at ida:		<> P-LOBORG at LISBET
Xpkw at ida, kriwa at ida, Kristian.Wallin at ida:	<> K-WALLIN at LISBET
Xplv at ida, pablo at ida, Pablo.Lozan-Villegas at ida:	<> P-LOZAN-VILLEGAS at LISBET
Xpsn at ida, pesni at ida, Peter.S.Nilsson at ida, pni at ida: <> P-NILSSON at LISBET, < pesni
X# vilken g{ller?  'psn' torde vara b{ttre (med tanke p} 'pjn')
Xpso at ida, palso at ida, Pal.Sorgaard at ida:		<> P-SORGAARD at LISBET
Xpuo at ida, perov at ida, Per.Overnas at ida:		<> PER at LISBET, < perov
Xrhj at ida, rolhj at ida, Roland.Hjerppe at ida:		<> R-HJERPPE at LISBET, < rolhj
Xrka at ida, rolka at ida, Rolf.Karlsson at ida:		<> R-KARLSSON at LISBET, < rolka
Xrni at ida, ralni at ida, Ralf.Nilsson at ida:		<> ralni, < RALF-N at LISBET
X#-- slutat
Xrob at ida, robbi at ida, Rober.Bilos at ida:		<> ROBER at LISBET, < robbi
Xron at ida, rolni at ida, Rolf.Nilsson at ida:		<> R-NILSSON at LISBET
Xrre at ida, rolre at ida, Roland.Rehmnert at ida:	<> R-REHMNERT at LISBET, < rolre
Xsbo at ida, stabo at ida, Staffan.Bonnier at ida:	<> S-BONNIER at LISBET, < stabo
Xrrq at ida, ralro at ida, Ralph.Ronnquist at ida:	<> RALPH-RONNQUIST at LISBET, < ralro
Xrzo at ida, rogzo at ida, Roger.Zollner at ida:		<> R-ZOLLNER at LISBET
Xsha at ida, steha at ida, Stefan.Hammar at ida:		<> S-HAMMAR at LISBET
Xsic at ida, shach at ida, Shamsul.Chowdhury at ida:	<> SHAMSUL at LISBET, < shach
Xsmn at ida, svemo at ida, Sven.Moen at ida:		< S-MOEN at LISBET, <> svemo
Xsnt at ida, simna at ida, Simin.Nadjm-Tehrani at ida:	<> S-NADJM-TEHRANI at LISBET, < snt
Xsos at ida, olast at ida, Ola.Stromfors at ida:		< OLA at LISBET, <> ola
Xsso at ida, sivso at ida, Siv.Soderlund at ida:		<> S-SODERLUND at LISBET
Xsth at ida, stuha at ida, Sture.Hagglund at ida:		<> STURE at LISBET, < stuha
Xswr at ida, stewr at ida, Stefan.Wrammerfors at ida:	<> stewr
Xtao at ida, tomol at ida, Tommy.Olsson at ida:		<> TOMMY at LISBET, < tao
Xtha at ida, timha at ida, Tim.Hansen at ida:		<> T-HANSEN at LISBET
Xtla at ida, tonla at ida, Tony.Larsson at ida:		<> T-LARSSON at LISBET, < tonla
Xton at ida, torna at ida, Torbjorn.Naslund at ida, tna at ida: < T-NASLUND at LISBET, <> torna
Xtoh at ida, tomoh at ida, Tommy.Ohlsson at ida:		<> T-OHLSSON at LISBET
Xtor at ida, totna at ida, Torbjorn.Naslund.ADB at ida:	<> TORBJORN-NASLUND-ADB at LISBET
Xtps at ida, tomso at ida, Tomas.Sokolnicki at ida:	<> T-SOKOLNICKI at LISBET
Xtri at ida, tomri at ida, Tom.Rindborg at ida:		<> T-RINDBORG at LISBET, < tomri
Xtti at ida, tooti at ida, Toomas.Timpka at ida:		<> T-TIMPKA at LISBET
Xuda at ida, ulfda at ida, Ulf.Dahlen at ida:		<> U-DAHLEN at LISBET, < uda
Xurn at ida, ulfni at ida, Ulf.Nilsson at ida:		<> U-NILSSON at LISBET, < ulfni
Xwdr at ida, wlodr at ida, Wlodek.Drabent at ida, Wlodzimierz.Drabent at ida: <> W-DRABENT at LISBET, < wlodr
Xyla at ida, yngla at ida, Yngve.Larsson at ida:		<  Y-LARSSON at LISBET, <> yngla
Xzpe at ida, zebpe at ida, Zebo.Peng at ida:		<> ZEBO at LISBET, < zebpe
END_OF_ida/lib/xaliases
if test 16825 -ne `wc -c <ida/lib/xaliases`; then
    echo shar: \"ida/lib/xaliases\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f ida/patches/parseaddr.c.diff -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"ida/patches/parseaddr.c.diff\"
else
echo shar: Extracting \"ida/patches/parseaddr.c.diff\" \(21670 characters\)
sed "s/^X//" >ida/patches/parseaddr.c.diff <<'END_OF_ida/patches/parseaddr.c.diff'
X*** parseaddr.c.orig	Mon Mar 14 05:31:53 1988
X--- parseaddr.c	Wed Aug 31 14:31:06 1988
X***************
X*** 450,455 ****
X--- 450,459 ----
X  	}
X  	if (c == MATCHCLASS || c == MATCHREPL || c == MATCHNCLASS)
X  		return (ONE);
X+ #ifdef MACVALUE
X+ 	if (c == MACVALUE)
X+ 		return (ONE);
X+ #endif MACVALUE
X  	if (c == '"')
X  		return (QST);
X  	if (!isascii(c))
X***************
X*** 500,510 ****
X--- 504,523 ----
X  
X  # define MAXMATCH	9	/* max params per rewrite */
X  
X+ static int nrw;
X  
X  rewrite(pvp, ruleset)
X  	char **pvp;
X  	int ruleset;
X  {
X+ 	nrw = 0;
X+ 	_rewrite(pvp, ruleset);
X+ }
X+ 
X+ _rewrite(pvp, ruleset)
X+ 	char **pvp;
X+ 	int ruleset;
X+ {
X  	register char *ap;		/* address pointer */
X  	register char *rp;		/* rewrite pointer */
X  	register char **avp;		/* address vector pointer */
X***************
X*** 513,527 ****
X  	register struct rewrite *rwr;	/* pointer to current rewrite rule */
X  	struct match mlist[MAXMATCH];	/* stores match on LHS */
X  	char *npvp[MAXATOM+1];		/* temporary space for rebuild */
X  
X  	if (OpMode == MD_TEST || tTd(21, 2))
X  	{
X  		printf("rewrite: ruleset %2d   input:", ruleset);
X! 		printav(pvp);
X  	}
X  	if (pvp == NULL)
X  		return;
X  
X  	/*
X  	**  Run through the list of rewrite rules, applying
X  	**	any that match.
X--- 526,552 ----
X  	register struct rewrite *rwr;	/* pointer to current rewrite rule */
X  	struct match mlist[MAXMATCH];	/* stores match on LHS */
X  	char *npvp[MAXATOM+1];		/* temporary space for rebuild */
X+ 	char tokbuf[MAXNAME+1];		/* for concatenated class tokens */
X+  	int nloops, nmatches = 0;	/* for looping rule checks */
X  
X  	if (OpMode == MD_TEST || tTd(21, 2))
X  	{
X  		printf("rewrite: ruleset %2d   input:", ruleset);
X! 		printcav(pvp);
X  	}
X  	if (pvp == NULL)
X  		return;
X  
X+ 	if (++nrw > 100) {
X+ 		char buf[MAXLINE];
X+ 
X+ 		buf[0] = buf[MAXLINE-1] = 0;
X+ 		while (*pvp)
X+ 			strncat(buf, *pvp++, sizeof buf);
X+ 		syserr("address causes rewrite loop: <%s>", buf);
X+ 		return;
X+ 	}
X+ 
X  	/*
X  	**  Run through the list of rewrite rules, applying
X  	**	any that match.
X***************
X*** 533,539 ****
X  		if (tTd(21, 12))
X  		{
X  			printf("-----trying rule:");
X! 			printav(rwr->r_lhs);
X  		}
X  # endif DEBUG
X  
X--- 558,564 ----
X  		if (tTd(21, 12))
X  		{
X  			printf("-----trying rule:");
X! 			printcav(rwr->r_lhs);
X  		}
X  # endif DEBUG
X  
X***************
X*** 541,548 ****
X--- 566,579 ----
X  		mlp = mlist;
X  		rvp = rwr->r_lhs;
X  		avp = pvp;
X+ 		nloops = 0;
X  		while ((ap = *avp) != NULL || *rvp != NULL)
X  		{
X+ 			if (nloops++ > 200) {
X+ 				syserr("Looping on ruleset %d, rule %d",
X+ 					ruleset, rwr-RewriteRules[ruleset]);
X+ 				break;
X+ 			}
X  			rp = *rvp;
X  # ifdef DEBUG
X  			if (tTd(21, 35))
X***************
X*** 568,588 ****
X  			switch (*rp)
X  			{
X  				register STAB *s;
X  
X- 			  case MATCHCLASS:
X  			  case MATCHNCLASS:
X! 				/* match any token in (not in) a class */
X  				s = stab(ap, ST_CLASS, ST_FIND);
X! 				if (s == NULL || !bitnset(rp[1], s->s_class))
X! 				{
X! 					if (*rp == MATCHCLASS)
X! 						goto backup;
X! 				}
X! 				else if (*rp == MATCHNCLASS)
X  					goto backup;
X  
X! 				/* explicit fall-through */
X  
X  			  case MATCHONE:
X  			  case MATCHANY:
X  				/* match exactly one token */
X--- 599,639 ----
X  			switch (*rp)
X  			{
X  				register STAB *s;
X+ 				char **oldavp;
X  
X  			  case MATCHNCLASS:
X! 				/* match any single token not in a class */
X  				s = stab(ap, ST_CLASS, ST_FIND);
X! 				if (s != NULL && bitnset(rp[1], s->s_class))
X  					goto backup;
X  
X! 				/* match exactly one token */
X! 				mlp->first = avp;
X! 				mlp->last = avp++;
X! 				mlp++;
X! 				break;
X  
X+ 			  case MATCHCLASS:
X+ 				/* match any token in a class */
X+ 				/* slow, concat version by lel at ida.liu.se */
X+ 				/* handles multi-token class matches, though */
X+ 				oldavp = avp;
X+ 				*tokbuf = NULL;
X+ 				do {
X+ 				  if (*avp == NULL) {
X+ 				    avp = oldavp;
X+ 				    goto backup;
X+ 				  }
X+ 				  strcat(tokbuf, *avp++);
X+ 				  s = stab(tokbuf, ST_CLASS, ST_FIND);
X+ 				} while (s == NULL ||
X+ 					 !bitnset(rp[1], s->s_class));
X+ 
X+ 				mlp->first = oldavp;
X+ 				mlp->last = avp-1;
X+ 				mlp++;
X+ 				break;
X+ 
X  			  case MATCHONE:
X  			  case MATCHANY:
X  				/* match exactly one token */
X***************
X*** 615,620 ****
X--- 666,702 ----
X  			while (--rvp >= rwr->r_lhs)
X  			{
X  				rp = *rvp;
X+ 				if (*rp == MATCHCLASS) {
X+ 				  register STAB *s;
X+ 				  char **oldavp;
X+ 
X+ 				  /* attempt to extend binding */
X+ 				  /* slow, concat version by lel at ida.liu.se */
X+ 
X+ 				  oldavp = avp;
X+ 				  *tokbuf = NULL;
X+ 				  for (avp = mlp[-1].first;
X+ 				       avp <= mlp[-1].last; avp++)
X+ 				    strcat(tokbuf, *avp);
X+ 
X+ 				  do {
X+ 				    if (*avp == NULL) {
X+ 				      /* back out binding */
X+ 				      avp = oldavp;
X+ 				      mlp--;
X+ 				      goto cantextend;
X+ 				    }
X+ 				    strcat(tokbuf, *avp++);
X+ 				    s = stab(tokbuf, ST_CLASS, ST_FIND);
X+ 				  } while (s == NULL ||
X+ 					   !bitnset(rp[1], s->s_class));
X+ 
X+ 				  /* found an extension */
X+ 				  mlp[-1].last = avp-1;
X+ 				  rvp++;
X+ 				  break;
X+ 				}
X+ 			      cantextend:
X  				if (*rp == MATCHANY || *rp == MATCHZANY)
X  				{
X  					/* extend binding and continue */
X***************
X*** 624,631 ****
X  					break;
X  				}
X  				avp--;
X! 				if (*rp == MATCHONE || *rp == MATCHCLASS ||
X! 				    *rp == MATCHNCLASS)
X  				{
X  					/* back out binding */
X  					mlp--;
X--- 706,712 ----
X  					break;
X  				}
X  				avp--;
X! 				if (*rp == MATCHONE || *rp == MATCHNCLASS)
X  				{
X  					/* back out binding */
X  					mlp--;
X***************
X*** 650,657 ****
X--- 731,747 ----
X  				printf("----- rule fails\n");
X  # endif DEBUG
X  			rwr = rwr->r_next;
X+ 			nmatches = 0;
X  			continue;
X  		}
X+ 		
X+ 		if (nmatches++ > 200) {
X+ 			syserr("Loop in ruleset %d, rule %d (too many matches)",
X+ 				ruleset, rwr-RewriteRules[ruleset]);
X+ 			rwr = rwr->r_next;
X+ 			nmatches = 0;
X+ 			continue;
X+ 		}
X  
X  		rvp = rwr->r_rhs;
X  # ifdef DEBUG
X***************
X*** 658,664 ****
X  		if (tTd(21, 12))
X  		{
X  			printf("-----rule matches:");
X! 			printav(rvp);
X  		}
X  # endif DEBUG
X  
X--- 748,754 ----
X  		if (tTd(21, 12))
X  		{
X  			printf("-----rule matches:");
X! 			printcav(rvp);
X  		}
X  # endif DEBUG
X  
X***************
X*** 667,672 ****
X--- 757,763 ----
X  		{
X  			rvp++;
X  			rwr = rwr->r_next;
X+ 			nmatches = 0;
X  		}
X  		else if (*rp == CANONHOST)
X  		{
X***************
X*** 689,695 ****
X  				m = &mlist[rp[1] - '1'];
X  				if (m >= mlp)
X  				{
X! 					syserr("rewrite: ruleset %d: replacement out of bounds", ruleset);
X  					return;
X  				}
X  # ifdef DEBUG
X--- 780,786 ----
X  				m = &mlist[rp[1] - '1'];
X  				if (m >= mlp)
X  				{
X! 					syserr("rewrite: ruleset %d: replacement #%c out of bounds", ruleset, rp[1]);
X  					return;
X  				}
X  # ifdef DEBUG
X***************
X*** 726,732 ****
X  					syserr("rewrite: expansion too long");
X  					return;
X  				}
X! 				*avp++ = rp;
X  			}
X  		}
X  		*avp++ = NULL;
X--- 817,836 ----
X  					syserr("rewrite: expansion too long");
X  					return;
X  				}
X! #ifdef MACVALUE
X! 				if (*rp == MACVALUE) {
X! 					extern char *macvalue();
X! #ifdef DEBUG
X! 					char *p = macvalue(rp[1], CurEnv);
X! 					if (tTd(21, 2))
X! 					    printf("expanding runtime macro '%c' to \"%s\"\n",
X! 						   rp[1], p ? p : "(null)");
X! #endif DEBUG
X! 					if (p)
X! 						*avp++ = p;
X! 				} else
X! #endif MACVALUE
X! 					*avp++ = rp;
X  			}
X  		}
X  		*avp++ = NULL;
X***************
X*** 737,826 ****
X  
X  		for (rvp = npvp; *rvp != NULL; rvp++)
X  		{
X! 			char **hbrvp;
X  			char **xpvp;
X  			int trsize;
X  			char *olddelimchar;
X! 			char buf[MAXNAME + 1];
X  			char *pvpb1[MAXATOM + 1];
X  			char pvpbuf[PSBUFSIZE];
X  			extern char *DelimChar;
X  
X! 			if (**rvp != HOSTBEGIN)
X  				continue;
X  
X  			/*
X! 			**  Got a hostname lookup.
X  			**
X  			**	This could be optimized fairly easily.
X  			*/
X  
X  			hbrvp = rvp;
X  
X  			/* extract the match part */
X! 			while (*++rvp != NULL && **rvp != HOSTEND)
X  				continue;
X  			if (*rvp != NULL)
X  				*rvp++ = NULL;
X  
X! 			/* save the remainder of the input string */
X  			trsize = (int) (avp - rvp + 1) * sizeof *rvp;
X  			bcopy((char *) rvp, (char *) pvpb1, trsize);
X  
X! 			/* look it up */
X! 			cataddr(++hbrvp, buf, sizeof buf);
X! 			maphostname(buf, sizeof buf);
X! 
X! 			/* scan the new host name */
X! 			olddelimchar = DelimChar;
X! 			xpvp = prescan(buf, '\0', pvpbuf);
X! 			DelimChar = olddelimchar;
X! 			if (xpvp == NULL)
X! 			{
X! 				syserr("rewrite: cannot prescan canonical hostname: %s", buf);
X! 				return;
X  			}
X  
X! 			/* append it to the token list */
X! 			for (avp = --hbrvp; *xpvp != NULL; xpvp++)
X! 			{
X! 				*avp++ = newstr(*xpvp);
X! 				if (avp >= &npvp[MAXATOM])
X! 					goto toolong;
X! 			}
X  
X  			/* restore the old trailing information */
X! 			for (xpvp = pvpb1; (*avp++ = *xpvp++) != NULL; )
X! 				if (avp >= &npvp[MAXATOM])
X! 					goto toolong;
X  
X! 			break;
X  		}
X  
X  		/*
X  		**  Check for subroutine calls.
X  		*/
X  
X! 		if (*npvp != NULL && **npvp == CALLSUBR)
X! 		{
X! 			bcopy((char *) &npvp[2], (char *) pvp,
X! 				(int) (avp - npvp - 2) * sizeof *avp);
X  # ifdef DEBUG
X- 			if (tTd(21, 3))
X- 				printf("-----callsubr %s\n", npvp[1]);
X- # endif DEBUG
X- 			rewrite(pvp, atoi(npvp[1]));
X- 		}
X- 		else
X- 		{
X- 			bcopy((char *) npvp, (char *) pvp,
X- 				(int) (avp - npvp) * sizeof *avp);
X- 		}
X- # ifdef DEBUG
X  		if (tTd(21, 4))
X  		{
X  			printf("rewritten as:");
X! 			printav(pvp);
X  		}
X  # endif DEBUG
X  	}
X--- 841,973 ----
X  
X  		for (rvp = npvp; *rvp != NULL; rvp++)
X  		{
X! 			char **hbrvp, **ubrvp;
X  			char **xpvp;
X  			int trsize;
X  			char *olddelimchar;
X! 			char hbuf[MAXNAME + 1], ubuf[MAXNAME + 1];
X  			char *pvpb1[MAXATOM + 1];
X  			char pvpbuf[PSBUFSIZE];
X+ 			bool match, defaultpart;
X  			extern char *DelimChar;
X+ 			char begintype, db;
X  
X! 			if (**rvp != HOSTBEGIN && **rvp != KEYBEGIN)
X  				continue;
X  
X  			/*
X! 			**  Got a hostname or database lookup.
X  			**
X  			**	This could be optimized fairly easily.
X  			*/
X  
X+ 			begintype = **rvp;
X  			hbrvp = rvp;
X+ 			ubrvp = NULL;
X  
X+ 			/* read database name if that's what we're up for */
X+ 			if (begintype == KEYBEGIN) {
X+ 				if (*++rvp != NULL)
X+ 					db = **rvp;
X+ 			}
X+ 
X  			/* extract the match part */
X! 			if (begintype == HOSTBEGIN)
X! 			    while (*++rvp != NULL && **rvp != HOSTEND &&
X! 				   **rvp != CANONUSER)
X  				continue;
X+ 			else
X+ 			    while (*++rvp != NULL && **rvp != KEYEND &&
X+ 				   **rvp != CANONHOST && **rvp != CANONUSER)
X+ 				continue;
X+ 			/* got a sprintf argument? */
X+ 			if (**rvp == CANONHOST) {
X+ 			    *rvp = NULL;
X+ 			    ubrvp = rvp+1;
X+ 			    while (*++rvp != NULL && **rvp != KEYEND &&
X+ 				   **rvp != CANONUSER)
X+ 				continue;
X+ 			}
X+ 			defaultpart = **rvp == CANONUSER;
X  			if (*rvp != NULL)
X  				*rvp++ = NULL;
X  
X! 			/* Save the remainder of the input string */
X  			trsize = (int) (avp - rvp + 1) * sizeof *rvp;
X  			bcopy((char *) rvp, (char *) pvpb1, trsize);
X  
X! 			/* Look it up (lowercase version) */
X! 			cataddr(hbrvp + (begintype == HOSTBEGIN ? 1 : 2),
X! 				hbuf, sizeof hbuf);
X! 			if (begintype == HOSTBEGIN)
X! 			    match = maphostname(hbuf, sizeof hbuf);
X! 			else {
X! 			    if (ubrvp == NULL) {
X! 				/* no sprintf argument part */
X! 				match = mapkey(db, hbuf, sizeof hbuf, NULL);
X! 			    } else {
X! 				cataddr(ubrvp, ubuf, sizeof ubuf);
X! 				match = mapkey(db, hbuf, sizeof hbuf, ubuf);
X! 			    }
X  			}
X+ 			if (match || !defaultpart) {
X+ 				/* scan the new route/host name */
X+ 				olddelimchar = DelimChar;
X+ 				xpvp = prescan(hbuf, '\0', pvpbuf);
X+ 				DelimChar = olddelimchar;
X+ 				if (xpvp == NULL) {
X+ 					syserr("rewrite: cannot prescan %s: %s", 
X+ 					       begintype == HOSTBEGIN ?
X+ 					       "new hostname" :
X+ 					       "dbm lookup result",
X+ 					       hbuf);
X+ 					return;
X+ 				}
X  
X! 				/* append it to the token list */
X! 				for (avp = hbrvp; *xpvp != NULL; xpvp++) {
X! 					*avp++ = newstr(*xpvp);
X! 					if (avp >= &npvp[MAXATOM])
X! 						goto toolong;
X! 				}
X! 			} else
X! 				avp = hbrvp;
X  
X  			/* restore the old trailing information */
X! 			rvp = avp - 1;
X! 			for (xpvp = pvpb1; *xpvp != NULL; xpvp++) {
X! 			    if (defaultpart && (begintype == HOSTBEGIN ?
X! 						**xpvp == HOSTEND :
X! 						**xpvp == KEYEND)) {
X! 				defaultpart = FALSE;
X! 				rvp = avp - 1;
X! 			    } else if (!defaultpart || !match)
X! 				*avp++ = *xpvp;
X! 			    if (avp >= &npvp[MAXATOM])
X! 			  	goto toolong;
X! 			}
X! 			*avp++ = NULL;
X  
X! 			/*break;*/
X  		}
X  
X  		/*
X  		**  Check for subroutine calls.
X+ 		**  Then copy vector back into original space.
X  		*/
X  
X! 		callsubr(npvp);
X! 
X! 		for (avp = npvp; *avp++ != NULL;);
X! 		bcopy((char *) npvp, (char *) pvp,
X! 		      (int) (avp - npvp) * sizeof *avp);
X! 
X! 
X  # ifdef DEBUG
X  		if (tTd(21, 4))
X  		{
X  			printf("rewritten as:");
X! 			printcav(pvp);
X  		}
X  # endif DEBUG
X  	}
X***************
X*** 828,837 ****
X  	if (OpMode == MD_TEST || tTd(21, 2))
X  	{
X  		printf("rewrite: ruleset %2d returns:", ruleset);
X! 		printav(pvp);
X  	}
X  }
X  /*
X  **  BUILDADDR -- build address from token vector.
X  **
X  **	Parameters:
X--- 975,1033 ----
X  	if (OpMode == MD_TEST || tTd(21, 2))
X  	{
X  		printf("rewrite: ruleset %2d returns:", ruleset);
X! 		printcav(pvp);
X  	}
X  }
X  /*
X+ **  CALLSUBR -- call subroutines in rewrite vector
X+ **
X+ **	Parameters:
X+ **		pvp -- pointer to token vector.
X+ **
X+ **	Returns:
X+ **		none.
X+ **
X+ **	Side Effects:
X+ **		pvp is modified.
X+ */
X+ 
X+ callsubr(pvp)
X+     char **pvp;
X+ {
X+     char **rvp;
X+     int subr;
X+ 
X+     for (; *pvp != NULL; pvp++)
X+ 	if (**pvp == CALLSUBR) {
X+ 
X+ 	    subr = atoi(pvp[1]);
X+ 
X+ # ifdef DEBUG
X+ 	    if (tTd(21, 3))
X+ 		printf("-----callsubr %d\n", subr);
X+ # endif DEBUG
X+ 
X+ 	    /*
X+ 	    **  Take care of possible inner calls.
X+ 	    */
X+ 	    callsubr(pvp+2);
X+ 
X+ 	    /*
X+ 	    **  Move vector up over calling opcode.
X+ 	    */
X+ 	    for (rvp = pvp+2; *rvp != NULL; rvp++)
X+ 		rvp[-2] = rvp[0];
X+ 	    rvp[-2] = NULL;
X+ 
X+ 	    /*
X+ 	    **  Call inferior ruleset.
X+ 	    */
X+ 	    rewrite(pvp, subr);
X+ 
X+ 	    break;
X+ 	}
X+ }
X+ /*
X  **  BUILDADDR -- build address from token vector.
X  **
X  **	Parameters:
X***************
X*** 899,919 ****
X  	a->q_mailer = m;
X  
X  	/* figure out what host (if any) */
X! 	tv++;
X! 	if (!bitnset(M_LOCAL, m->m_flags))
X! 	{
X! 		if (**tv++ != CANONHOST)
X! 		{
X  			syserr("buildaddr: no host");
X  			return (NULL);
X! 		}
X  		buf[0] = '\0';
X! 		while (*tv != NULL && **tv != CANONUSER)
X! 			(void) strcat(buf, *tv++);
X  		a->q_host = newstr(buf);
X  	}
X- 	else
X- 		a->q_host = NULL;
X  
X  	/* figure out the user */
X  	if (**tv != CANONUSER)
X--- 1095,1112 ----
X  	a->q_mailer = m;
X  
X  	/* figure out what host (if any) */
X! 	if (**++tv != CANONHOST) {
X! 		if (!bitnset(M_LOCAL, m->m_flags)) {
X  			syserr("buildaddr: no host");
X  			return (NULL);
X! 		} else
X! 			a->q_host = NULL;
X! 	} else {
X  		buf[0] = '\0';
X! 		while (*++tv != NULL && **tv != CANONUSER)
X! 			(void) strcat(buf, *tv);
X  		a->q_host = newstr(buf);
X  	}
X  
X  	/* figure out the user */
X  	if (**tv != CANONUSER)
X***************
X*** 922,931 ****
X  		return (NULL);
X  	}
X  
X  	/* rewrite according recipient mailer rewriting rules */
X  	rewrite(++tv, 2);
X! 	if (m->m_r_rwset > 0)
X! 		rewrite(tv, m->m_r_rwset);
X  	rewrite(tv, 4);
X  
X  	/* save the result for the command line/RCPT argument */
X--- 1115,1127 ----
X  		return (NULL);
X  	}
X  
X+ 	/* define tohost before running mailer rulesets */
X+ 	define('h', a->q_host, CurEnv);
X+ 
X  	/* rewrite according recipient mailer rewriting rules */
X  	rewrite(++tv, 2);
X! 	if (m->m_re_rwset > 0)
X! 		rewrite(tv, m->m_re_rwset);
X  	rewrite(tv, 4);
X  
X  	/* save the result for the command line/RCPT argument */
X***************
X*** 1006,1012 ****
X  		return (FALSE);
X  
X  	/* if the user isn't the same, we can drop out */
X! 	if (strcmp(a->q_user, b->q_user) != 0)
X  		return (FALSE);
X  
X  	/* if the mailer ignores hosts, we have succeeded! */
X--- 1202,1208 ----
X  		return (FALSE);
X  
X  	/* if the user isn't the same, we can drop out */
X! 	if (strcasecmp(a->q_user, b->q_user))
X  		return (FALSE);
X  
X  	/* if the mailer ignores hosts, we have succeeded! */
X***************
X*** 1016,1022 ****
X  	/* otherwise compare hosts (but be careful for NULL ptrs) */
X  	if (a->q_host == NULL || b->q_host == NULL)
X  		return (FALSE);
X! 	if (strcmp(a->q_host, b->q_host) != 0)
X  		return (FALSE);
X  
X  	return (TRUE);
X--- 1212,1218 ----
X  	/* otherwise compare hosts (but be careful for NULL ptrs) */
X  	if (a->q_host == NULL || b->q_host == NULL)
X  		return (FALSE);
X! 	if (strcasecmp(a->q_host, b->q_host))
X  		return (FALSE);
X  
X  	return (TRUE);
X***************
X*** 1076,1081 ****
X--- 1272,1279 ----
X  **			rather than the recipient rewriting rules.
X  **		canonical -- if set, strip out any comment information,
X  **			etc.
X+ **		headeraddress -- if set, use header specific rewriting
X+ **			rulesets and uurelativize if M_RELATIVIZE is set.
X  **
X  **	Returns:
X  **		the text string representing this address relative to
X***************
X*** 1090,1100 ****
X  */
X  
X  char *
X! remotename(name, m, senderaddress, canonical)
X  	char *name;
X  	struct mailer *m;
X  	bool senderaddress;
X  	bool canonical;
X  {
X  	register char **pvp;
X  	char *fancy;
X--- 1288,1299 ----
X  */
X  
X  char *
X! remotename(name, m, senderaddress, canonical, headeraddress)
X  	char *name;
X  	struct mailer *m;
X  	bool senderaddress;
X  	bool canonical;
X+ 	bool headeraddress;
X  {
X  	register char **pvp;
X  	char *fancy;
X***************
X*** 1112,1118 ****
X  # endif DEBUG
X  
X  	/* don't do anything if we are tagging it as special */
X! 	if ((senderaddress ? m->m_s_rwset : m->m_r_rwset) < 0)
X  		return (name);
X  
X  	/*
X--- 1311,1319 ----
X  # endif DEBUG
X  
X  	/* don't do anything if we are tagging it as special */
X! 	if ((senderaddress ?
X! 	     (headeraddress ? m->m_sh_rwset : m->m_se_rwset) :
X! 	     (headeraddress ? m->m_rh_rwset : m->m_re_rwset)) < 0)
X  		return (name);
X  
X  	/*
X***************
X*** 1158,1180 ****
X  
X  	/*
X  	**  Do more specific rewriting.
X! 	**	Rewrite using ruleset 1 or 2 depending on whether this is
X! 	**		a sender address or not.
X  	**	Then run it through any receiving-mailer-specific rulesets.
X  	*/
X  
X! 	if (senderaddress)
X! 	{
X! 		rewrite(pvp, 1);
X! 		if (m->m_s_rwset > 0)
X! 			rewrite(pvp, m->m_s_rwset);
X  	}
X- 	else
X- 	{
X- 		rewrite(pvp, 2);
X- 		if (m->m_r_rwset > 0)
X- 			rewrite(pvp, m->m_r_rwset);
X- 	}
X  
X  	/*
X  	**  Do any final sanitation the address may require.
X--- 1359,1391 ----
X  
X  	/*
X  	**  Do more specific rewriting.
X! 	**	Rewrite using ruleset 1 or 2 for envelope addresses and
X! 	**	5 or 6 for header addresses depending on whether this
X! 	**	is a sender address or not.
X  	**	Then run it through any receiving-mailer-specific rulesets.
X  	*/
X  
X! 	if (senderaddress) {
X! 		if (headeraddress) {
X! 			rewrite(pvp, SplitRewriting ? 5 : 1);
X! 			if (m->m_sh_rwset > 0)
X! 				rewrite(pvp, m->m_sh_rwset);
X! 		} else {
X! 			rewrite(pvp, 1);
X! 			if (m->m_se_rwset > 0)
X! 				rewrite(pvp, m->m_se_rwset);
X! 		}
X! 	} else {
X! 		if (headeraddress) {
X! 			rewrite(pvp, SplitRewriting ? 6 : 2);
X! 			if (m->m_rh_rwset > 0)
X! 				rewrite(pvp, m->m_rh_rwset);
X! 		} else {
X! 			rewrite(pvp, 2);
X! 			if (m->m_re_rwset > 0)
X! 				rewrite(pvp, m->m_re_rwset);
X! 		}
X  	}
X  
X  	/*
X  	**  Do any final sanitation the address may require.
X***************
X*** 1186,1191 ****
X--- 1397,1410 ----
X  	rewrite(pvp, 4);
X  
X  	/*
X+ 	**  Check if we're supposed to do make the address
X+ 	**  UUCP !-relative to the rcpt host vs ourselves.
X+ 	*/
X+ 
X+ 	if (headeraddress && bitnset(M_RELATIVIZE, m->m_flags))
X+ 		uurelativize("\001k", "\001h", pvp);
X+ 
X+ 	/*
X  	**  Now restore the comment information we had at the beginning.
X  	*/
X  
X***************
X*** 1199,1202 ****
X--- 1418,1483 ----
X  		printf("remotename => `%s'\n", buf);
X  # endif DEBUG
X  	return (buf);
X+ }
X+ /*
X+ **  UURELATIVIZE -- Make an address !-relative to recipient/sender nodes
X+ **
X+ **	Parameters:
X+ **		from -- the sending node (usually "$k" or "$w")
X+ **		to -- the receiving node (usually "$h")
X+ **		pvp -- address vector
X+ **
X+ **	Returns:
X+ **		none.
X+ **
X+ **	Side Effects:
X+ **		The pvp is rewritten to be relative the "to" node
X+ **		wrt the "from" node.  In other words, if the pvp
X+ **		is headed by "to!" that part is stripped; otherwise
X+ **		"from!" is prepended.  Exception: "to!user" addresses
X+ **		with no '!'s in the user part are sent as is.
X+ **
X+ **	Bugs:
X+ **		The pvp may overflow, but we don't catch it.
X+ */
X+ 
X+ uurelativize(from, to, pvp)
X+ 	char *from, *to;
X+ 	char **pvp;
X+ {
X+ 	register char **pxp = pvp;
X+ 	char expfrom[MAXNAME], expto[MAXNAME];
X+ 
X+ 	expand(from, expfrom, &expfrom[sizeof expfrom - 1], CurEnv);
X+ 	expand(to, expto, &expto[sizeof expto - 1], CurEnv);
X+ 
X+ 	/*
X+ 	 * supposing that we've got something, should
X+ 	 * we add "from!" or remove "to!"?
X+ 	 */
X+ 	if (pvp[0] != NULL)
X+ 	    if (pvp[1] == NULL || strcmp(pvp[1], "!") != 0 ||
X+ 		    /*strcasecmp?*/ strcmp(pvp[0], expto) != 0) {
X+ 		/* either local name, no UUCP address, or not to "to!"	*/
X+ 		/* ==> prepend address with "from!"			*/
X+ 
X+ 		/* already there? */
X+ 		if (pvp[1] == NULL || strcmp(pvp[1], "!") != 0 ||
X+ 			/*strcasecmp?*/ strcmp(pvp[0], expfrom) != 0) {
X+ 		    /* no, put it there */
X+ 		    while (*pxp != NULL)
X+ 			pxp++;
X+ 		    do
X+ 			pxp[2] = *pxp;
X+ 		    while (pxp-- != pvp);
X+ 		    pvp[0] = newstr(expfrom);
X+ 		    pvp[1] = "!";
X+ 		}
X+ 	    } else {
X+ 		/* address is to "to!" -- remove if not "to!user" */
X+ 		for (pxp = &pvp[2]; *pxp != NULL && strcmp(*pxp, "!") != 0; pxp++);
X+ 		if (*pxp != NULL)
X+ 		    for (pxp = pvp; *pxp != NULL; pxp++)
X+ 			*pxp = pxp[2];
X+ 	    }
X  }
END_OF_ida/patches/parseaddr.c.diff
if test 21670 -ne `wc -c <ida/patches/parseaddr.c.diff`; then
    echo shar: \"ida/patches/parseaddr.c.diff\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 5 \(of 8\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 8 archives.
    echo "See ida/README and ida/INSTALL for further directions."
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

-- 
Please send comp.sources.unix-related mail to rsalz at uunet.uu.net.



More information about the Comp.sources.unix mailing list