Re: [exim] Counting the number of headers in an incoming ema…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Ian Eiloart
Fecha:  
A: Always Learning
Cc: Exim
Asunto: Re: [exim] Counting the number of headers in an incoming email

> On 6 Jan 2016, at 16:14, Always Learning <exim@???> wrote:
> 
> 
> On Wed, 2016-01-06 at 17:26 +0200, Lena@??? wrote:
> 
> 
>> deny message = This message has too many header lines (>512)
>>     condition = ${if match{$message_headers}{\N(\S.+\n(\s.+\n)*){512}\N}}
> 
> Is this a match for *exactly* 512 headers  ?


I don’t think it is: 
    ${if match{$message_headers}
          {\N(\S.+\n(\s.+\n)*){512}\N}
      }

It’s looking for 512 of these: \S.+\n(\s.+\n)* in $message_headers. It’ll match any string with 512 or more of them. Those things are one line starting with a non-space (\S), followed by zero or more lines starting with a space (\s).

-- 
Ian Eiloart
Postmaster, University of Sussex
+44 (0) 1273 87-3148