Barking up the wrong tree (was: Re: Rule to catch PO#)

2008-12-05 Thread Karsten Bräckelmann
On Thu, 2008-12-04 at 15:15 -0500, Ray Jette wrote: > [...] I have been working on this for over a week and > still can't seem to get it. It is critical that I get this working. No, it is not. What's critical is, that you find out how and where you are "losing mail". Hint: SA does *not* drop ma

Re: Rule to catch PO#

2008-12-04 Thread mouss
mouss a écrit : > Matt Garretson a écrit : >> This thread is getting ridiculous. Just use >> >> Subject =~ /po.*\d+/i >> >> To avoid losing millions of dollars, surely they can put >> up with a couple of porn and impotence spams. :-) > > or > > Subject =~ /\bPO\W.*\d+/i > > Thanks

Re: Rule to catch PO#

2008-12-04 Thread mouss
Matt Garretson a écrit : > This thread is getting ridiculous. Just use > > Subject =~ /po.*\d+/i > > To avoid losing millions of dollars, surely they can put > up with a couple of porn and impotence spams. :-) or Subject =~ /\bPO\W.*\d+/i

Re: Rule to catch PO#

2008-12-04 Thread John Hardin
On Thu, 4 Dec 2008, Ray Jette wrote: The following looks like it will work. Does any one see any reasons why this would not work? /\bPO ?s?:?#?\d{0,10}?[a-z]{0,5}?/i The order of your optional bits will be respected, and there's not a "v" or apostrophe in there, which was in one of your actu

Re: Rule to catch PO#

2008-12-04 Thread Matt Garretson
This thread is getting ridiculous. Just use Subject =~ /po.*\d+/i To avoid losing millions of dollars, surely they can put up with a couple of porn and impotence spams. :-)

Re: Rule to catch PO#

2008-12-04 Thread John Hardin
On Thu, 4 Dec 2008, Ray Jette wrote: Then I need numbers and letters - [0-9a-z]\{1,10\} - I may need need this. Don't escape the curlies. Does this need to support alphanumeric POs? The rules provided so far likely won't do that. -- John Hardin KA7OHZhttp://www.impsec.

Re: Rule to catch PO#

2008-12-04 Thread Ray Jette
Ray Jette wrote: mouss wrote: Ray Jette a écrit : Karsten Bräckelmann wrote: Back on-list. On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: Yes, and it does match case insensitively. I guess the issue is with your testing environment. How are you testing the rule, err, re

RE: Rule to catch PO#

2008-12-04 Thread Bowie Bailey
Ray Jette wrote: > Ray Jette wrote: > > > > A lot of these rules look good but not appear to work for what I am > > trying to do. Sorry about all the trouble. I'm not realy that good > > at regular expressions but I am learning. Here are some real > > examples from my mail server: > > > >* P

RE: Rule to catch PO#

2008-12-04 Thread Bowie Bailey
Ray Jette wrote: > Bowie Bailey wrote: > > > > \b matches a zero-length word boundary. This means that one side > > is a "word character" and the other side is not. Word characters > > are defined as alphanumeric plus "_". So the only option in your > > list that would cause a problem is "PO123

Re: Rule to catch PO#

2008-12-04 Thread Ray Jette
John Hardin wrote: On Thu, 4 Dec 2008, Ray Jette wrote: A lot of these rules look good but not appear to work for what I am trying to do. Sorry about all the trouble. I'm not realy that good at regular expressions but I am learning. Here are some real examples from my mail server: * PO17

Re: Rule to catch PO#

2008-12-04 Thread Mike Grau
On 12/04/2008 01:49 Ray Jette wrote: > A lot of these rules look good but not appear to work for what I am > trying to do. Sorry about all the trouble. I'm not realy that good at > regular expressions but I am learning. Here are some real examples from > my mail server: > >* PO1786 >* PO

Re: Rule to catch PO#

2008-12-04 Thread Ray Jette
Ray Jette wrote: Bowie Bailey wrote: Ray Jette wrote: Bowie Bailey wrote: Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i sc

Re: Rule to catch PO#

2008-12-04 Thread John Hardin
On Thu, 4 Dec 2008, Ray Jette wrote: A lot of these rules look good but not appear to work for what I am trying to do. Sorry about all the trouble. I'm not realy that good at regular expressions but I am learning. Here are some real examples from my mail server: * PO1786 * PO 42111

Re: Rule to catch PO#

2008-12-04 Thread Ray Jette
Bowie Bailey wrote: Ray Jette wrote: Bowie Bailey wrote: Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDE

RE: Rule to catch PO#

