Re: [EXIM] (system) filter regexp don't match multiple lines…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ben Smithurst
Data:  
Para: exim
Assunto: Re: [EXIM] (system) filter regexp don't match multiple lines?
Peter Gervai wrote:

>     Received: from blah.example.com [1.2.3.4]
>         by mail.example.net by Exim
>         ...

>
> rule:
>
>     if $header_Received: matches "from blah.example.com.*by mail.example.net" then
>         something....

>
> and the rule doesn't match. should it?


I think it's something to do with "." not matching \n. In perl, you can
use the /s modifier, so perhaps

if $header_Received: matches "(?s)from blah.example.com.*by mail.example.net" then

would do the right thing, since I think Exim uses Perl compatible REs,
and including (?s) in a RE is the same as using the /s modifier on the
end. (See perlre(1) manpage.)

disclaimer: I may well be talking bullshit.

--
Ben Smithurst
ben@???

send a blank message to ben+pgp@??? for PGP key

--
*** Exim information can be found at http://www.exim.org/ ***