[comp.sources.bugs] Bug in dropsbr in mh 6.6

luke@tasis.utas.oz (Luke Visser) (03/15/89)

In the POP mail handling of mh 6.6 there is a bug that stuffs up mail
delivery for some x400 compatible names.  If the name has a '.' in it
then the spop mail handler uses an incorrect map file for the pop
mailbox.
	e.g. if the user is l.j.visser then the mapfile will be .l.map 
	     instead of .l.j.visser.map

The bug fix (that works ok) is as follows (in proc map_name):

>     if ((dp = index (cp = r1bindex (file, '/'), '.')) == NULL)
> 	dp = cp + strlen (cp);
---
<     cp = r1bindex (file, '/');
<     dp = cp + strlen (cp);

there is two places where this needs to be applied.  One is
mh/uip/dropsbr.c and the other is mh/support/pop/mmdfII/pop/dropsbr.c.
The first one I know is necessary and I'm assuming that the second
one is also as it uses the same mapping file but different
transport mechanism.

This is a rather obvious oversight as it causes problems for any
name with a '.' in it.  Since the original code blatantly indexes upto
the first '.' there isn't any decent reason for this is there?

Luke Visser
---------------------------------------------------------------------------
"I'm a Tasmanian"	- Albert Einstein
Snail: Uni of Tasmania, Box 252C GPO, Hobart 7001, Tasmania, Australia.
ACSnet: luke@tasis.utas.oz	ARPA: luke%tasis.utas.oz@uunet.uu.net
UUCP: {enea,hplabs,mcvax,uunet,ukc}!munnari!tasis.utas.oz!luke