Re: rejecting long subject strings with pcre header checks

2011-04-29 Thread Victor Duchovni
On Fri, Apr 29, 2011 at 09:30:32AM +0200, Ansgar Wiechers wrote: > On 2011-04-29 Troy Piggins wrote: > > Check out Victor's reply to my message. He explains the reason, but > > I was finding the same as you. This works fine so far: > > > > if /^Subject:/ > > if !/=\?\S+\?=(\s|$)/ > > /\S{60}/

Re: rejecting long subject strings with pcre header checks

2011-04-29 Thread Noel Jones
On 4/29/2011 6:17 AM, Noel Jones wrote: On 4/29/2011 12:27 AM, Voytek Eymont wrote: On Fri, April 29, 2011 4:15 pm, Voytek Eymont wrote: #grep "{40}/" header_checks /^Subject: +[^[:space:]]{40}/ REJECT no spaces in subject but I'm having a couple issues: and I'm still getting some, is t

Re: rejecting long subject strings with pcre header checks

2011-04-29 Thread Noel Jones
On 4/29/2011 12:27 AM, Voytek Eymont wrote: On Fri, April 29, 2011 4:15 pm, Voytek Eymont wrote: #grep "{40}/" header_checks /^Subject: +[^[:space:]]{40}/ REJECT no spaces in subject but I'm having a couple issues: and I'm still getting some, is this that they have a 'CR' or several at

Re: rejecting long subject strings with pcre header checks

2011-04-29 Thread Ansgar Wiechers
On 2011-04-29 Troy Piggins wrote: > Check out Victor's reply to my message. He explains the reason, but > I was finding the same as you. This works fine so far: > > if /^Subject:/ > if !/=\?\S+\?=(\s|$)/ > /\S{60}/REJECT no spaces > endif > endif For the sake of simplicity: if /^subjec

Re: rejecting long subject strings with pcre header checks

2011-04-28 Thread Troy Piggins
* Voytek Eymont wrote : > I've followed the recent advice as I'm also getting a lot of > these_long_subjects_emails_with_crap_in_them: > > -- > * Noel Jones wrote : > > On 4/27/2011 6:17 AM, Troy Piggins wrote: > > >Hi there. I'm noticing lately most of the spam that gets through m

Re: rejecting long subject strings with pcre header checks

2011-04-28 Thread Voytek Eymont
On Fri, April 29, 2011 4:15 pm, Voytek Eymont wrote: > #grep "{40}/" header_checks > /^Subject: +[^[:space:]]{40}/ REJECT no spaces in subject > > > but I'm having a couple issues: and I'm still getting some, is this that they have a 'CR' or several at the start ? ---

rejecting long subject strings with pcre header checks

2011-04-28 Thread Voytek Eymont
I've followed the recent advice as I'm also getting a lot of these_long_subjects_emails_with_crap_in_them: -- * Noel Jones wrote : > On 4/27/2011 6:17 AM, Troy Piggins wrote: > >Hi there. I'm noticing lately most of the spam that gets through my > >postgrey/postfix/amavis/spamassas

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Troy Piggins
* Victor Duchovni wrote : > On Wed, Apr 27, 2011 at 06:42:55PM +0400, Michael Tokarev wrote: > > > 27.04.2011 15:44, Noel Jones wrote: > > [] > > > regexp and pcre compatible expression: > > > > > > /^Subject: +[^[:space:]]{60}/ REJECT no spaces > > > > > > matches Subject: followed by one or m

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Troy Piggins
* Noel Jones wrote : > On 4/27/2011 7:23 AM, Troy Piggins wrote: > >* Noel Jones wrote : > >>On 4/27/2011 6:17 AM, Troy Piggins wrote: > >>regexp and pcre compatible expression: > >> > >>/^Subject: +[^[:space:]]{60}/ REJECT no spaces > > > >Thanks mate. That works beautifully. One minor improve

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Victor Duchovni
On Wed, Apr 27, 2011 at 06:42:55PM +0400, Michael Tokarev wrote: > 27.04.2011 15:44, Noel Jones wrote: > [] > > regexp and pcre compatible expression: > > > > /^Subject: +[^[:space:]]{60}/ REJECT no spaces > > > > matches Subject: followed by one or more spaces, followed by 60 or more > > non-s

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Michael Tokarev
27.04.2011 15:44, Noel Jones wrote: [] > regexp and pcre compatible expression: > > /^Subject: +[^[:space:]]{60}/ REJECT no spaces > > matches Subject: followed by one or more spaces, followed by 60 or more > non-space characters. This will reject mime-encoded quoted-printable subjects. /mjt

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Noel Jones
On 4/27/2011 7:23 AM, Troy Piggins wrote: * Noel Jones wrote : On 4/27/2011 6:17 AM, Troy Piggins wrote: Hi there. I'm noticing lately most of the spam that gets through my postgrey/postfix/amavis/spamassassin/procmail rules contains subject lines that are extremely long strings with no spaces

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Troy Piggins
* Wietse Venema wrote : > Troy Piggins: > > Hi there. I'm noticing lately most of the spam that gets through my > > postgrey/postfix/amavis/spamassassin/procmail rules contains subject > > lines that are extremely long strings with no spaces in them. eg: > > > > Subject: > > DownloadLaetstMMiic

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Troy Piggins
* Noel Jones wrote : > On 4/27/2011 6:17 AM, Troy Piggins wrote: > >Hi there. I'm noticing lately most of the spam that gets through my > >postgrey/postfix/amavis/spamassassin/procmail rules contains subject > >lines that are extremely long strings with no spaces in them. eg: > > > >Subject: > >

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Noel Jones
On 4/27/2011 6:17 AM, Troy Piggins wrote: Hi there. I'm noticing lately most of the spam that gets through my postgrey/postfix/amavis/spamassassin/procmail rules contains subject lines that are extremely long strings with no spaces in them. eg: Subject: DownloadLaetstMMiicrosoftAndAppleSotfta

