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 2005/10/26 17:32:26 UTC

[Bug 4648] New: Illegal declaration of anonymous subroutine - Rules starting with digits

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

           Summary: Illegal declaration of anonymous subroutine - Rules
                    starting with digits
           Product: Spamassassin
           Version: 3.1.0
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Rules
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: tech2@i-is.com


Custom rule writing is becoming more and more popular.  We ran into an issue 
today with a rule starting with a number causing a lint failure in an unrelated 
file.

To see this yourself, create a new .cf file and add a test rule whose name 
starts with a number.  Run lint on this rule and it will produce something like:

[500] warn: rules: failed to compile body tests, skipping:
[500] warn: _(Illegal declaration of anonymous subroutine at C:\Perl\Site\Share\
SpamAssassin/20_drugs.cf, rule __DRUGS_DIET7, line 10.
[500] warn: )

On different systems the error message varies:
(Illegal declaration of anonymous subroutine at (no file), rule RADAR, line 10.)

And another system gave us:
[23637] warn: _(Illegal declaration of anonymous subroutine at
/etc/mail/spamassassin/70_sare_oem.cf, rule __OEM_MS_9, line 10.
[23637] warn: )



20_drugs.cf has nothing to do with this lint error, the file at fault was named 
00_test.cf

The error message produced by lint also makes it somewhat difficult to track 
down what is causing this problem.  I'm asking if lint could be enhanced to 
catch this better?

I have read someplace (possibly docs) that rules can not start with a number, 
I'm not asking for that to change, just that it be more clear when this does 
happen why it's happening.

Thank you!
Frederic Tarasevicius



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

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dev@spamassassin.apache.org
            Summary|Illegal declaration of      |[review] Illegal declaration
                   |anonymous subroutine - Rules|of anonymous subroutine -
                   |starting with digits        |Rules starting with digits






------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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


spamassassin@dostech.ca changed:

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




------- Additional Comments From spamassassin@dostech.ca  2005-12-09 03:27 -------
3.1: Committed revision 355322.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |needs 2 votes






------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] Illegal declaration of anonymous subroutine - Rules starting with digits

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





------- Additional Comments From jm@jmason.org  2005-10-29 22:22 -------
hi Fred, Bob, yep -- agreed.

not a major issue, though, since at least the documentation is explicit about
this being a bad idea ;)



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

[Bug 4648] Illegal declaration of anonymous subroutine - Rules starting with digits

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


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dev@spamassassin.apache.org |spamassassin@dostech.ca
             Status|NEW                         |ASSIGNED




------- Additional Comments From spamassassin@dostech.ca  2005-11-01 01:00 -------
Created an attachment (id=3222)
 --> (http://issues.apache.org/SpamAssassin/attachment.cgi?id=3222&action=view)
patch

Fixes rule name check and also checks for rule names that cause subroutine
identifiers to be too long.



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

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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





------- Additional Comments From spamassassin@dostech.ca  2005-11-04 04:05 -------
trunk revision 330694



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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





------- Additional Comments From jm@jmason.org  2005-12-08 22:21 -------
ping: 1 vote needed



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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


duncf@debian.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 1 vote                |ready to commit






------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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





------- Additional Comments From jm@jmason.org  2005-11-18 06:54 -------
+1



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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





------- Additional Comments From duncf@debian.org  2005-12-09 03:22 -------
+1



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] [review] Illegal declaration of anonymous subroutine - Rules starting with digits

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


spamassassin@dostech.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|needs 2 votes               |needs 1 vote






------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

[Bug 4648] Illegal declaration of anonymous subroutine - Rules starting with digits

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


Bob@Menschel.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|Undefined                   |3.1.1




------- Additional Comments From Bob@Menschel.net  2005-10-29 08:28 -------
Triage: Not knowing much about the --lint process, IMO it should be easy to add
a quick check "if any rule begins with a digit, report this as a --lint error
and disable that rule from further checking". I'm assigning a target milestone
hoping I'm right. No problem if this has to get shifted to 3.2.0. 



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