[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug found



According to Matti Aarnio:

> > 2) $MAILSHARE/db/localnames   (is empty)
> > 
> >        #a This *entire* file must be kept sorted (comments included!)
> >        #b $hostname need not be in this file
> 
>   That is your trouble !
> It is nice to know it works (most of the time) even with empty "localnames",
> but adding there             ^^^^^^^^^^^^^^^^
> 	-------------
> 	ccsun
> 	ccsun.tuke.cs
> 	-------------

Already I know, why not everytime. Let's have a look at following in the
rrouter.cf :

	(.*)<@(.+)>(.*)
		if [ $(deliver "\2") ]; then
			address="\1<@>\3"
		elif [ "\2" = $hostname ]; then
			address="\1<@>\3"
		fi ;;

Probably author had in mind that if "deliver", which finding out whether
"to" address points to one of the local names of host, has failed then it
try compare with $hostname variable as well. That's right but [ ... ] style
of comparison is case sensitive and in this case aahost.bbb.ccc for
instance, is not same as AAHOST.Bbb.Ccc. Since better would be:  


	(.*)<@(.+)>(.*)
		tmp="$(recase -l "\2")"		
		if [ $(deliver "\2") ]; then
			address="\1<@>\3"
		elif [ $tmp = $hostname ]; then
			address="\1<@>\3"
		fi ;;

local name of host ($hostname variable) NEED NOT to be in the "localnames"
file. I think that was idea of this construction, wasn't that ?


Kamil KUKURA
kamk@ccsun.tuke.cs