Article delegate-en/988 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:<_A987@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: Changing user instead of server, again
22 Jan 2001 17:04:45 GMT Christian Couder <pyebqbdyi-tqqtzd7dazfr.ml@ml.delegate.org>


On Tue, Jan 23, 2001 at 12:55:06AM +0900, Yutaka Sato wrote:
> Hi,

Hi,

>  |> A pair of MOUNT parameters:
>  |> 
>  |>   MOUNT="toto_*            pop://localhost/toto@titi.com"
>  |>   MOUNT="//titi.com/toto_* pop://localhost/toto@titi.com"
>  |> 
>  |> will do.
>  |
>  |The problem here is that the 'toto' part can change too. In fact I 
>  |would like the above rewrites to work for any 'toto' and any 'stuff'.
> 
> I think I've got a clearly specified requirement at last, but
> it might be extended yet :)

Sorry, but you know I still don't know exactly what my client want, and I think my client don't even know himself what he wants :)

> Another mechanism for arbitrary rewriting in completely user
> defined way, external filter, may be desirable. 
> 
>   SERVER=pop://localhost FTOSV=canonuser-filter
> 
> Basically canonuser-filter for requirements can be realized with
> sed like this:
>   sed -e '/^USER[^@]*$/s/^M*$/@titi.com&/' -e '/^USER/s/_.*@/@/'
> (^M must be raw carriage-return to work)
> But this will no work except we can disable its buffering for
> standard output.

When I first looked at DeleGate, I tryed to use FTOSV and FFROMCL but I was not able to make them work, perhaps because of the buffering.

Anyway, perhaps there could be an option called for example FURLREWRITE it would work like FTOXX except you would pass something like 'host/user' to the script and it should output something like 'newhost/newuser'. Do you think that could be done (not necessarily by you) ?

> A possible solution is using sed line by line
> as follows:
> 
> #!/bin/sh
> while read LINE; do
>  echo "$LINE" \
>  | sed -e '/^USER[^@]*$/s/^M*$/@titi.com&/' -e '/^USER/s/_.*@/@/'
> done

Ok, many thanks again. I think I will be able to do anything my client might want with something like this.

Regards,
Christian.


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