Bug 2614 - FRIEND_AT_PUBLIC test broken
Summary: FRIEND_AT_PUBLIC test broken
Status: RESOLVED FIXED
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: SVN Trunk (Latest Devel Version)
Hardware: Other other
: P5 normal
Target Milestone: 2.61
Assignee: Jesus Climent
URL:
Whiteboard:
Keywords:
: 2651 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-21 04:12 UTC by Jesus Climent
Modified: 2004-01-25 22:23 UTC (History)
2 users (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Climent 2003-10-21 04:12:49 UTC
user@nicetoknowyou.com matches FRIEND_AT_PUBLIC (you.com) but shouldn't,
since you.com is just a suffix.

A proposed patch (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=212722) is:

-header FRIEND_AT_PUBLIC         To =~
/(?:yourdomain|you|your|public)\.(?:com|org|net)/i
+header FRIEND_AT_PUBLIC         To =~
/(?:\.|\@?:)(?:yourdomain|you|your|public)\.(?:com|org|net)/i
Comment 1 Keith Ivey 2003-10-21 21:04:15 UTC
The regex isn't right (it has an extraneous '?:' after the '@').  It would be
better written this way:

header FRIEND_AT_PUBLIC   To =~
/[.\@](?:yourdomain|you|your|public)\.(?:com|org|net)/i
Comment 2 Jesus Climent 2003-10-22 02:23:35 UTC
Yes, I saw it. Any objections to commit the change?
Comment 3 Justin Mason 2003-10-22 13:20:33 UTC
+1.  any lost hits are outweighed by avoiding that kind of stupid FP ;)
Comment 4 Jesus Climent 2003-10-23 05:51:30 UTC
Fixed like

[\.\@]
Comment 5 Keith Ivey 2003-11-01 15:03:22 UTC
The regex in cvs now looks like this:

  /[\@\.](?:yourdomain|you|your|(?<!re)public)\.(?:com|org|net)/i

Now that we have '[\@\.]' at the start, the '(?:!re)' can be deleted.

Actually, it wouldn't hurt to simplify it to 

  /[\@\.](?:your?(?:domain)?|public)\.(?:com|org|net)/i

since I doubt the incidental inclusion of 'youdomain' is a problem.
Comment 6 Malte S. Stretz 2004-01-26 07:23:43 UTC
*** Bug 2651 has been marked as a duplicate of this bug. ***