On Mon, 15 Jan 2007 15:14:36 +0000, Ben Wylie
<[EMAIL PROTECTED]> wrote:

>I have tried writing a rule to detect a specific To Header:
>
>header FULLNAMEINTOHEADER To =~ /\"Full\sName\"\s<[EMAIL PROTECTED]>/
>
>When i tested this rule against an email with the string, the result i 
>get is:
>
>       * -2.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1%
>       *      [score: 0.0000]
>       *  0.0 HTML_MESSAGE BODY: HTML included in message
>       *  0.5 MISSING_SUBJECT Missing Subject: header
>       *  2.3 TO_CC_NONE No To: or Cc: header
>       *  0.9 FM_NO_STYLE FM_NO_STYLE
>       *  2.5 FM_NO_FROM_OR_TO FM_NO_FROM_OR_TO
>       * -0.0 NO_RECEIVED Informational: message has no Received headers
>       *  0.5 FM_NO_TO FM_NO_TO
>       *  1.0 KAM_BLANK01 Blank emails
>
>I noticed in the debug info it has the following errors:
>
>[2768] warn: Possible unintended interpolation of @ntlworld in string at 
>F:\Perl\site/etc/mail/spamassassin/70_ben_misc.cf, rule 
>FULLNAMEINTOHEADER, line 1.
>[2768] warn: rules: failed to run header tests, skipping some: Global 
>symbol "@ntlworld" requires explicit package name at 
>F:\Perl\site/etc/mail/spamassassin/70_ben_misc.cf, rule 
>FULLNAMEINTOHEADER, line 1.
>
>Surely this must be some kind of bug?
>I understand if i write a bad rule then it will cause problems, but why 
>does it claim not to be able to do *any* header tests? Surely it should 
>ignore the bad rule and just use everything else.
>Secondly, it claims to not be able to run header tests, and yet it still 
>seems to run many header tests, which it runs on nothing (I presume it 
>just drops all the headers). So i get a whole load of hits for no To or 
>CC or Received headers, however they are clearly there.
>
>Obviously it isn't going to be a problem with good rules, but i can't 
>see why this happens when i have a bad rule.
>Is this something that could be fixed or do you deserve all you get if 
>you don't spamassassin --lint your new rules?
>

You need to escape the @ symbol or Perl will interpret it as an
instruction

Reply via email to