On 07/15/05(20:08) you =?windows-1251?Q?=D1=E5=F0=E3=E5=E9=20=D1=FB=F0=E5=F1=EA=E8=ED?= <p3yeqbdyi-mykgh45dkstw.ml@delegate.org> wrote in <_A3029@delegate-en.ML_> |Will the patch you sent me last time be included in the official DeleGate releases? It will be in DeleGate/9.0.3, but will not be in DeleGate/8 because it is not clear that it does not make any unexpected side effects, and it is not a fix for obvious bug in usual usage. |This one results in "ERROR MOUNT.rhost[1] imap. ? unknown" message in log file. The error shows that unresolved hostname (incomplete hostname "imap." in this case) is specified. MOUNT requires any hostname appear in the rule to be resolved at the invokation time. The message will be suppressed as the enclosed patch. |After analyzing the log file, I concluded, that rewriting hostname alone can't help me in my case, because the username passed to the server by DeleGate is "username", while server expects exactly "username@mail..ru", not just "username", nor "username@mail..ru". So, I decided to rewrite username as well and tried |MOUNT="//*%S/%S imap://imap.*%(0):143/%(1)@%(0)" and it worked at last! Congratulations :) Cheers, Yutaka -- D G Yutaka Sato <pfqcabdyi-mykgh45dkstw.ml@delegate.org> http://delegate.org/y.sato/ ( - ) National Institute of Advanced Industrial Science and Technology _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan Do the more with the less -- B. Fuller *** ../delegate9.0.3-pre30/src/mount.c Tue Jun 7 07:26:02 2005 --- src/mount.c Tue Jul 19 22:32:35 2005 *************** *** 168,173 **** --- 168,174 ---- #define DH_IHOST 0x04 #define DH_IPORT 0x08 #define DH_IHOSTPORT 0x0C + #define DH_PHOST 0x10 /* making hostname from URL-path */ typedef struct { int c_direction; *************** *** 1034,1039 **** --- 1035,1048 ---- if( streq(port,ASIS) ) dhost |= DH_VPORT; else if( streq(port,"-P") || streq(host,".i") ) dhost |= DH_IPORT; + if( dhost == 0 ){ + if( mt->Dst.u_plen == 0 && mt->Dst.u_remain ) + if( strtailchr(host) == '.' ) + /* incomplete hostname to be completed */ + { + dhost = DH_PHOST; + } + } mt->Dst.u_dhost = dhost; if( login[0] ){ *************** *** 1731,1736 **** --- 1740,1749 ---- up += strlen(up); } } + if( mt->Dst.u_dhost & DH_PHOST ){ + /* in the middle of hostname as u_path2site */ + delput = 1; + }else delput = 0; }else if( mt->Dst.u_emptysite ){