> Hi folks,
>       I'm a newbie to SA and have looked at a few tutorials on writing
> custom rules, but they all seem to be too simple for what I want to do.
> That, or I'm not smart enough to figure it out on my own.  What I'm
> needing is some guidance on how to write a custom rule that looks at the
> creation time in the header, and if its between 8 PM to 7 AM.... score
> it appropriately.  I know that this might make some of you cringe at the
> thought of it, but I would say that 95% - 99% of all of ham is sent
> between 8 AM to 6 PM.  The only this that really comes through later
> than that may be some valid newsletters that really don't make a
> difference.  And besides, I'm not talking about scoring it at 999.000,
> just add maybe .8 or even 1.000.  I think it would be a handy little
> rule if I had the brains to figure it out.  Here is the header tag that
> I need to check, "Date: Wed, 27 Sep 2006 14:17:17 -0400" and I've looked
> at the date rules built into SA but I can't see how I could possibly
> create a rule with regex to do what I want. Well... maybe..... let me
> think on it, if anyone has any ideas, please let me know!

How about creating two configuration files, each with a different threshold. 
Then use
cron to switch which file is used at 8am and 6pm.

Cheers,
Peter Smith

Reply via email to