[antispam-f] Re: RegEx support (was: Tab in 'From:')

  • From: Steven Pampling <steve.pampling@xxxxxxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Thu, 26 Oct 2006 07:43:00 +0100

On 25 Oct, Martin <freelists@xxxxxxxxxxxxxxxx> wrote:
> In article <4e7b8d7162steve.pampling@xxxxxxxxxxxxx>,
>    Steven Pampling <steve.pampling@xxxxxxxxxxxxx> wrote:
> > On 25 Oct, Martin <freelists@xxxxxxxxxxxxxxxx> wrote:

> [Snip]

> > > I have also just put together a RegEx User Test which seems to work,
> > > but I am going to try and determine if it is worth 'Compiling' each
> > > expression once, rather than each time it is used (which could be
> > > quite a lot!). This would mean integrating it more into the main
> > > code. I also need to check which settings would be best to use.

> > > You are welcome to see my code as well - and use whichever bits are
> > > best.

> > No contest.
> > I surrender.
> > (I can carry on playing with the grammar check stuff)
> I did not mean to usurp your offer Steve! 
> However, if you are working on something else, I am happy to work to
> propose a RegEx solution.
> Steve, can you please send me your RegEx code direct (martin at avisoft
> dot f9 dot co dot uk) - I am happy to take the best of both!

> > I will say though that if you time the test running against a sample
> > set of say 100 spam messages you will find the pattern compile each
> > time is wasteful on process time 
> That was my suspicion

> > (and also can leak memory if you forget to null the pattern space as it
> > tends to use a new handle - of course if you want sloppy programming
> > I'm here)
> It can certainly provoke a myriad of Claims/Frees (and some extends) so a
> leak does not suprise me.

> > This is an instance where Dave Higtons pseudo-server comes in handy as
> > it simulates the slight delays in the header download that you don't
> > get from the testing feature.
> I have never played with that ... (fx sound of download> ... hmm ...
> looks as if it will take some working out how to use that! Any hints
> would be useful I think!

Line 60 of the Server file needs to be set to your local IP (unless you
modify the code to look at the machines address (the copy I found first in
my delving is the plain vanilla version but I do recall making the change
so the pseudo server was more portable.

The messages file needs to contain a series of mail messages in rmail
format. AntiSpam needs to be set to download/check against the IP rather
than a normal mailbox. (You can add it in to the normal AS mailbox
definitions, or in my case just ran AS on a different machine)

(reminder to self -  this is in Internet.netdev.Aspam_add)

Regex - I seem to have a copy of stuff that Kade Hansson was working on too
(Dev.AS_Stuff.OtherVersions.Kade) and what I recognise as an early version
of my efforts Dev.AS_Stuff.OtherVersions.UserTest_Regex
I *know* there is a more developed version. Must be on one of the other
machines. Searching...

(Meanwhile - the grammar check compiles OK, needs riscosifying then see if
it is useful in that form)


Steve Pampling

Other related posts: