Re: RelayCountry Plugin

2011-05-21 Thread Rapitharian
Rapitharian wrote: > > > RW-15 wrote: >> >> On Fri, 20 May 2011 06:41:33 -0500 >> Daniel McDonald wrote: >> >>> >>> >>> >>> On 5/19/11 7:55 PM, "Rapitharian" wrote: >>> >>> > >>> > RW-15 >>> > Can you help me some? I am not even a novice in writing/reading >>> > regular expressions. >

Re: RelayCountry Plugin

2011-05-21 Thread Rapitharian
RW-15 wrote: > > On Fri, 20 May 2011 06:41:33 -0500 > Daniel McDonald wrote: > >> >> >> >> On 5/19/11 7:55 PM, "Rapitharian" wrote: >> >> > >> > RW-15 >> > Can you help me some? I am not even a novice in writing/reading >> > regular expressions. >> > What is this doing? X-Relay-Countrie

Re: RelayCountry Plugin

2011-05-20 Thread Daniel McDonald
On 5/20/11 4:58 PM, "RW" wrote: > > > BTW does anyone know if there's a way to get the FreeBSD p5-IP-Country > port to update its database. I just noticed it's nearly two years old. > The scripts to update it are in the source tarball for IP-Country, in the dbmScripts subdirectory. I just

Re: RelayCountry Plugin

