> On May 11, 2022, at 1:53 AM, Henrik K <h...@hege.li> wrote: > > On Wed, May 11, 2022 at 10:49:32AM +0300, Henrik K wrote: >> On Wed, May 11, 2022 at 10:44:05AM +0300, Henrik K wrote: >>> On Tue, May 10, 2022 at 06:19:38PM -0600, Philip Prindeville wrote: >>>> See my original message. >>>> >>>> I can't think of a single way to match each header, and then test for any >>>> of them not matching the pattern... >>> >>> Simply use regex negative lookahead. >>> >>> ALL =~ /^(?!Foo|Bar):/m >>> >>> It will hit any line _not_ starting with Foo: or Bar: >> >> Oops I think it was buggy.. more like: >> >> ALL =~ /^(?!(?:Foo|Bar):)/m > > And for debug logging to log the missing header (to easily inspect what was > matched) you need some additional string matching, lookahead itself doesn't > save any string > > ALL =~ /^(?!(?:Foo|Bar):)[^:]+/m > How do you look at what a rule is matching? I've never figured that out... -Philip
- Rule to detect non-standard headers that aren't X- pref... Philip Prindeville
- Re: Rule to detect non-standard headers that aren'... Kevin A. McGrail
- Re: Rule to detect non-standard headers that a... Philip Prindeville
- Re: Rule to detect non-standard headers th... Martin Gregorie
- Re: Rule to detect non-standard header... Philip Prindeville
- Re: Rule to detect non-standard h... Martin Gregorie
- Re: Rule to detect non-standard h... Henrik K
- Re: Rule to detect non-standa... Henrik K
- Re: Rule to detect non-st... Henrik K
- Re: Rule to detect non-st... Philip Prindeville
- Re: Rule to detect non-st... Henrik K
- Re: Rule to detect non-st... Philip Prindeville
- Re: Rule to detect non-st... Henrik K
- Re: Rule to detect non-standa... Philip Prindeville
- Re: Rule to detect non-standard header... Philip Prindeville
- Re: Rule to detect non-standard h... Bill Cole
- Re: Rule to detect non-standard headers that aren'... Loren Wilton
- Re: Rule to detect non-standard headers that aren'... Bill Cole
- Re: Rule to detect non-standard headers that aren'... John Hardin
- Re: Rule to detect non-standard headers that a... Philip Prindeville