Article delegate-en/3027 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A3025@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: A question about MOUNT
14 Jul 2005 20:48:44 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

On 07/14/05(23:47) you <p3yeqbdyi-p5lznxi5jfxr.ml@ml.delegate.org> wrote
in <_A3025@delegate-en.ML_>
 |I tried to solve this problem with rewriting destination server path
 |with MOUNT option looking something like this:
 |MOUNT="//*%S/%S imap://imap.*%(0):143/%(1)".

I think this can be simply as this since ":143" is not necessary:

   MOUNT="//* imap://imap.*"

Or it can be as this since %S is referred in the order.

   MOUNT="//*%S/%S imap://imap.*%S:143/%S"

 |I tried many different variants of MOUNT syntax. Some of them failed
 |with a record in log file saying that server "imap." not found, one of
 |them resulted in path imap://imap./mail.ru/username.
 |
 |So, is there any way to solve my problem?
 |
 |And I have the following proposals for future releases of DeleGate:
 |- write a more clear manual on using scanf pattern matching in MOUNT;
 |- use sed-like or perl-like regexp in MOUNT, ex.
 |MOUNT="s/search/replace/";

MOUNT is a generic scheme to be used for rewriting from virtual
(client-side) URL to real (server-side) URL in request message,
and for rewriting real URL to virtual URL in response message.
To make specifying this bi-directional rewriting in a single and
simple pattern pair, and make the matching be light weight for large
amount of URLs in response, there is restrictions.
Originally it was for Gopher, HTTP and NNTP, then applied to other
protocols.  Most of restrictions are not necessary for other
protocols like IMAP which uses only uni-directional rewriting.

 |- remove the irrelevant slash "/" simbol in the above example, i.e.
 |make possible doing "imap://imap.mail.ru/username" instead of
 |"imap://imap./mail.ru/username" with MOUNT.

This was because MOUNT was not designed to be used for rewriting
hostname part of URL, at least at the beginning of its development.
To cope with the case, it might be modified like the enclosed patch.

Cheers,
Yutaka
--
  D G   Yutaka Sato <y.sato@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	Fri Jul 15 05:38:06 2005
***************
*** 1731,1736 ****
--- 1731,1740 ----
  					up += strlen(up);
  				}
  			}
+ 			if( strtailchr(url) == '.' && mt->Dst.u_plen == 0 ){
+ 				/* incomplete hostname to be completed */
+ 				delput = 1;
+ 			}else
  			delput = 0;
  		}else
  		if( mt->Dst.u_emptysite ){

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V