RW-15 wrote:
> 
> On Fri, 20 May 2011 06:41:33 -0500
> Daniel McDonald <dan.mcdon...@austinenergy.com> wrote:
> 
>> 
>> 
>> 
>> On 5/19/11 7:55 PM, "Rapitharian" <rapithar...@hotmail.com> 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:]]*)+$/
>> 
> 
>> Since the non-alpha characters will always be a single space, and
>> there is never a space in the first column, this would be more easily
>> written as: /^(?:(?:GB|US)\s?)+$/
> 
> [^[:alpha:]]* doesn't just match single spaces, it also matches the **
> characters. I wrote it that way on the off-chance that additional
> special codes might be added in the future. For example if ?? were
> added to represent IPv6 addresses, they would be ignored by my rule,
> but /^(?:(?:GB|US|\*\*)\s?)+$/ would treat ?? as if it were a foreign
> country code.
> 
> 
> 
> 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.
> 
> 
> 

RW-15,
Something seems wrong.  I placed the following rule in my spamassassin
local.cf file.  It is only hitting on the countries I want to exclude. CA,
FR, GB,KY, and US.

header          __RELAYCOUNTRY_SENSIBLE X-Relay-Countries=~
/^([^[:alpha:]]*(CA|FR|GB|KY|US)[^[:alpha:]]*)+$/ 
describe        __RELAYCOUNTRY_SENSIBLE Relayed through a Spammy Country
score           __RELAYCOUNTRY_SENSIBLE 1.0

Should I change the above to below to correct?

header          __RELAYCOUNTRY_SENSIBLE X-Relay-Countries!~
/^([^[:alpha:]]*(CA|FR|GB|KY|US)[^[:alpha:]]*)+$/ 
describe        __RELAYCOUNTRY_SENSIBLE Relayed through a Spammy Country
score           __RELAYCOUNTRY_SENSIBLE 7.0

The key difference is I exchanged the = for a !.  This should make this rule
a negative rather than a positive match, correct?
Again I thank you all for your help.
Rap
-- 
View this message in context: 
http://old.nabble.com/RelayCountry-Plugin-tp31652314p31670939.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.

Reply via email to