2011-05-20 Thread RW
On Fri, 20 May 2011 06:41:33 -0500 Daniel McDonald wrote: > > > > On 5/19/11 7:55 PM, "Rapitharian" wrote: > > > > > RW-15 > > Can you help me some? I am not even a novice in writing/reading > > regular expressions. > > What is this doing? X-Relay-Countries=~ > > /^([^[:alpha:]]*(GB|US)[^[

Re: RelayCountry Plugin

2011-05-20 Thread Daniel McDonald
On 5/19/11 7:55 PM, "Rapitharian" wrote: > > RW-15 > Can you help me some? I am not even a novice in writing/reading regular > expressions. > What is this doing? X-Relay-Countries=~ > /^([^[:alpha:]]*(GB|US)[^[:alpha:]]*)+$/ Start at the beginning of the line. Match zero or more non-alpha c

Re: RelayCountry Plugin

2011-05-19 Thread Rapitharian
RW-15 wrote: > > On Thu, 19 May 2011 08:15:00 +0200 > John Wilcock wrote: > >> Le 19/05/2011 04:46, John Hardin a écrit : >> > Sure. Well, not a _single_ rule, but you can achieve what you >> > want... > >> > header RELAYCOUNTRY_GOOD X-Relay-Countries=~/(?:US|CA|FR)/ >> > describe REL

Re: RelayCountry Plugin

2011-05-19 Thread John Hardin
On Thu, 19 May 2011, Rapitharian wrote: One quick question though: 1) What does the ?: do in =~/(?:US|CA|FR)/ (xxx) by default remembers the matched text for later use. SA rules can't use remembered matches for anything; adding ?: makes perl not remember what matched, which is a performance

Re: RelayCountry Plugin

2011-05-19 Thread Rapitharian
John Wilcock wrote: > > Le 19/05/2011 04:46, John Hardin a écrit : >> Sure. Well, not a _single_ rule, but you can achieve what you want... >> >> First, write a rule that hits on all messages and assign it a positive >> score: >> >> >> meta RELAYCOUNTRY_ALL__HAS_RCVD >> describe RELA

Re: RelayCountry Plugin

2011-05-19 Thread Daniel McDonald
On 5/19/11 8:07 AM, "RW" wrote: > On Thu, 19 May 2011 08:15:00 +0200 > John Wilcock wrote: > >> Le 19/05/2011 04:46, John Hardin a écrit : >>> Sure. Well, not a _single_ rule, but you can achieve what you >>> want... > >>> header RELAYCOUNTRY_GOOD X-Relay-Countries=~/(?:US|CA|FR)/ >>> de

Re: RelayCountry Plugin

2011-05-19 Thread RW
On Thu, 19 May 2011 08:15:00 +0200 John Wilcock wrote: > Le 19/05/2011 04:46, John Hardin a écrit : > > Sure. Well, not a _single_ rule, but you can achieve what you > > want... > > header RELAYCOUNTRY_GOOD X-Relay-Countries=~/(?:US|CA|FR)/ > > describe RELAYCOUNTRY_GOOD Relayed throug

Re: RelayCountry Plugin

2011-05-19 Thread John Hardin
On Thu, 19 May 2011, John Wilcock wrote: That could be simplified: header __RELAYCOUNTRY_GOOD X-Relay-Countries=~/(?:US|CA|FR)/ meta RELAYCOUNTRY_NOTGOOD __HAS_RCVD && !RELAYCOUNTRY_GOOD Even better! -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ jhar

Re: RelayCountry Plugin

2011-05-18 Thread John Wilcock
Le 19/05/2011 04:46, John Hardin a écrit : Sure. Well, not a _single_ rule, but you can achieve what you want... First, write a rule that hits on all messages and assign it a positive score: meta RELAYCOUNTRY_ALL__HAS_RCVD describe RELAYCOUNTRY_ALLRelayed through any country sc

Re: RelayCountry Plugin

2011-05-18 Thread John Hardin
On Wed, 18 May 2011, Rapitharian wrote: I am finding that every day I get Spam sent to my users from several new countries. This requires me to have to write new rules for these countries. The list is getting quite long. What I would like to know is: is there a way to write a rule to award poin

Re: RelayCountry plugin

2010-07-29 Thread RW
On Thu, 29 Jul 2010 04:52:15 -0700 (PDT) andrij wrote: > If I run sa-learn, will these e-mails be processed with the > RelayCountry plugin before being tokenized? Yes. > Is it not > enough just to add something to the country code in RelayCountrly.pm > to make it longer, like "$cc = "Code" .

Re: RelayCountry plugin

2010-07-29 Thread andrij
RW-15 wrote: > >> Does Bayes learn the tokens from the X-Spam-Relay-Country header? > > Contrary to popular belief, the country codes are not used by Bayes. > >> I think that it does not, because all headers "X-Spam-" are removed >> before learning, right? > > That's not the reason. The plug

Re: RelayCountry plugin

2010-07-28 Thread Henrik K
On Thu, Jul 29, 2010 at 01:09:55AM +0100, RW wrote: > > I wrote a patch last week (which I've attached) to add country pairs as > separate token metadata e.g. > > X-Spam-Relay-Countries: US US CA NG > X-Spam-Relay-Country-Tokens: Trusted_US USCA CANG > > It's not a straight fix, but I'll submit

Re: RelayCountry plugin

2010-07-28 Thread Jason Haar
On 07/29/2010 12:09 PM, RW wrote: > > I wrote a patch last week (which I've attached) to add country pairs as > separate token metadata e.g. > > X-Spam-Relay-Countries: US US CA NG > X-Spam-Relay-Country-Tokens: Trusted_US USCA CANG > > It's not a straight fix, but I'll submit it if no-one has a

Re: RelayCountry plugin

2010-07-28 Thread RW
On Wed, 28 Jul 2010 03:04:32 -0700 (PDT) andrij wrote: > > Hi all, > > I am playing with RelayCountry plugin. I have a small database of > e-mails. I processed these emails with RelayCountry plugin, so every > email contains X-Spam-Relay-country header (and corresponding > countries). > > Now

Re: RelayCountry plugin doesn't add header

2007-01-02 Thread Alan Munday
Nick Radov wrote the following on 02/01/2007 18:35: I am running SpamAssassin 3.1.7 in serial mode on Windows 2003. I would like to use the RelayCountry plugin and have enabled it as described on this web page: . But when I ran a test mess