You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2008/11/05 13:02:53 UTC

[Bug 6012] New: "mass-check --reuse" breaks meta rules that use reused net subrules

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012

           Summary: "mass-check --reuse" breaks meta rules that use reused
                    net subrules
           Product: Spamassassin
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Masses
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: jm@jmason.org


http://ruleqa.spamassassin.org/20081101-<a href="https://svn.apache.org/viewcvs.cgi?view=rev&rev=709658">r709658</a>-n/T_URIBL_META_SURBL_ANY/detail
:

MSECS      SPAM%     HAM%     S/O    RANK   SCORE  NAME WHO/AGE
0.00000   0.7524   0.1303   0.852    0.76    0.00  T_URIBL_META_SURBL_ANY  
0.00000   6.9190   0.0000   1.000    0.90    0.00  T_URIBL_META_SURBL_ANY
net-bb-jm 
0.00000   0.0010   0.1347   0.007    0.45    0.00  T_URIBL_META_SURBL_ANY
net-dos 
0.00000   5.8239   0.0160   0.997    0.89    0.00  T_URIBL_META_SURBL_ANY
net-jm 
0.00000  42.3971   0.5892   0.986    0.83    0.00  T_URIBL_META_SURBL_ANY
net-zmi 

those figures are way too low, seeing as the rule is:

meta        URIBL_META_SURBL_ANY   (URIBL_AB_SURBL || URIBL_JP_SURBL ||
URIBL_OB_SURBL || URIBL_PH_SURBL || URIBL_SC_SURBL || URIBL_WS_SURBL)


it's clear that all the lines in the log that match URIBL_AB_SURBL but not
URIBL_META_SURBL_ANY are marked "reuse=yes".  Investigating, mass-check turns
off all the reused network rules by setting scores to 0.  All of the
URIBL_*_SURBL rules are marked as reusable.  In mass-check, they're added to
the rules list *after* meta rules are computed.  This means that the above meta
will never fire on "reuse=yes" mails.


This is a pretty major bug in mass-check --reuse IMO.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #4 from Justin Mason <jm...@jmason.org>  2009-02-27 03:20:45 PST ---
cool!   +1.  one minor thing. would it be possible for the "reuse" setting to
automatically know to reuse the rule's own name, so this kind of echo-echo
isn't required:

+reuse  NO_DNS_FOR_FROM         NO_DNS_FOR_FROM


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012


Duncan Findlay <du...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |6074




-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #2 from Justin Mason <jm...@jmason.org>  2008-11-05 06:46:42 PST ---
(In reply to comment #1)
> Duncan has created a Reuse plugin that solves this problem.  The intention is
> to get it merged into the main SA code once its ready.  Just FYI.

that'd be awesome ;)


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #3 from Duncan Findlay <du...@apache.org>  2009-02-26 18:34:19 PST ---
Created an attachment (id=4435)
 --> (https://issues.apache.org/SpamAssassin/attachment.cgi?id=4435)
Reuse plugin and supporting changes

This patch does the following:

- Pluginizes reuse functionality.
- Simulates adding reuse rule hits at the same stage of the message scanning
process as they would usually be run.
- Simplifies mass-check, parse-rules-for-masses, etc.
- Allows for "virtual" reuse rules -- rules that don't have a proper definition
in the current source, but may have a score (this could be useful for rules
that are distributed outside of the normal rules, for example the sought
ruleset).

Some side effects:

- Hits will no longer be added if the rule has a score of zero.
- "reuse" is a properly supported config option
- mass-check --reuse will run score set 0/2, not score set 1/3. (Reuse hits are
added regardless of score, but use --net as well if you want total score to
reflect score set 1 or 3 scores.)
- parse-rules-for-masses no longer knows anything about reused rules

(And probably some more I'm forgetting about.)

Please take a look. I'll assume lazy consensus and commit in a few days if I
don't hear anything. :-)


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #7 from Justin Mason <jm...@jmason.org>  2009-02-27 11:43:01 PST ---
(In reply to comment #6)
> Yes, this fixes the bug. In this case, as long as URIBL_*_SURBL are marked as
> reuse, and T_URIBL_META_SURBL_ANY is not, it will hit when appropriate.
> 
> I think I'm fine with changing the syntax so that "reuse FOO" acts the same as
> "reuse FOO FOO".
> 
> My concern was just that: "reuse FOO" reuses hits from FOO and maps them to
> FOO, while "reuse FOO BAR" takes hits from BAR and maps them to FOO. So if you
> want an old rule "BAR" to be treated like "FOO", you need to change "reuse FOO"
> to "reuse FOO FOO BAR", which is a bit unintuitive.

what about adopting the same semantics as current "#reuse"? ie. "reuse FOO BAR"
would be interpreted as if it were "reuse FOO FOO BAR", in other words the
reuse of FOO is implicit and doesn't need to be specified.

I can't think of a scenario where "reuse FOO BAR" -- ie. "old rule BAR should
be treated like FOO, but existing hits on FOO should not" -- would be
appropriate...


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #1 from Michael Parker <pa...@pobox.com>  2008-11-05 06:36:37 PST ---
Duncan has created a Reuse plugin that solves this problem.  The intention is
to get it merged into the main SA code once its ready.  Just FYI.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #6 from Duncan Findlay <du...@apache.org>  2009-02-27 11:17:37 PST ---
Yes, this fixes the bug. In this case, as long as URIBL_*_SURBL are marked as
reuse, and T_URIBL_META_SURBL_ANY is not, it will hit when appropriate.

I think I'm fine with changing the syntax so that "reuse FOO" acts the same as
"reuse FOO FOO".

My concern was just that: "reuse FOO" reuses hits from FOO and maps them to
FOO, while "reuse FOO BAR" takes hits from BAR and maps them to FOO. So if you
want an old rule "BAR" to be treated like "FOO", you need to change "reuse FOO"
to "reuse FOO FOO BAR", which is a bit unintuitive.


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012





--- Comment #5 from Justin Mason <jm...@jmason.org>  2009-02-27 03:21:32 PST ---
oh also -- so that plugin _does_ fix this bug, right? ;)


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012


Duncan Findlay <du...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #8 from Duncan Findlay <du...@apache.org>  2009-03-02 14:50:18 PST ---
OK. I went with Justin's proposed syntax, since I can't think of the use case
where you'd want to do add hits from BAR as rule FOO, but not hits from FOO.

Committed revision 749462 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=749462 ).


-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

[Bug 6012] "mass-check --reuse" breaks meta rules that use reused net subrules

Posted by bu...@bugzilla.spamassassin.org.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6012


Duncan Findlay <du...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |duncf@apache.org




-- 
Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.