* 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 my
> > >postgrey/postfix/amavis/spamassassin/procmail rules contains subject
> > >lines that are extremely long strings with no spaces in them. eg:
> > >
> > >Subject:
> DownloadLaetstMMiicrosoftAndAppleSotftawreAndSaveThouasadnds.ApprvoedLicecnseddS
> ..
> > regexp and pcre compatible expression:
> >
> > /^Subject: +[^[:space:]]{60}/ REJECT no spaces
> ----------------
> 
> #grep "{40}/" header_checks
> /^Subject: +[^[:space:]]{40}/  REJECT no spaces in subject
> 
> but I'm having a couple issues:
> 
> how can I handle 'foreign' characters like these ?
> 
> Apr 29 14:55:19 palm postfix/cleanup[19164]: 49E043F8: reject: header
> Subject:
> =?utf-8?Q?Re=3A_=5BKSME-CARE=5D_=E0=B8=AB=E0=B8=B2=E0=B8=97?=??=?utf-8?Q?=E0=B8=B5=E0=B9=88=E0=B9=80=E0=B8=8A=E0=B9=88=E0=B8=B2?=??=?utf-8?Q?_=E0=B8=AA=E0=B8=99=E0=B8=87_=E0=B9=81=E0=B8=96?=?
> from member.ksmecare.com[122.155.12.126];
> from=<care-bou...@member.ksmecare.com> to=<bs@xxx> proto=ESMTP
> helo=<member.ksmecare.com>: 5.7.1 no spaces in subject
> 
> thanks for any suggestions

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

-- 
Troy Piggins

Reply via email to