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 2007/03/09 18:10:55 UTC

[Bug 5375] New: DC_* rules need if-plugin lines

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5375

           Summary: DC_* rules need if-plugin lines
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Rules
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: tech2@i-is.com


The DC_* rules need to be wrapped in if-plugin lines.  What about the
DIGEST_MULTIPLE rule?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From jm@jmason.org  2007-03-09 11:55 -------
the message is still annoying and causes FAQs though... it'd be good to deal
with it somehow.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From tech2@i-is.com  2007-03-09 12:46 -------
To help even more, sorry about the paste but here's the original message that 
started this.

Fred Tarasevicius writes:
> Hello Justin,
> SpamAssassin version 3.2.0-pre2-r512851
> I'm having problems with sa-update and the 3.2.0 pre2 release.  In the
> distro 50_scores.cf we have scores set for various DC_* rules 4 of
> them I can see,
> DC_PNG_UNO_LARGO
> DC_IMAGE_SPAM_TEXT
> DC_GIF_UNO_LARGO
> DC_IMAGE_SPAM_HTML
> I think these rules should be wrapped in if-plugin lines, I am getting a
> failed lint when trying to install from this pre2 file.  Since I can't
> lint the installed code, I also can't lint when trying to run
> sa-update.
> 
> Once I comment out those scores, I can lint again.
> 
> When I try to run sa-update -D --allowplugins I get the
> following:
> 
> [5535] dbg: rules: meta test DIGEST_MULTIPLE has undefined 
dependency 'RAZOR2_CHECK'
> [5535] dbg: rules: meta test DIGEST_MULTIPLE has undefined 
dependency 'DCC_CHECK'
> [5535] dbg: rules: meta test DIGEST_MULTIPLE has undefined 
dependency 'PYZOR_CHECK'
> [5535] dbg: rules: meta test STOCK_IMG_HTML has undefined 
dependency '__HTML_IMG_ONLY'
> [5535] dbg: rules: meta test STOCK_IMG_CTYPE has undefined 
dependency '__HTML_IMG_ONLY'
> [5535] info: rules: meta test HS_PHARMA_1 has 
dependency 'HS_SUBJ_ONLINE_PHARMACEUTICAL' with a zero score
> [5535] dbg: rules: meta test STOCK_IMG_HDR_FROM has undefined 
dependency '__HTML_IMG_ONLY'
> [5535] dbg: check: is spam? score=4.205 required=5
> [5535] dbg: check: 
tests=MISSING_DATE,MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS
> [5535] dbg: check: 
subtests=__HAS_MSGID,__MISSING_REF,__MSGID_OK_DIGITS,__MSGID_OK_HOST,__MSOE_MID
_WRONG_CASE,__NONEMPTY_BODY,__SANE_MSGID,__UNUSABLE_MSGID
> [5535] dbg: plugin: Mail::SpamAssassin::Plugin::MIMEHeader=HASH(0x9df068c) 
implements 'finish_tests', priority 0
> [5535] dbg: plugin: Mail::SpamAssassin::Plugin::Check=HASH(0x9df07a0) 
implements 'finish_tests', priority 0
> channel: lint check of update failed, channel failed
> ...
> [5535] dbg: diag: updates complete, exiting with code 4
> 
> 
> 
> Digging into this I found DIGEST_MULTIPLE is also not wrapped around
> if-plugin lines, should it be?  I do not use RAZOR2, DCC, or PYZOR
> so these tests are not active for me.  The issue above with
> __HTML_IMG_ONLY is most likely because those rules are wrapped inside
> the block for ImageInfo plugin and I don't recall enabling it.
> 
> 


On top of this, I noticed I didn't have this problem when I installed on a 
machine that didn't have an earlier version of 3.2 installed.  My production 
machine has had various 3.2 builds installed as features were added.  On a 
backup machine that had 3.1, same install procedure produced different 
results, I'm wondering if something from a previous 3.2 was left around.  I 
did remove all files in /var/spamassassin to be sure before installing but I'm 
not sure why this issue didn't show up on the older machine I have here.  I'm 
off to install on the third machine and if any troubles come up, I'll be back.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From parkerm@pobox.com  2007-03-09 11:36 -------
ifplugin foo && bar && barg

stuff that covers all 3 plugins

endif

Not sure how hard that would be to support though



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From jm@jmason.org  2007-03-10 05:02 -------
it was never implemented.  I think the "tflags nodepwarn" makes most sense...

back to the DC_* rules -- I think the best fix is a post-processing script for
50_scores.cf which understands which rules are ifplugin'd, and therefore can fix
the scores lines which need the same.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From jm@jmason.org  2007-03-12 06:45 -------
comment by mail from Jeff Mincy --

'On http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5375
couldn't you use a if !plugin() type construct to eliminate undefined
rule warnings?  handle_conditional would have to be extended.

-jeff

Something like:


if !plugin(Mail::SpamAssassin::Plugin::Pyzor)
meta PYZOR_CHECK 0
endif

if !plugin(Mail::SpamAssassin::Plugin::DCC)
meta DCC_CHECK 0
endif

if !plugin(Mail::SpamAssassin::Plugin::Razor2)
meta RAZOR2_CHECK 0
endif

...

meta DIGEST_MULTIPLE		RAZOR2_CHECK + DCC_CHECK + PYZOR_CHECK > 1
'



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From jm@jmason.org  2007-03-09 11:33 -------
agh, DIGEST_MULTIPLE is a tricky one.  did someone have a plan/idea to deal with
that?



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From felicity@apache.org  2007-03-09 11:39 -------
(In reply to comment #2)
> ifplugin foo && bar && barg
> 
> stuff that covers all 3 plugins
> 
> endif

Except that the rule isn't foo&&bar&&baz, it's foo+bar+baz>=2 -- so you'd need:

foo&&bar&&baz || foo&&bar || foo&&baz || bar&&baz

and to avoid the undefined rule, there'd have to be a different version for each
one.

IMO: it's a meta, and the message is informational not an error, so don't worry
about it.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From lwilton@earthlink.net  2007-03-09 23:27 -------
Wasn't there some talk about a "tflags optional" sort of thing for rules like 
this to avoid generating the undefined rule warning in a meta?

Or maybe that was implemented, but the tflags line is inside the ifplugin line 
defining the rule, so the tflag never gets defined?




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From spamassassin@dostech.ca  2007-03-09 12:26 -------
I'm inclined to leave it alone.  r486500 (bug 4347 comment 52) made it so that
you only get the message in debug mode (not as lint info and not output in the
syslog).

If people really want to silence it, I think (at the risk of suggesting adding a
tflag) I'd prefer to have a tflag such as 'nodepwarn' to shut the warnings up. 
Adding dummy rules in plugin elsif blocks seems hackish and makes writing some
code (in the future) to completely ignore useless metas difficult to impossible.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From tech2@i-is.com  2007-03-09 13:25 -------
After a 3rd install I see the only issue I'm having is the DC_* rules have
scores set for non-existent rules.  The DIGEST_MULTIPLE rule only showed up
because I was running sa-update with -D, I tried without -D and all I see is the
issues with DC_*.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From felicity@apache.org  2007-03-09 11:37 -------
(In reply to comment #1)
> agh, DIGEST_MULTIPLE is a tricky one.  did someone have a plan/idea to deal with
> that?

It's a meta rule, does it matter?  There's no single ifplugin that will handle
the rule -- we'd have to have 4, 1 for each possible combination for the
plugins.  Alternately, for all of the ifplugin sections, add in an else that
defines the rules as false so they'll be defined but never match.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5375] DC_* rules need if-plugin lines

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





------- Additional Comments From tech2@i-is.com  2007-03-09 12:41 -------
Sorry for such a short report, I meant to say that the score lines for DC_ 
rules needed to be wrapped in if plugin lines.  I noticed the DIGEST_MULTIPLE 
issue but wasn't sure if it was the reason for my lint failure.  I am fairly 
sure it's due to the DC_ issue I meant this ticket to be about.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.