Strings expansions

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: doka
Fecha:  
A: exim-users
Asunto: Strings expansions
Hello!

I want to do such thing: I have address like system!hostname.domain.net!user
and want rewrite it as user@???, if system == hostname, and
as user@system, if system != hostname. I want use rewriting rule like this:

^([^!]+)!(\w+\.\w+)!(.*)@testdomain     "$3@${if match {$1}{^$2} {$2}{$1}}"


but there is some questions:

1) How I can match strings 'alex' and 'alex.domain.net' ?
2) 'match' operator discards values of $1, etc and restore it after 'if'

Due to this limitations rewriting rule don't work. What can I do for resolving
this problem?

-- 
      Vladimir Litovka <doka@???>, Senior Network Administrator
      =============  Don't trouble trouble until trouble troubles you.


--
* This is sent by the exim-users mailing list.  To unsubscribe send a
    mail with subject "unsubscribe" to exim-users-request@???
* Exim information can be found at http://www.exim.org/