[comp.mail.elm] Bug in ELM 2.2 PL16

postman@tecserve.UUCP (Elm Postman) (03/13/90)

After a bit of a search, a bug has been found in the current
release of ELM 2.2 at patch level #16.  It is as follows:~

In the file addr_util.c, routine add_site(), the code should be
modified as follows.

	char	local_buffer[SLEN]
	char	*strip_parens();

	if (strcmp(site, "uucp") != 0)
	  if (strcmp(site, lastsite) != 0){
/*BUG	    if (strcmp(site, hostname) != 0){*/

This routine is resposible for the building of the return
mailpath, using the uucp From and >From lines in the headers.  It
also does basic path optimising and checking.  For example, it
makes sure that we don't have ...!swindon!swindon!.... or
..!uucp!.. \.  It also is supposed to make sure that we don't go
through our hostname at all.  Let me explain.

If you have a machine (in our case swindon) through which all
mail get routed, then a person is referenced from outside as
swindon!j_bloggs (for example).  on swindon, j_bloggs's mail file
could be "Forward to tecserve!joeb"
The headers of the incoming mail may look something like this.

	From uucp .......
	>From uucp ....... remote from swindon
	>From jose ....... remote from tecserve

Now when we try to build the return address, we will make three
calls to add_site.

	add_site("",swindon,"");
	add_site(swindon,tecserve,swindon);
	add_site(swindon!tecserve,jose,tecserve);

which will finally return the correct return path

	swindon!tecserve!jose

However, had we not made the change, ELM would have returned an
incorrect path of

	swindon!jose

missing out tecserve, because it is the same as hostname.  (I
hope that this is making sense!).  If the optimisation of
circular mail references is to be done at this level (i.e. within
add_site) then we need to add a line something like

	if (strcmp(site, hostname) == 0){
		strcpy(buffer,hostname);
	}

to null the path string, and start again.

Finally, to make all of this work, you are all running Configure
and saying NO to "Use Reply-To: and From: addresses? [n]" aren't
you ?!  I mean, who does !

-- 

Andrew Wallace				   uunet!ingr!swindon!a_wallace
Intergraph, Swindon, U.K.		ingr!swindon!a_wallace@ingr.com