Re: Ends with string

2017-09-15 Thread RW
On Fri, 15 Sep 2017 15:46:31 -0500 (CDT) sha...@shanew.net wrote: > So, my rule for just matching TLDs looks like: > > uri __TEST_URLS /\.(vn|pl|my|lu|vn|ar)\b[^\.-]/i > > The "\b" part excludes the letters, numbers and underscore because > those wouldn't be a word boundary. The "[^\.-]" part

Re: Ends with string

2017-09-15 Thread shanew
On Fri, 15 Sep 2017, Robert Boyl wrote: uri __KAM_SHORT/(\/|^|\b)(?:j\.mp|bit\.ly|goo\.gl|x\.co|t\.co|t\.cn|tinyurl\.com|hop\.kz|u rla\.ru|fw\.to)(\/|$|\b)/i Seems a bit complicated. It would be to make this rule check that suffixes are at the end of URI. uri __TEST_URLS /\b(\.vn

Re: Ends with string

2017-09-15 Thread Kevin A. McGrail
On 9/15/2017 12:48 PM, Robert Boyl wrote: Thanks! I didnt find this info in Writing rules tutorial. Yeah, I rewrote the rule a bit already.  Thanks! It's in the latest KAM.cf.

Re: Ends with string

2017-09-15 Thread Paul Stead
On 15/09/2017, 20:59, "Paul Stead" wrote: On 15/09/2017, 20:57, "sha...@shanew.net" wrote: If you're only looking at uris, it probably is (though I wonder a little about processing time between a long list of such entries and a single (if also long) regular expre

Re: Ends with string

2017-09-15 Thread Paul Stead
On 15/09/2017, 20:57, "sha...@shanew.net" wrote: If you're only looking at uris, it probably is (though I wonder a little about processing time between a long list of such entries and a single (if also long) regular expression). I have rules for "bad" tlds that look in headers

Re: Ends with string

2017-09-15 Thread shanew
On Fri, 15 Sep 2017, Paul Stead wrote: Something along the following still seems the easiest to read approach to me enlist_uri_host (BADTLDS) vn enlist_uri_host (BADTLDS) pl enlist_uri_host (BADTLDS) my enlist_uri_host (BADTLDS) lu enlist_uri_host (BADTLDS) ar header __TEST_URLS eval:check

Re: Ends with string

2017-09-15 Thread Paul Stead
Paul From: Robert Boyl Date: Friday, 15 September 2017 at 17:48 To: "users@spamassassin.apache.org" Subject: Re: Ends with string Hi! Thanks! I didnt find this info in Writing rules tutorial. I see uri __KAM_SHORT /(\/|^|\b)(?:j\.mp|bit\.ly|goo\.gl|x\.co|t\.co|t\.cn|tinyurl\.

Re: Ends with string

2017-09-15 Thread Robert Boyl
> >> Is there a way to create a Spamassassin rule that checks for a certain >> URL suffix such as .ru but makes sure it has to be at the end of the URI? >> Ends with string. >> >> Thanks! >> Rob >> > > Yes, it's called an anchor and Shane Wil

Re: Ends with string

2017-09-08 Thread shanew
PM, Robert Boyl wrote: Hello, everyone! Is there a way to create a Spamassassin rule that checks for a certain URL suffix such as .ru but makes sure it has to be at the end of the URI? Ends with string. Thanks! Rob Yes, it's called an anchor and Shane Williams a long time ago gave me some advic

Re: Ends with string

2017-09-08 Thread RW
On Fri, 8 Sep 2017 13:03:57 -0400 Kevin A. McGrail wrote: > On 9/8/2017 12:24 PM, Robert Boyl wrote: > > Hello, everyone! > > > > Is there a way to create a Spamassassin rule that checks for a > > certain URL suffix such as .ru but makes sure it has to be at the &g

Re: Ends with string

2017-09-08 Thread Benny Pedersen
Kevin A. McGrail skrev den 2017-09-08 19:03: Yes, it's called an anchor and Shane Williams a long time ago gave me some advice on that I used in this rule: uri __KAM_SHORT /(\/|^|\b)(?:j\.mp|bit\.ly|goo\.gl|x\.co|t\.co|t\.cn|tinyurl\.com|hop\.kz|urla\.ru|fw\.to)(\/|$|\b)/i why mak

Re: Ends with string

2017-09-08 Thread Kevin A. McGrail
On 9/8/2017 12:24 PM, Robert Boyl wrote: Hello, everyone! Is there a way to create a Spamassassin rule that checks for a certain URL suffix such as .ru but makes sure it has to be at the end of the URI? Ends with string. Thanks! Rob Yes, it's called an anchor and Shane Williams a

Re: Ends with string

2017-09-08 Thread Benny Pedersen
Robert Boyl skrev den 2017-09-08 18:24: Is there a way to create a Spamassassin rule that checks for a certain URL suffix such as .ru but makes sure it has to be at the end of the URI? Ends with string. have you in mind to just match a tld ? in that case read: perldoc Mail::SpamAssassin

Re: Ends with string

2017-09-08 Thread Ralph Seichter
On 08.09.2017 18:24, Robert Boyl wrote: > Is there a way to create a Spamassassin rule that checks for a certain > URL suffix such as .ru but makes sure it has to be at the end of the > URI? Ends with string. There is (foo$). SpamAssassin uses Perl regular expressions, and you can

Ends with string

2017-09-08 Thread Robert Boyl
Hello, everyone! Is there a way to create a Spamassassin rule that checks for a certain URL suffix such as .ru but makes sure it has to be at the end of the URI? Ends with string. Thanks! Rob