Loading ...
Sorry, an error occurred while loading the content.

276871Re: rejecting long subject strings with pcre header checks

Expand Messages
  • Noel Jones
    Apr 29 4:22 AM
    • 0 Attachment
      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 this that they have a 'CR' or
      >> several at
      >> the start ?
      >>
      >> -------------------------------------
      >> From: Giulietta Gonano<giuliettarlasshgz@...>
      >> To:<garym@...>
      >> Subject:
      >> AdboeeAndCooerelDealls-BuyWith70%DiccsounttAndStartDownloaoadingRightAway
      >>
      >> Date: Fri, 29 Apr 2011 02:55:52 +0000
      >> Importance: Normal
      >> In-Reply-To:<COL110-W1B789CC0ACA5E6A282D44C4980@...>
      >> References:
      >> <SNT128-W9A5B07EBA84E1E58CA42ABAA80@...>,<COL104-W384982DF9C6C12AA7C352B0A80@...>,<SNT128-
      >>
      >>
      >> ...snip...
      >>
      >> W1B789CC0ACA5E6A282D44C4980@...>
      >> MIME-Version: 1.0
      >> X-OriginalArrivalTime: 29 Apr 2011 02:55:52.0843 (UTC)
      >> FILETIME=[F3EF4DB0:01CC0618]
      >>
      >> =====================================
      >>
      >> From: Cammie Plasket<cammiebstdpgru@...>
      >> To:<jmaywald@...>
      >> Subject:
      >> StaitstcicsSshowThatMenDon'TLiveeAsLongAssWommenAnddAreMoreAtRiiskOfAcciidents,Injuieres.
      >>
      >> Date: Fri, 29 Apr 2011 02:15:50 +0000
      >> Importance: Normal
      >> In-Reply-To:<BLU162-w58ABA6E9EDED5657FC0A01BA980@...>
      >>
      >>
      >> =====================================
      >>
      >>
      >>
      >
      >
      > Try
      > /^Subject:[[:space:]]+[^[:space:]]{40}/ REJECT no spaces in
      > subject
      >
      >
      > -- Noel Jones

      this is safer -- it shouldn't match valid encoded subjects.

      IF !/=\?[^[:space:]]+\?=([[:space:]]|$)/
      /[^[:space:]]{40}/ REJECT long subject with no spaces
      ENDIF


      -- Noel Jones
    • Show all 24 messages in this topic