Re: [exim] filter out re[] mails

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: David S. Madole
Fecha:  
A: dermot, exim-users
Cc: 
Asunto: Re: [exim] filter out re[] mails
From: "Dermot Paikkos" <dermot@???>
>
> if      $h_subject: matches re\\[\\d+\\]\$ or
>         $h_subject: matches re:\\[\\d+\\]\$ or
>         $h_subject: matches re:\s\\[\\d+\\]\$ or
>         $h_subject: matches re\s\\[\\d+\\]:\$ or
>         $h_subject: matches re\s\[\d+\]:\$ or
>         $h_subject: matches re\s\[\d+\]\$ or
>         $h_subject: matches re\\[\\d+\\]:\$ then
>         freeze

>
> I have slightly over-cooked this filter to try and get the variation
> of mail, and there are a few too many escapes in the above. I have
> tried escaping the \s in the past but that didn't seem to work. I am
> sure someone could help condense this down to two lines. Any ideas?


How about something like this?

if      $h_subject: matches re:?\\s*[\\d+]:?\$ then
        freeze


I think the only reason that escaping the \s didn't work for you is that
you have other problems with those lines, specifically the [] do not need
to be escaped at all and definately shouldn't be double-escaped, and the
\d does need to be escaped.

David