v08i051: Patch for UK-1.4 mail configuration

sources-request at mirror.UUCP sources-request at mirror.UUCP
Tue Feb 10 04:16:12 AEST 1987


Submitted by: Jim Crammond <jim at cs.hw.ac.uk>
Mod.sources: Volume 8, Issue 51
Archive-name: uk-1.4.pch

[  The UK-1.4 sendmail package was published back in Volume 4.  I have
   taken the liberty of including the first few lines of the README
   so that people not currently running the system can get an idea of
   what it does.  --r$  ]

	UK-1.4 to UK-1.4a Upgrade

This file contains a diff listing between 1.4 and 1.4a versions of
the UK sendmail configuration package, suitable for use with the "patch"
program.  The listing contains fixes to seven problems which have come to
light.  These problems are described below. The following files are affected:
      	Rules.a
      	Mailers.a
      	MAKE
      	chn/README
      	Support/muucp.c
      	xtras/hhmailclean.c

To run, pipe this message through "patch -p" in the appropriate directory.
      					Jim Crammond


1)  Problem:	BSD4.3 and Sun 3.0 sendmail's put transport addresses from
	      	ruleset 0 into the header rulesets. This causes problems on
      		the uucp channel, where transport addresses use a different
	      	syntax to header addresses.
    Fix:	If BSD4.3 is defined, uucp transport addresses are formatted
      		such that they can be detected and left unaffected in the
	      	uucp header ruleset.

2)  Problem:	if full name is unknown, an illegal from: header can be
	      	generated which fussy mmdf mailers don't like.
    Fix:	change $q definition to omit the angle brackets.

3)  Problem:	Resent-Date puts in original date when added by sendmail.
    Fix:	change $a to $b

4)  Problem:	$w doesn't work properly in the rulesets in Sun 3.0 sendmail.
    Fix:	$=w works okay - change documentation to use $=w.

5)  Problem:	mapname is undefined in muucp.c if SYSINFO is not defined.
    Fix:	define mapname(x) to x if SYSINFO is not defined.

6)  Problem:	hhmailclean gives preference to Reply-To addresses over Sender.
    Fix:	change Reply-To to Errors-To.

7)  Problem:	hhmailclean cleans away non-mail transfers (e.g. news)
    Fix:	check return value of gethost in appropriate places

#! /bin/sh
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
# If all goes well, you will see the message "End of shell archive."
# Contents:  INTRO PATCHES
# Wrapped by rs at mirror on Mon Feb  9 13:13:30 1987
PATH=/bin:/usr/bin:/usr/ucb; export PATH
echo shar: extracting "'INTRO'" '(1987 characters)'
if test -f 'INTRO' ; then 
  echo shar: will not over-write existing file "'INTRO'"
else
sed 's/^X//' >INTRO <<'@//E*O*F INTRO//'
XSendmail Configuration Package UK-1.4
X======== ============= ======= ======
X
XOverview
X--------
XThis package provides you with tools to generates a fully domain based
Xsendmail configuration file from domain and channel tables in a format
Xsimilar to that used by MMDF.
X
XThe configuration essentially comprises of three parts: the domain tables,
Xthe channel tables and the mailer specifications.  The following diagram
Xshows how all three pieces fit together.
X
X                                             -----------   [  mailer,  ]
X                                             | channel |-->[   host,   ]
X             ----------  fully qualified    /| tables  |   [ transport ]
Xincoming     | domain |  domain addresses  / -----------   [ addresses ]
Xaddresses -->| tables |--------->---------<
X             ----------                    \ -----------
X                                            \| mailer  |       header
X                                             | specs   |---> addresses
X                                             -----------
X
XThe domain tables convert addresses given to sendmail into fully qualified
Xdomain addresses; these are then passed to the channel tables which select
Xthe <network, host, transport address> triple required for message delivery.
X
XThe domain addresses are then passed to the mailer specifications where
Xthey are converted to a form suitable for the mail headers for that
Xparticular network.
X
XAnyone who has read the Sendmail Implementation Guide should recognise
Xthe similarity between this and the rulesets diagram.  Basically, the
Xdomain tables  correspond to ruleset 3, the channel tables to ruleset 0
Xand the mailer specifications to the mailer specific rulesets.
X
XThis README will hopefully explain how to build these pieces and thus
Xgenerate a configuration file.
X
XThe package also contains a number of support programs that often provide
Xa better interface between mail transport protocols and sendmail than the
X"standard" programs.
@//E*O*F INTRO//
if test 1987 -ne "`wc -c <'INTRO'`"; then
    echo shar: error transmitting "'INTRO'" '(should have been 1987 characters)'
fi
fi # end of overwriting check
echo shar: extracting "'PATCHES'" '(13085 characters)'
if test -f 'PATCHES' ; then 
  echo shar: will not over-write existing file "'PATCHES'"
else
sed 's/^X//' >PATCHES <<'@//E*O*F PATCHES//'
X
X
X
Xdiff -r -c UK-1.4/MAKE UK-1.4a/MAKE
X*** UK-1.4/MAKE	Wed Feb 12 12:20:34 1986
X--- UK-1.4a/MAKE	Sat Oct 11 16:20:51 1986
X***************
X*** 166,171
X  fi
X  
X  #
X  #  now start creating the files
X  #
X  echo -n "
X
X--- 166,184 -----
X  fi
X  
X  #
X+ #  if uucp is defined then see if we need the BSD4.3/Sun 3.0 hack
X+ #
X+ if [ -n "$uucpname" ]
X+ then	echo -n "
X+ 	Are you using bsd4.3 or Sun 3.0 sendmail? (y|n) "
X+ 	read reply
X+ 	if [ $reply = 'y' ]
X+ 	then
X+ 		bsd43=true
X+ 	fi
X+ fi
X+ 
X+ #
X  #  now start creating the files
X  #
X  echo -n "
X***************
X*** 237,242
X  if [ -z "$nonrsformat" ]
X  then
X  	echo "define(\`NRSFORMAT')" >> $host.mc
X  fi
X  
X  if [ -n "$ethername" ]
X
X--- 250,260 -----
X  if [ -z "$nonrsformat" ]
X  then
X  	echo "define(\`NRSFORMAT')" >> $host.mc
X+ fi
X+ 
X+ if [ -n "$bsd43" ]
X+ then
X+ 	echo "define(\`BSD4.3')" >> $host.mc
X  fi
X  
X  if [ -n "$ethername" ]
X
Xdiff -r -c UK-1.4/Mailers.a UK-1.4a/Mailers.a
X*** UK-1.4/Mailers.a	Sun Apr 27 12:54:12 1986
X--- UK-1.4a/Mailers.a	Sat Oct 11 16:20:46 1986
X***************
X*** 135,141
X  S26
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at CSNETNAME		add local domain name
X! uucpm.m4        508594640   217   4     100644  754       `
X  ###############################################################################
X  ###############################################################################
X  #####
X
X--- 135,141 -----
X  S26
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at CSNETNAME		add local domain name
X! uucpm.m4        526661348   217   4     100644  811       `
X  ###############################################################################
X  ###############################################################################
X  #####
X***************
X*** 154,159
X  #  can't produce a correct routed 822 address from another style
X  #
X  S23
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at UUCPNAME		add local hostname
X  luucpm.m4.old   508594686   217   4     100644  594       `
X
X--- 154,161 -----
X  #  can't produce a correct routed 822 address from another style
X  #
X  S23
X+ ifdef(`BSD4.3',
X+ `R$+!$+			$@$2			return transport addr')
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at UUCPNAME		add local hostname
X  
X***************
X*** 156,161
X  S23
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at UUCPNAME		add local hostname
X  luucpm.m4.old   508594686   217   4     100644  594       `
X  ###############################################################################
X  ###############################################################################
X
X--- 158,164 -----
X  `R$+!$+			$@$2			return transport addr')
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at UUCPNAME		add local hostname
X+ 
X  luucpm.m4.old   508594686   217   4     100644  594       `
X  ###############################################################################
X  ###############################################################################
X***************
X*** 173,179
X  S22
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at LUUCPNAME		add local hostname
X! uucpm.m4.old    508594687   217   4     100644  688       `
X  ###############################################################################
X  ###############################################################################
X  #####
X
X--- 176,182 -----
X  S22
X  R$+@$+			$@$1@$2			address ok
X  R$+			$@$1 at LUUCPNAME		add local hostname
X! uucpm.m4.old    526661360   217   4     100644  745       `
X  ###############################################################################
X  ###############################################################################
X  #####
X***************
X*** 191,196
X  #  Addresses are converted back to uucp style.
X  #
X  S23
X  R$+@$+			$:$>8$1@$2		convert to uucp style
X  R$+!$+			$@$1!$2			address ok
X  R$+			$@UUCPNAME!$1		add local domain name
X
X--- 194,201 -----
X  #  Addresses are converted back to uucp style.
X  #
X  S23
X+ ifdef(`BSD4.3',
X+ `R$+!$+			$@$2			return transport addr')
X  R$+@$+			$:$>8$1@$2		convert to uucp style
X  R$+!$+			$@$1!$2			address ok
X  R$+			$@UUCPNAME!$1		add local domain name
X***************
X*** 194,196
X  R$+@$+			$:$>8$1@$2		convert to uucp style
X  R$+!$+			$@$1!$2			address ok
X  R$+			$@UUCPNAME!$1		add local domain name
X
X--- 199,202 -----
X  R$+@$+			$:$>8$1@$2		convert to uucp style
X  R$+!$+			$@$1!$2			address ok
X  R$+			$@UUCPNAME!$1		add local domain name
X+ 
X
Xdiff -r -c UK-1.4/Rules.a UK-1.4a/Rules.a
X*** UK-1.4/Rules.a	Fri Feb 21 11:14:04 1986
X--- UK-1.4a/Rules.a	Tue Oct 14 11:45:44 1986
X***************
X*** 1,5
X  !<arch>
X! base.m4         508594731   217   4     100644  3142      `
X  ##################################################################
X  ##################################################################
X  #####
X
X--- 1,5 -----
X  !<arch>
X! base.m4         529670681   217   4     100644  3146      `
X  ##################################################################
X  ##################################################################
X  #####
X***************
X*** 45,51
X  # delimiter (operator) characters (note '~' has been added)
X  Do.:%@!^=/[]~
X  # format of a total name
X! Dq$?x$x $.<$g>
X  # SMTP login message
X  De$j Sendmail $v/$V ready at $b
X  
X
X--- 45,51 -----
X  # delimiter (operator) characters (note '~' has been added)
X  Do.:%@!^=/[]~
X  # format of a total name
X! Dq$?x$x <$g>$|$g$.
X  # SMTP login message
X  De$j Sendmail $v/$V ready at $b
X  
X***************
X*** 116,122
X  H?D?Date: $a
X  H?M?Message-Id: <$p.$t@$j>
X  H?F?Resent-From: $q
X! H?D?Resent-Date: $a
X  H?M?Resent-Message-Id: <$p.$t@$j>
X  HSubject:
X  H?R?Received: $?sfrom $s by $j; $b$.
X
X--- 116,122 -----
X  H?D?Date: $a
X  H?M?Message-Id: <$p.$t@$j>
X  H?F?Resent-From: $q
X! H?D?Resent-Date: $b
X  H?M?Resent-Message-Id: <$p.$t@$j>
X  HSubject:
X  H?R?Received: $?sfrom $s by $j; $b$.
X***************
X*** 141,147
X  ifdef(`JANETNAME',`include(hhcpm.m4)')
X  ifdef(`BITNETNAME',`include(bitnetm.m4)')
X  ifdef(`CSNETNAME',`include(pmdfm.m4)')
X! rules.m4        508594751   217   4     100644  3240      `
X  ###############################################################################
X  ###############################################################################
X  #####
X
X--- 141,147 -----
X  ifdef(`JANETNAME',`include(hhcpm.m4)')
X  ifdef(`BITNETNAME',`include(bitnetm.m4)')
X  ifdef(`CSNETNAME',`include(pmdfm.m4)')
X! rules.m4        526661238   217   4     100644  3263      `
X  ###############################################################################
X  ###############################################################################
X  #####
X***************
X*** 179,185
X  ')
X  ifdef(`UUCPNAME',`
X  R<~$+>$+.uucp		<\\~$1>$2.uucp		band-aid for uuxqt
X! R<$+>$-.uucp		$#uucp$@$2$:$1		external uucp mail
X  ')
X  ifdef(`JANETNAME',`
X  R<$+>$+.janet		$#hhcp$@$2$:$1		janet mail
X
X--- 179,185 -----
X  ')
X  ifdef(`UUCPNAME',`
X  R<~$+>$+.uucp		<\\~$1>$2.uucp		band-aid for uuxqt
X! R<$+>$-.uucp		$#uucp$@$2$:'ifdef(`BSD4.3',`$2!')`$1		external uucp mail
X  ')
X  ifdef(`JANETNAME',`
X  R<$+>$+.janet		$#hhcp$@$2$:$1		janet mail
X***************
X*** 254,259
X  #  this ensures that $u has at least one '@' in (if percent style)
X  R$+%$+			$1@$2			convert '%'s to '@'s
X  R$+@$+@$+		$1%$2@$3		then reduce to only one '@'
X  rules1.m4       508594753   217   4     100644  3447      `
X  ###############################################################################
X  ###############################################################################
X
X--- 254,260 -----
X  #  this ensures that $u has at least one '@' in (if percent style)
X  R$+%$+			$1@$2			convert '%'s to '@'s
X  R$+@$+@$+		$1%$2@$3		then reduce to only one '@'
X+ 
X  rules1.m4       508594753   217   4     100644  3447      `
X  ###############################################################################
X  ###############################################################################
X***************
X*** 357,363
X  R$*@$-:$+.$+		$1@$3.$2.$4		u at b:c:d.a -> u at d.c.b.a
X  ')
X  
X! version.m4      508594758   217   4     100644  3257      `
X  #
X  #	@(#)version.m4	UK-1.4 sendmail configuration		12/2/86
X  #
X
X--- 358,364 -----
X  R$*@$-:$+.$+		$1@$3.$2.$4		u at b:c:d.a -> u at d.c.b.a
X  ')
X  
X! version.m4      529253061   217   4     100644  3563      `
X  #
X  #	@(#)version.m4	UK-1.4 sendmail configuration		12/2/86
X  #
X***************
X*** 362,368
X  #	@(#)version.m4	UK-1.4 sendmail configuration		12/2/86
X  #
X  
X! DVUK-1.4
X  
X  #
X  #	UK-1.4  12/2/86		jim
X
X--- 363,369 -----
X  #	@(#)version.m4	UK-1.4 sendmail configuration		12/2/86
X  #
X  
X! DVUK-1.4a
X  
X  #
X  #	UK-1.4a 9/10/86		jim
X***************
X*** 364,369
X  
X  DVUK-1.4
X  
X  #
X  #	UK-1.4  12/2/86		jim
X  #	COMMENTS:
X
X--- 365,377 -----
X  
X  DVUK-1.4a
X  
X+ #
X+ #	UK-1.4a 9/10/86		jim
X+ #	COMMENTS:
X+ #	Band-aid for BSD4.3 (& Sun 3.0). The transport address goes through
X+ #	the header rulesets (big sigh) so have to do a kludge for uucp.
X+ #	$a -> $b in Resent-Date field: this seems to be what you want.
X+ #	change to $q: don't emit angle brackets if full name is unknown.
X  #
X  #	UK-1.4  12/2/86		jim
X  #	COMMENTS:
X
Xdiff -r -c UK-1.4/Support/muucp.c UK-1.4a/Support/muucp.c
X*** UK-1.4/Support/muucp.c	Sun Feb  9 13:56:14 1986
X--- UK-1.4a/Support/muucp.c	Sat Oct 11 16:20:58 1986
X***************
X*** 13,18
X  fprintf(f, "S %s %s %s -%s %s 0666\n", a, b, c, d, e);\
X  }
X  
X  
X  main(argc, argv)
X  char *argv[];
X
X--- 13,21 -----
X  fprintf(f, "S %s %s %s -%s %s 0666\n", a, b, c, d, e);\
X  }
X  
X+ #ifndef SYSINFO
X+ #define mapname(x)	x
X+ #endif SYSINFO
X  
X  main(argc, argv)
X  char *argv[];
X
Xdiff -r -c UK-1.4/chn/README UK-1.4a/chn/README
X*** UK-1.4/chn/README	Mon Mar 17 13:28:07 1986
X--- UK-1.4a/chn/README	Sat Oct 11 16:20:54 1986
X***************
X*** 155,162
X  To do this we need to "generalise" the host dependent parts of the
X  channel tables so that all the workstations can use the same <host>.chn.
X  
X! The trick is to use "$w" when specifying the host specific names in the
X! local.chn table (e.g. $w.cs.hw.ac.uk);  and to have, in above example,
X  all ten workstations in the ether.chn.
X  
X  The two key components to this are that: (a) sendmail will determine
X
X--- 155,162 -----
X  To do this we need to "generalise" the host dependent parts of the
X  channel tables so that all the workstations can use the same <host>.chn.
X  
X! The trick is to use "$=w" when specifying the host specific names in the
X! local.chn table (e.g. $=w.cs.hw.ac.uk);  and to have, in above example,
X  all ten workstations in the ether.chn.
X  
X  The two key components to this are that: (a) sendmail will determine
X***************
X*** 161,165
X  
X  The two key components to this are that: (a) sendmail will determine
X  whether a domain is local or not before it attempts to locate the
X! domain in the other channel tables, and (b) sendmail's "$w" macro expands
X  to the local hostname at runtime.
X
X--- 161,165 -----
X  
X  The two key components to this are that: (a) sendmail will determine
X  whether a domain is local or not before it attempts to locate the
X! domain in the other channel tables, and (b) sendmail's "$=w" class expands
X  to the local hostname at runtime.
X
Xdiff -r -c UK-1.4/xtras/hhmailclean.c UK-1.4a/xtras/hhmailclean.c
X*** UK-1.4/xtras/hhmailclean.c	Fri Mar 21 15:33:29 1986
X--- UK-1.4a/xtras/hhmailclean.c	Sun Oct 12 11:16:12 1986
X***************
X*** 120,126
X  
X  	strcpy(pafile,pbfile);
X  	pafile[1] = 'A';
X! 	host = gethost(pafile);
X  
X  	if ((msgfp = fopen(pbfile, "r")) == NULL)
X  		return;
X
X--- 120,127 -----
X  
X  	strcpy(pafile,pbfile);
X  	pafile[1] = 'A';
X! 	if ((host = gethost(pafile)) == NULL)
X! 		return;
X  
X  	if ((msgfp = fopen(pbfile, "r")) == NULL)
X  		return;
X***************
X*** 158,164
X  
X  	strcpy(pafile,pbfile);
X  	pafile[1] = 'A';
X! 	host = gethost(pafile);
X  
X  	if ((msgfp = fopen(pbfile, "r")) == NULL)
X  		return;
X
X--- 159,166 -----
X  
X  	strcpy(pafile,pbfile);
X  	pafile[1] = 'A';
X! 	if ((host = gethost(pafile)) == NULL)
X! 		return;
X  
X  	if ((msgfp = fopen(pbfile, "r")) == NULL)
X  		return;
X***************
X*** 267,273
X  	while (fgets(buf, BUFSIZ, msgfp) != NULL && buf[0] != '\n')
X  	{	/*
X  		 *  extract sender from one of the following headers,
X! 		 *  in order of preference: "Reply-To", "Sender", "From"
X  		 */
X  		if (strncmp(buf, "Reply-To:", 9) == 0)
X  		{	strcpy(sndbuf, &buf[9]);
X
X--- 269,275 -----
X  	while (fgets(buf, BUFSIZ, msgfp) != NULL && buf[0] != '\n')
X  	{	/*
X  		 *  extract sender from one of the following headers,
X! 		 *  in order of preference: "Errors-To", "Sender", "From"
X  		 */
X  		if (strncmp(buf, "Errors-To:", 10) == 0)
X  		{	strcpy(sndbuf, &buf[10]);
X***************
X*** 269,276
X  		 *  extract sender from one of the following headers,
X  		 *  in order of preference: "Reply-To", "Sender", "From"
X  		 */
X! 		if (strncmp(buf, "Reply-To:", 9) == 0)
X! 		{	strcpy(sndbuf, &buf[9]);
X  			saved = 2;
X  		}
X  		else if (saved < 2 && strncmp(buf, "Sender:", 7) == 0)
X
X--- 271,278 -----
X  		 *  extract sender from one of the following headers,
X  		 *  in order of preference: "Errors-To", "Sender", "From"
X  		 */
X! 		if (strncmp(buf, "Errors-To:", 10) == 0)
X! 		{	strcpy(sndbuf, &buf[10]);
X  			saved = 2;
X  		}
X  		else if (saved < 2 && strncmp(buf, "Sender:", 7) == 0)
X
@//E*O*F PATCHES//
if test 13085 -ne "`wc -c <'PATCHES'`"; then
    echo shar: error transmitting "'PATCHES'" '(should have been 13085 characters)'
fi
fi # end of overwriting check
echo shar: "End of shell archive."
exit 0



More information about the Mod.sources mailing list