Hi, I was hoping someone on this list could help me with a custom rule for SpamAssassin. I'm not an expert at perl regexps by at all, and spent a lot of time trying to come up with a working match, all to no avail...
What I would like to match on is URLs that do _not_ start with a third level domain entry, and end with ".com", ".biz", ".info", etc. For example, "http://hello.com/" (followed by more stuff) would match, and "http://www.hello.com/{...}" would _not_ match. Actually another way of looking at it is just matching on a single domain, without any preceding ".", so basically "//domain.ext/" is what I want to match for, and if there is a preceding "." in front of "domain", that would cause it to not match. So "http://foo.bar.net/" would not match, but "http://bar.net/" would. Is this possible with perl regexps? I've spent hours trying variations of different URI rules, but none of them work (they always match the "www." as well). Here are some of my feeble attempts: [^w]{3}.*\.com\/ ^(?:http?:\/\/)?[^\/]+(?<!\/www)\.[^.]{7,}\.com\/ (?<!www\.) ... [^\/]+(?<!\/www)\.{1,}\.com\/ Some of the "dot only" checks I tried: (?<!\.)\w+?\.com ([^\.])\w+.*\.com\/ Again none of these work :-( I really appreciate any any help you could provide! .dh -- View this message in context: http://www.nabble.com/need-help-with-spamassassin-URI-rule-tp20897907p20897907.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.