Re: [Exim] PCRE regex

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Michael Jakscht
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] PCRE regex
Hi,

thanx for all of your answers, they helped a lot, of course.

Kirill Miazine <km-lists@???> wrote:
>
>     /^([a-z]+)_([a-z]+)(\/InfoTL\.RZV)@vit.de/

>
> $1 = user
> $2 = name
> $3 = InfoTL.RZV
>
> Now create your new address - $1.$2$3/vit.de.



Okay, this was way good ;-) Thanx,

I made

/^([a-z]+)[\_|\.]([a-z]+)(\/InfoTL\.RZV)@vit.de/i

out of it to catch both dot and underscore.
I tried to implement this one as a rewriting rule in exim now
as this rule shows:


======================================
begin rewrite

^([a-z]+)[\_|\.]([a-z]+)(\/InfoTL\.RZV)@vit.de/i        "$1 $2
<$1.$2@???>" Eh
======================================



So far I just don't exactly know if this notation for exim is allright, I
just looked in the spec but couldn't find this so fast.
Tried the debug run with -bh and the following showed up... No good..



======================================
exim -bh 172.16.1.18

[...]
>>> michael.jakscht@??? in

"^([a-z]+)[_|.]([a-z]+)(/InfoTL.RZV)@vit.de/i"? no (end of list)
>>> Juergen_Struckhoff/InfoTL.RZV@??? in

"^([a-z]+)[_|.]([a-z]+)(/InfoTL.RZV)@vit.de/i"? no (end of list)
[...]
======================================


Okay, hope I made a really stupid mistake again... *lol*

Michael