Re: rejecting long subject strings with pcre header checks

2011-04-27 Thread Wietse Venema
Troy Piggins: > Hi there. I'm noticing lately most of the spam that gets through my > postgrey/postfix/amavis/spamassassin/procmail rules contains subject > lines that are extremely long strings with no spaces in them. eg: > > Subject: > DownloadLaetstMMiicrosoftAndAppleSotftawreAndSaveThouasad

rejecting long subject strings with pcre header checks

2011-04-27 Thread Troy Piggins
Hi there. I'm noticing lately most of the spam that gets through my postgrey/postfix/amavis/spamassassin/procmail rules contains subject lines that are extremely long strings with no spaces in them. eg: Subject: DownloadLaetstMMiicrosoftAndAppleSotftawreAndSaveThouasadnds.ApprvoedLicecnseddS T

Re: Pcre header checks

2011-03-08 Thread Stan Hoeppner
Erik de Castro Lopo put forth on 3/7/2011 4:50 PM: > Given the above data, I think I am justified in using the following > pcre rule: > > /^Received-SPF:.*helo=[a-z0-9.-]+\.mail\\.yahoo\.com; > envelope-from=[^@]+@att.net/i REJECT This is possibly less complex, totally effective, and p

Re: Pcre header checks

2011-03-07 Thread Erik de Castro Lopo
Noel Jones wrote: > take a look at milter-regexp. Thanks, I'll check it out. Cheers, Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/

Re: Pcre header checks

2011-03-07 Thread Noel Jones
On 3/7/2011 4:57 PM, Erik de Castro Lopo wrote: Erik de Castro Lopo wrote: DKIM signatures are also added in messages handled by lists, ... What you are attemtping to do is a bad idea based on a deep misconception of the role of DKIM in email processing. I think I have a fair handle on it. Ho

Re: Pcre header checks

2011-03-07 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote: > > DKIM signatures are also added in messages handled > > by lists, ... What you are attemtping to do is a bad idea based on a > > deep misconception of the role of DKIM in email processing. > > I think I have a fair handle on it. However, my opinion on DKIM > is that

Re: Pcre header checks

2011-03-07 Thread Erik de Castro Lopo
Victor Duchovni wrote: > You are lucky this does not work. This is my own private mail server that serves me and my immediate family. If I break stuff everyone on the receiviing end knows who to complain to. > Much of the att.net mail infrastructure > is operated by Yahoo. Over the last many mo

Re: Pcre header checks

2011-03-07 Thread Victor Duchovni
On Mon, Mar 07, 2011 at 10:39:29AM +1100, Erik de Castro Lopo wrote: > I'm running postfix version 2.8.1 from Debian. > > I've got basic pcre header checks working as they should. I'm trying > to reject mail that has a DKIM signature that says its from att.net &

Re: Pcre header checks

2011-03-06 Thread mouss
Le 07/03/2011 00:39, Erik de Castro Lopo a écrit : > Hi all, > > I'm running postfix version 2.8.1 from Debian. > > I've got basic pcre header checks working as they should. I'm trying > to reject mail that has a DKIM signature that says its from att.net > b

Re: Pcre header checks

2011-03-06 Thread Wietse Venema
Erik de Castro Lopo: > Hi all, > > I'm running postfix version 2.8.1 from Debian. > > I've got basic pcre header checks working as they should. I'm trying > to reject mail that has a DKIM signature that says its from att.net > but a Message-ID endin

Re: Pcre header checks

2011-03-06 Thread Noel Jones
On 3/6/2011 5:47 PM, Jeroen Geilman wrote: On 03/07/2011 12:39 AM, Erik de Castro Lopo wrote: Hi all, I'm running postfix version 2.8.1 from Debian. I've got basic pcre header checks working as they should. I'm trying to reject mail that has a DKIM signature that says its fro

Re: Pcre header checks

2011-03-06 Thread Noel Jones
On 3/6/2011 5:39 PM, Erik de Castro Lopo wrote: Hi all, I'm running postfix version 2.8.1 from Debian. I've got basic pcre header checks working as they should. I'm trying to reject mail that has a DKIM signature that says its from att.net but a Message-ID ending in 'yahoo.

Re: Pcre header checks

2011-03-06 Thread Jeroen Geilman
On 03/07/2011 12:39 AM, Erik de Castro Lopo wrote: Hi all, I'm running postfix version 2.8.1 from Debian. I've got basic pcre header checks working as they should. I'm trying to reject mail that has a DKIM signature that says its from att.net but a Message-ID ending in 'y

Pcre header checks

2011-03-06 Thread Erik de Castro Lopo
Hi all, I'm running postfix version 2.8.1 from Debian. I've got basic pcre header checks working as they should. I'm trying to reject mail that has a DKIM signature that says its from att.net but a Message-ID ending in 'yahoo.com'. I've got this: if /^DKI