Re: [exim] System Filter regex problem.

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Thomas Jacob
Date:  
À: exim-users
Sujet: Re: [exim] System Filter regex problem.
Maybe it's because $ usually denotes the end of the line,
but you are substituting text in a multi-line string.

Switch into multiline mode, if this is at all possible
with exim's regexp feature.

Alternatively, lose the \$, Perl regexps
are "greedy" by default, hence ^.+ should match
the whole string.

On Thu, 2007-06-21 at 00:06 +0200, Michael Strauss wrote:
> Hallo,
>
> I fail to write an appropriate system filter.
>
> The following line works:
> headers add "X-Mailbox: ${sg{dummy dummy dummy}{\\N^.+\$\\N}{ersetzt}}"
> result:
> X-Mailbox: ersetzt
>
> All (.+) between start (^) and end ($) is replaced with "ersetzt":
>
> The following line does not work:
> headers add "X-Mailbox: ${sg{$header_Received: }{\\N^.+\$\\N}{ersetzt}}"
> result:
> X-Mailbox: from michael by merkur.hd.mszet.de with local (Exim 4.63)
>         (envelope-from <michael@???>)
>         id 1I0Odx-0000uz-Fw
>         for michael@???; Mon, 18 Jun 2007 23:20:13 +0200

>
> Why? The Regex is the same above ...
>
> I using Exim version 4.63 with Debian Etch.
>
> Greetings
> Michael Strauss
>