🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #77

Mail 2.12 alternates bug and fix

#77
From: utzoodecvaxharpoeaglemhtsaalicea...
Date: Sun, 27 Feb 1983 18:04
66 lines
2124 bytes
Mail 2.12 does not handle the alternates as well as it can; it
is much too literal about it.  If you have bar!bletch as one
of your alternates and mail comes to you as foo!bar!bletch,
Mail won't match it up with the arguments and will end up
replying back to you as well though you didn't want it to.
Here is the fix to names.c to take care of this (for those of
you without strchr(), use index() instead):

*** onames.c	Sun Feb 27 13:15:49 1983
--- names.c	Sun Feb 27 14:44:03 1983
***************
*** 8,14
  
  #include "rcv.h"
  
! static char *SccsId = "@(#)names.c	2.5 2/26/82";
  
  /*
   * Allocate a single element of a name list,

--- 8,14 -----
  
  #include "rcv.h"
  
! static char *SccsId = "@(#)names.c	2.6 2/27/83";
  
  /*
   * Allocate a single element of a name list,
***************
*** 776,781
  	register struct name *np;
  	char name[];
  {
  	register struct name *p;
  
  	for (p = np; p != NIL; p = p->n_flink)

--- 776,782 -----
  	register struct name *np;
  	char name[];
  {
+ 	char *strchr();
  	register struct name *p;
  
  	for (p = np; p != NIL; p = p->n_flink)
***************
*** 779,785
  	register struct name *p;
  
  	for (p = np; p != NIL; p = p->n_flink)
! 		if (icequal(p->n_name, name)) {
  			if (p->n_blink == NIL) {
  				if (p->n_flink != NIL)
  					p->n_flink->n_blink = NIL;

--- 780,789 -----
  	register struct name *p;
  
  	for (p = np; p != NIL; p = p->n_flink)
! 		if ((strchr(name, '!') && strlen(p->n_name) >= strlen(name) &&
! 		    icequal(p->n_name + (strlen(p->n_name) - strlen(name)),
! 			    name)) ||
! 		    (!strchr(name, '!') && icequal(p->n_name, name))) {
  			if (p->n_blink == NIL) {
  				if (p->n_flink != NIL)
  					p->n_flink->n_blink = NIL;
Technical Details
Message-ID: <bnews.alice.1544>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!decvax!harpo!eagle!mhtsa!alice!alb
Newsgroups: net.bugs,net.bugs.4bsd
Title: Mail 2.12 alternates bug and fix
Article-I.D.: alice.1544
Posted: Sun Feb 27 18:04:08 1983
Received: Mon Feb 28 01:06:28 1983
Subject: Mail 2.12 alternates bug and fix
Date: Sun, 27 Feb 1983 18:04:08 +0000
Message-ID: <bnews.alice.1544>