2008-12-02 Thread John Hardin
On Tue, 2 Dec 2008, Raymond Jette wrote: I am using: /bPO(?:\b ?#?|\d)/i You're missing a backslash in front of that first "b". Others have already commented on the hashmark. -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ [EMAIL PROTECTED]FALaholic #11174

RE: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 20:09 -0500, Raymond Jette wrote: > I am using: > /bPO(?:\b ?#?|\d)/i I asked you more than once, if you --lint check your configuration. This answers it. You do NOT. > My rules is not listed. Yes. > > > You don't need to escape the hash in a Perl RE unless you are using

RE: Rule to catch PO#

2008-12-02 Thread Raymond Jette
[mailto:[EMAIL PROTECTED] Sent: Tue 12/2/2008 2:43 PM To: users@spamassassin.apache.org Subject: RE: Rule to catch PO# Karsten Bräckelmann wrote: > On Tue, 2008-12-02 at 12:35 -0500, Bowie Bailey wrote: > > Karsten Bräckelmann wrote: > > > > Btw, you need to escape the hash

RE: Rule to catch PO#

2008-12-02 Thread Raymond Jette
wie Bailey [mailto:[EMAIL PROTECTED] Sent: Tue 12/2/2008 3:07 PM To: users@spamassassin.apache.org Subject: RE: Rule to catch PO# Ray Jette wrote: > > I created the test message and ran it through both ways. One with PO > and the other with po. The rule fired on both. > When receiving mai

Re: Rule to catch PO#

2008-12-02 Thread David B Funk
On Tue, 2 Dec 2008, Ray Jette wrote: > Karsten Bräckelmann wrote: > > On Tue, 2008-12-02 at 14:06 -0500, Ray Jette wrote: > > [ *snipp* ] > > > > If all else fails, just save the message out of your MUA. > > > > You can then test with the saved file and investigate the output: > > spamassassin <

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 21:11 +0100, Karsten Bräckelmann wrote: > > I created the test message and ran it through both ways. One with PO and > > the other with po. The rule fired on both. > > Err, this is bad, isn't it? Doh! Ignore that line. A brain-fart made me read "with no". -- char *t="[

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 14:55 -0500, Ray Jette wrote: > I created the test message and ran it through both ways. One with PO and > the other with po. The rule fired on both. Err, this is bad, isn't it? What rule *exactly* are you talking about? Copy-n-paste it from the cf file. What file name does

RE: Rule to catch PO#

2008-12-02 Thread Bowie Bailey
Ray Jette wrote: > > I created the test message and ran it through both ways. One with PO > and the other with po. The rule fired on both. > When receiving mail from the outside the rule only fires on PO and not > po. Is there any reason for this to happen? Sure. There are two reasons this could

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
mouss wrote: Ray Jette a écrit : Karsten Bräckelmann wrote: Back on-list. On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: Yes, and it does match case insensitively. I guess the issue is with your testing environment. How are you testing the rule, err, regexp for a rule?

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
mouss wrote: Ray Jette a écrit : Karsten Bräckelmann wrote: Back on-list. On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: Yes, and it does match case insensitively. I guess the issue is with your testing environment. How are you testing the rule, err, regexp for a rule?

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Karsten Bräckelmann wrote: On Tue, 2008-12-02 at 14:06 -0500, Ray Jette wrote: [ *snipp* ] I reset the daemon. How do I cann spamassassin with the message. I'm not sure how to create a message from the server with out sending one. If all else fails, just save the message out of your M

RE: Rule to catch PO#

2008-12-02 Thread Bowie Bailey
Karsten Bräckelmann wrote: > On Tue, 2008-12-02 at 12:35 -0500, Bowie Bailey wrote: > > Karsten Bräckelmann wrote: > > > > Btw, you need to escape the hash '#', not because this is an RE, > > > but because it is Perl. :) > > > > You don't need to escape the hash in a Perl RE unless you are using

Re: Rule to catch PO#

2008-12-02 Thread mouss
Ray Jette a écrit : > Karsten Bräckelmann wrote: >> Back on-list. >> >> On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: >> Yes, and it does match case insensitively. I guess the issue is with your testing environment. How are you testing the rule, err, regexp for a rule? >

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 14:06 -0500, Ray Jette wrote: [ *snipp* ] > I reset the daemon. How do I cann spamassassin with the message. I'm not > sure how to create a message from the server with out sending one. If all else fails, just save the message out of your MUA. You can then test with the sa

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Karsten Bräckelmann wrote: Back on-list. On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: Yes, and it does match case insensitively. I guess the issue is with your testing environment. How are you testing the rule, err, regexp for a rule? I sent to messages from yahoo. One with a

Re: Rule to catch PO#

2008-12-02 Thread Chris Hoogendyk
Ray Jette wrote: Thanks for all the help. I am still having issues. Let me try to explain a little more. Subjects can contain the following PO PO PO# PO# PO # PO # I can match PO with /\bPO/i but this does not fill my requirements. I need to be able to match all above and i'm not sure wher

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
Back on-list. On Tue, 2008-12-02 at 13:40 -0500, Ray Jette wrote: > > Yes, and it does match case insensitively. > > > > I guess the issue is with your testing environment. How are you testing > > the rule, err, regexp for a rule? > > I sent to messages from yahoo. One with a subject of PO and th

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 13:20 -0500, Ray Jette wrote: > I am having a lot of issues with this. Sorry but my regex skills are not > very good. I'm trying to learn through. This is a skill I need to learn. > I decided to start at the beginning and build the expression up from > there. I have the fol

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Matt Garretson wrote: Ray Jette wrote: PO PO PO# PO# PO # PO # Try: Subject =~ /PO ?\#? ?\d+/i If you don't need case insensitivity, remove the trailing 'i'. Thanks for the reply. I tryed to use Subject ~ That matched PO but it did not match po. I have /i at the end.

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 12:48 -0500, Ray Jette wrote: > Thanks again. > I am using the following rule: > /\bPO(?:\b|\d)/i > This rule working when matching 'PO' but it will not match 'po'. It ends > in a /i so I can't see why this would not work. The rule is just fine, and it does match lower case,

Re: Rule to catch PO#

2008-12-02 Thread Matt Garretson
Ray Jette wrote: > PO > PO > PO# > PO# > PO # > PO # Try: Subject =~ /PO ?\#? ?\d+/i If you don't need case insensitivity, remove the trailing 'i'.

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDERS-0.50 describe PO_AND_ORDERSA negative scoring rule that searc

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Thanks for all the help. I am still having issues. Let me try to explain a little more. Subjects can contain the following PO PO PO# PO# PO # PO # I can match PO with /\bPO/i but this does not fill my requirements. I need to be able to match all above and i'm not sure where to start. Thank y

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
> > Rather than trying to catch FPs like this, I first would investigate why > > any need for this in the place. *Why* are your hams looking that spammy? > > Which rules do they trigger? > > I have users reporting missing e-mails but when i ask for specifics for > the messages they never have the

RE: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
On Tue, 2008-12-02 at 12:35 -0500, Bowie Bailey wrote: > Karsten Bräckelmann wrote: > > Btw, you need to escape the hash '#', not because this is an RE, but > > because it is Perl. :) > > You don't need to escape the hash in a Perl RE unless you are using hash > characters for the RE boundary mar

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Karsten Bräckelmann wrote: Please note that you do *not* need to specify all variations explicitly, if you actually want to match *anything* that starts with "PO"... Thanks for the information I will make sure to read it. I am going to try /\bPO\b now and see if it helps. Since thi

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
> > Please note that you do *not* need to specify all variations explicitly, > > if you actually want to match *anything* that starts with "PO"... > > Thanks for the information I will make sure to read it. I am going to > try /\bPO\b now and see if it helps. Since this isn't your first attempt

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Bowie Bailey wrote: Ray Jette wrote: Bowie Bailey wrote: Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDE

RE: Rule to catch PO#

2008-12-02 Thread Bowie Bailey
Karsten Bräckelmann wrote: > > > > > > > > header PO_AND_ORDERSSubject =~ /\bPO*?#?/i > > Btw, you need to escape the hash '#', not because this is an RE, but > because it is Perl. :) You don't need to escape the hash in a Perl RE unless you are using hash characters for the RE boundary

RE: Rule to catch PO#

2008-12-02 Thread Bowie Bailey
Ray Jette wrote: > Bowie Bailey wrote: > > Ray Jette wrote: > > > > > Good morning, > > > I am trying to write a negative scoring rule that files on the > > > following: PO PO# > > > PO # > > > > > > Following is the rule I am using: > > > > > > header PO_AND_ORDERSSubject =~ /\bPO*?#?/i

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Karsten Bräckelmann wrote: I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i In REs, the asterisk '*' is a quantifier, not a wildcard as it is with the shell, and

Re: Rule to catch PO#

2008-12-02 Thread Karsten Bräckelmann
> >> I am trying to write a negative scoring rule that files on the > >> following: PO > >> PO# > >> PO # > >> > >> Following is the rule I am using: > >> > >> header PO_AND_ORDERSSubject =~ /\bPO*?#?/i In REs, the asterisk '*' is a quantifier, not a wildcard as it is with the shell, and m

Re: Rule to catch PO#

2008-12-02 Thread Ray Jette
Bowie Bailey wrote: Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDERS-0.50 describe PO_AND_ORDERSA negative

Re: Rule to catch PO#

2008-12-02 Thread Duane Hill
On Tue, 2 Dec 2008, Ray Jette wrote: Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDERS-0.50 describe PO_AND_ORDERSA negative sc

RE: Rule to catch PO#

2008-12-02 Thread Bowie Bailey
Ray Jette wrote: > Good morning, > I am trying to write a negative scoring rule that files on the > following: PO > PO# > PO # > > Following is the rule I am using: > > header PO_AND_ORDERSSubject =~ /\bPO*?#?/i > score PO_AND_ORDERS-0.50 > describe PO_AND_ORDERSA negative sco

Rule to catch PO#

2008-12-02 Thread Ray Jette
Good morning, I am trying to write a negative scoring rule that files on the following: PO PO# PO # Following is the rule I am using: header PO_AND_ORDERSSubject =~ /\bPO*?#?/i score PO_AND_ORDERS-0.50 describe PO_AND_ORDERSA negative scoring rule that searches the subject f