[EXIM] match-string in filters

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Rudolf Kompf
Fecha:  
A: exim-mailing-list
Asunto: [EXIM] match-string in filters
I want to delete spam-mails, especially mails with strings such as
       $ 100 billions
in the body.
The pcretest utility says 'match' with
   re> "\$\s*\d+\s+[mb]illion"
and
   data> $ 100 billion


In the filter-file is the condition

if $message_body matches \$\s*\d+\s+[mb]illion or

(followed by other conditions)
But a mail with
$ 100 billions
is not discarded (no match). But if I correct the condition to

if $message_body matches \\$\s*\d+\s+[mb]illion or

I get

     Filter error: failed to expand "$\s*\d+\s+[mb]illion" in filter file:
$ not followed by letter, digit, or {


I believe that in the first case of the condition (one backslash) the $ is
interpreted as end-of-line (the condition string isn't correct
transferred to the pcre-interpretation-routine).

I would thank you for comments.

Rudolf



-- 
-----------------------------------------------------------------------
Rudolf Kompf                     | E-mail: kompf@???



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