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

Re: About canonicalize()



Alexis Yushin wrote:
> 
> Victor,
> 
> Once Victor Gamov wrote:
> >        I found out the strange behaviour of canonicalize() function
> >(IMHO) today.
> >If envelope address "from" is shown as a form: `host!host.domain!user'
> >(uucp form)
> >then canonicalize() function returns `host.domain!user<@host.uucp>'.
> 
>         Yes, it correct. It is only zmailer canonical form and
> it will be defocus back into original format. 

	If it is correct why I have problem with sending email from some my
UUCP clients to other world?
	For example: 

<smtp aif.ru vica@aif.ru 65534>: ...\
        <<- MAIL From:<uprprg.ufps.lipetsk.su!root@uprprg> BODY=8BITMIME
SIZE=2604
        ->> 501 <uprprg.ufps.lipetsk.su!root@uprprg>... invalid host
name uprprg, check your configuration. (this is abnormal, investigate!)

	The address `uprprg.ufps.lipetsk.su!root@uprprg' appearance here in
this form after canonicalize() function.  Initially, in "envelope from"
this address look like `uprprg!uprprg.ufps.lipetsk.su!root'.

> You might want
> to shortcut these addresses as a local policy with something like:
> 
>         # Weird hack... But we shortcut ! source routing
>         (.+!)*(.+)\.(.+)!(.+)<@.+>
>                 return $(rrouter "\2.\3!\4" "$origaddr" $A "" "")
>                 ;;
>         # And % too
>         (.+)%(.+)\.(.+)(.+%)*<@.+>
>                 return $(rrouter "\1%\2.\3" "$origaddr" $A "" "")
>                 ;;
> 
>         within the end of the first ssift of rrouter

	Now I add next sift "$address" entry in canonicalize function:

([^!.])!(.+)    canonicalize "\2"; return ;;
([^!]+)!(.+)    focus "\2<@\1>" ; return ;;


	It's may be incorrect in some cases but work properly now.

--
	CU, Victor Gamov