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

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Always Learning
日付:  
To: Exim
題目: Re: [exim] Counting the number of headers in an incoming email

On Wed, 2016-01-06 at 16:43 +0000, Ian Eiloart wrote:
> > 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).


I had thought the third {} (now '{512}') was the first of the 'yes match
found' 'no match found' Boolean matching result pair. It seems the third
{} is actually an accumulator of successful matches.

Thank you.


--
Regards,

Paul.
England, EU.      England's place is in the European Union.