Re: matching IP ranges in headers

2009-06-27 Thread Byung-Hee HWANG
Louis-David Mitterrand writes: > Hi, > > A lot of spam comes from certain ip ranges (e.g. west africa) through > relays (large ISPs) that would be too onerous to block. To filter these > I am presently matching: > > /^((Received|X-Originating-IP):.+\b(124\.120\.1\.( REGEX>)\b/ > > in pcre:

Re: matching IP ranges in headers

2009-06-27 Thread Henrik K
On Sat, Jun 27, 2009 at 12:27:50AM +0200, mouss wrote: > Victor Duchovni a écrit : > > On Sat, Jun 27, 2009 at 12:00:09AM +0200, mouss wrote: > > > >> Louis-David Mitterrand a ?crit : > >>> Hi, > >>> > >>> A lot of spam comes from certain ip ranges (e.g. west africa) through > >>> relays (large IS

Re: matching IP ranges in headers

2009-06-26 Thread Erwan David
Le Sat 27/06/2009, mouss disait > > but then again, we come back to "what would be generic control grammar?" > which is not a simple problem. > I think this would lead to embedding a full scripting language, like some applications embed lua... Not sure it woud be a good thing. -- Erwan

Re: matching IP ranges in headers

2009-06-26 Thread mouss
Victor Duchovni a écrit : > On Sat, Jun 27, 2009 at 12:00:09AM +0200, mouss wrote: > >> Louis-David Mitterrand a ?crit : >>> Hi, >>> >>> A lot of spam comes from certain ip ranges (e.g. west africa) through >>> relays (large ISPs) that would be too onerous to block. To filter these >>> I am presen

Re: matching IP ranges in headers

2009-06-26 Thread Victor Duchovni
On Sat, Jun 27, 2009 at 12:00:09AM +0200, mouss wrote: > Louis-David Mitterrand a ?crit : > > Hi, > > > > A lot of spam comes from certain ip ranges (e.g. west africa) through > > relays (large ISPs) that would be too onerous to block. To filter these > > I am presently matching: > > > > /^

Re: matching IP ranges in headers

2009-06-26 Thread mouss
Louis-David Mitterrand a écrit : > Hi, > > A lot of spam comes from certain ip ranges (e.g. west africa) through > relays (large ISPs) that would be too onerous to block. To filter these > I am presently matching: > > /^((Received|X-Originating-IP):.+\b(124\.120\.1\.( REGEX>)\b/ > > in pc

Re: matching IP ranges in headers

2009-06-25 Thread Henrik K
On Thu, Jun 25, 2009 at 10:14:29PM +1000, Barney Desmond wrote: > 2009/6/25 Louis-David Mitterrand : > >        /^((Received|X-Originating-IP):.+\b(124\.120\.1\.( > REGEX>)\b/ > > > > in pcre:/etc/postfix/header_access. But converting IP ranges to regex'es > > is time consuming and error prone. > >

Re: matching IP ranges in headers

2009-06-25 Thread Barney Desmond
2009/6/25 Louis-David Mitterrand : >        /^((Received|X-Originating-IP):.+\b(124\.120\.1\.( REGEX>)\b/ > > in pcre:/etc/postfix/header_access. But converting IP ranges to regex'es > is time consuming and error prone. > > Is there a way to use a cidr table for header matching while retaining > co

matching IP ranges in headers

2009-06-25 Thread Louis-David Mitterrand
Hi, A lot of spam comes from certain ip ranges (e.g. west africa) through relays (large ISPs) that would be too onerous to block. To filter these I am presently matching: /^((Received|X-Originating-IP):.+\b(124\.120\.1\.()\b/ in pcre:/etc/postfix/header_access. But converting IP ranges