On Tue, Jan 23, 2001 at 12:55:06AM +0900, Yutaka Sato wrote:
> |> A pair of MOUNT parameters:
> |> MOUNT="toto_* pop://email@example.com"
> |> MOUNT="//titi.com/toto_* pop://firstname.lastname@example.org"
> |> 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/^Memail@example.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:
> while read LINE; do
> echo "$LINE" \
> | sed -e '/^USER[^@]*$/s/^Mfirstname.lastname@example.org&/' -e '/^USER/s/_.*@/@/'
Ok, many thanks again. I think I will be able to do anything my client might want with something like this.