Re: Personal rule matching ToCc

2006-02-07 Thread jdow

From: Ramprasad [EMAIL PROTECTED]


Hi,
  I want to write a personal domain-wise rule 
The rule I am using now is 


header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

But the above rule would match @domain.net as well as
@domain.net.in 


You have not tried it, have you? The \b assures that it will not match
on @domain.net.in.

{^_^}


Re: Personal rule matching ToCc

2006-02-07 Thread Ramprasad
On Tue, 2006-02-07 at 00:15 -0800, jdow wrote:
 From: Ramprasad [EMAIL PROTECTED]
 
  Hi,
I want to write a personal domain-wise rule 
  The rule I am using now is 
  
  header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i
  
  But the above rule would match @domain.net as well as
  @domain.net.in 
 
 You have not tried it, have you? The \b assures that it will not match
 on @domain.net.in.

I have tested this with SA3.1
ToCc =~ /[EMAIL PROTECTED]/i   matched  @domain.net as well as
@domain.net.in

Thanks
Ram



Re: Personal rule matching ToCc

2006-02-07 Thread Matt Kettler
jdow wrote:
 From: Ramprasad [EMAIL PROTECTED]

 Hi,
   I want to write a personal domain-wise rule The rule I am using now is
 header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

 But the above rule would match @domain.net as well as
 @domain.net.in 

 You have not tried it, have you? The \b assures that it will not match
 on @domain.net.in.
Um, J.. \b will match any word boundary.. a . is not a word character
so /\.net\b/ matches .net.in.





Re: Personal rule matching ToCc

2006-02-07 Thread Loren Wilton
  header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i
 
  But the above rule would match @domain.net as well as
  @domain.net.in

 You have not tried it, have you? The \b assures that it will not match
 on @domain.net.in.

Well, no, it will.   The dot is a wordbreak, and \b is only looking for a
break.  So it would match.

There are several ways to go.  A fairly trivial one that doesn't use a
lookahead might be

header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

Loren



Re: Personal rule matching ToCc

2006-02-07 Thread hamann . w

Hi,

I was experimenting with something similar, although as a client of a big ISP I 
need full match
rather than domain match.
My experience so far: some mail that does not have me in To or Cc is definitely 
spam,
or worse. The other part is legit mail, mostly from mailinglists or other mail 
forwarders,
and needs explicit whitelisting (or a meta rule)
Expect to check the return path (such as [EMAIL PROTECTED])

Wolfgang Hamann

 
 Hi,
I want to write a personal domain-wise rule 
 The rule I am using now is 
 
  header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i
 
 But the above rule would match @domain.net as well as
 @domain.net.in 
 Which is the best way to match only @domain.net and not @domain.net.in 
 
 Thanks
 Ram
 
 




Personal rule matching ToCc

2006-02-06 Thread Ramprasad
Hi,
   I want to write a personal domain-wise rule 
The rule I am using now is 

 header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

But the above rule would match @domain.net as well as
@domain.net.in 
Which is the best way to match only @domain.net and not @domain.net.in 

Thanks
Ram



Re: Personal rule matching ToCc

2006-02-04 Thread Matt Kettler
Ramprasad wrote:
 Hi,
I want to write a personal rule  to match recipients of a particular
 domain
 The rule I am using now is 

  header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

 But the above rule would match @domain.net as well as
 @domain.net.in 
 Which is the best way to match only @domain.net and not @domain.net.in 

 Thanks
 Ram

   

Rather than \b for the end, try [\s\], This will force a whitespace or
a  to be present there, not just any arbitrary word-boundary.

ToCc =~ /[EMAIL PROTECTED]]/i





Re: Personal rule matching ToCc

2006-02-04 Thread mouss
Matt Kettler a écrit :
 Ramprasad wrote:
 
Hi,
   I want to write a personal rule  to match recipients of a particular
domain
The rule I am using now is 

 header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

But the above rule would match @domain.net as well as
@domain.net.in 
Which is the best way to match only @domain.net and not @domain.net.in 

Thanks
Ram

  
 
 
 Rather than \b for the end, try [\s\], This will force a whitespace or
 a  to be present there, not just any arbitrary word-boundary.
 
 ToCc =~ /[EMAIL PROTECTED]]/i
 

Does \s match the end of line (\n) in this context?

Also, you can add ',' to cope with
To: [EMAIL PROTECTED], [EMAIL PROTECTED]

In any case, this should not be used to whitelist (or lower the score)
as it would also match
To: [EMAIL PROTECTED] [EMAIL PROTECTED]



Personal rule matching ToCc

2006-02-03 Thread Ramprasad
Hi,
   I want to write a personal rule  to match recipients of a particular
domain
The rule I am using now is 

 header __TO_DOMAIN_NETToCc =~ /[EMAIL PROTECTED]/i

But the above rule would match @domain.net as well as
@domain.net.in 
Which is the best way to match only @domain.net and not @domain.net.in 

Thanks
Ram