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

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


On 07/14/05(23:47) you <> 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./
 |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 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://" instead of
 |"imap://imap./" 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.

  D G   Yutaka 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;
  		if( mt->Dst.u_emptysite ){

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