You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Josh Trutwin <jo...@trutwins.homeip.net> on 2004/09/15 22:57:48 UTC
[RDJ] Weird Rules Du Jour Warning
Hi,
Every time I run rules_du_jour (latest version) I get a warning/error
message, but I cannot tell where it is. I changed perl to
/usr/bin/perl -w and this is what it displays:
# /root/bin/rules_du_jour
/root/bin/rules_du_jour: [: too many arguments
\1 better written as $1 at -e line 1.
The latter warning seems related to the CURL detection.
As near as I can guess the "[:" is coming from one of these lines:
PARSE_NEW_VER_SCRIPTS[0]="${PERL} -ne 'print if
/^\s*#.*(vers?|version|rev|revision)[:\.\s]*[0-9]/i;' | sort |
${TAIL}";
The error occurs right away before the bulk of output messages for
each rule.
I tried turning on -v on /bin/bash and it appears the message comes
from parsing:
[ ${PARSE_NEW_VER_SCRIPTS} ] || \
declare -a PARSE_NEW_VER_SCRIPTS; # Command to
run on the file to retrieve new version info
/root/bin/rules_du_jour: [: too many arguments
Tried to put this all on one line - same result.
Any thoughts? My /etc/mail/rulesdujour can be found at:
http://www.netbits.us/rulesdujour
Oh - perl 5.6.1 on debian
Thanks,
Josh
Re: [RDJ] Weird Rules Du Jour Warning
Posted by Chris Thielen <cm...@someone.dhs.org>.
Hi Josh,
Would you try removing all the lines such as:
[ ${VARIABLE} ] || declare -a VARIABLE;
and then re-running?
I'm clueless what is causing this. I'm not certain that
[ ${PARSE_NEW_VER_SCRIPTS} ] syntax is proper, but it's been working for
me for quite some time. My system is also Debian (sarge). I'm using
bash 2 now, but I just tried it on bash 3 and it worked with that as
well.
On Thu, 2004-09-16 at 12:09 -0500, Josh Trutwin wrote:
> On Thu, 16 Sep 2004 10:59:56 -0500
> Chris Thielen <cm...@someone.dhs.org> wrote:
>
> > Hi Josh,
> > On Wed, 2004-09-15 at 15:57 -0500, Josh Trutwin wrote:
> > > Hi,
> > >
> > > Every time I run rules_du_jour (latest version) I get a
> > > warning/error message, but I cannot tell where it is. I changed
> > > perl to/usr/bin/perl -w and this is what it displays:
> > >
> > > # /root/bin/rules_du_jour
> > > /root/bin/rules_du_jour: [: too many arguments
> >
> > Odd. Try adding "set -v" on a blank to the top of the rules_du_jour
> > script (a line or two after the #!/bin/bash) and run it again.
>
> Ok, did that though I'm not sure it helped with the output. The full
> output of this command is available at http://www.netbits.us/rdj.txt
>
> Search for "too many" to find the error.
>
> Josh
>
--
Chris Thielen
Easily generate SpamAssassin rules to catch obfuscated spam phrases
(0BFU$C/\TED SPA/\/\ P|-|RA$ES): http://www.sandgnat.com/cmos/
Keep up to date with the latest third party SpamAssassin Rulesets:
http://www.exit0.us/index.php/RulesDuJour
Re: [RDJ] Weird Rules Du Jour Warning
Posted by Josh Trutwin <jo...@trutwins.homeip.net>.
On Thu, 16 Sep 2004 10:59:56 -0500
Chris Thielen <cm...@someone.dhs.org> wrote:
> Hi Josh,
> On Wed, 2004-09-15 at 15:57 -0500, Josh Trutwin wrote:
> > Hi,
> >
> > Every time I run rules_du_jour (latest version) I get a
> > warning/error message, but I cannot tell where it is. I changed
> > perl to/usr/bin/perl -w and this is what it displays:
> >
> > # /root/bin/rules_du_jour
> > /root/bin/rules_du_jour: [: too many arguments
>
> Odd. Try adding "set -v" on a blank to the top of the rules_du_jour
> script (a line or two after the #!/bin/bash) and run it again.
Ok, did that though I'm not sure it helped with the output. The full
output of this command is available at http://www.netbits.us/rdj.txt
Search for "too many" to find the error.
Josh
Re: [RDJ] Weird Rules Du Jour Warning
Posted by Chris Thielen <cm...@someone.dhs.org>.
Hi Josh,
On Wed, 2004-09-15 at 15:57 -0500, Josh Trutwin wrote:
> Hi,
>
> Every time I run rules_du_jour (latest version) I get a warning/error
> message, but I cannot tell where it is. I changed perl to
> /usr/bin/perl -w and this is what it displays:
>
> # /root/bin/rules_du_jour
> /root/bin/rules_du_jour: [: too many arguments
Odd. Try adding "set -v" on a blank to the top of the rules_du_jour
script (a line or two after the #!/bin/bash) and run it again.
> \1 better written as $1 at -e line 1.
>
> The latter warning seems related to the CURL detection.
>
> As near as I can guess the "[:" is coming from one of these lines:
> PARSE_NEW_VER_SCRIPTS[0]="${PERL} -ne 'print if
> /^\s*#.*(vers?|version|rev|revision)[:\.\s]*[0-9]/i;' | sort |
> ${TAIL}";
>
> The error occurs right away before the bulk of output messages for
> each rule.
>
> I tried turning on -v on /bin/bash and it appears the message comes
> from parsing:
>
> [ ${PARSE_NEW_VER_SCRIPTS} ] || \
> declare -a PARSE_NEW_VER_SCRIPTS; # Command to
> run on the file to retrieve new version info
> /root/bin/rules_du_jour: [: too many arguments
>
>
> Tried to put this all on one line - same result.
>
> Any thoughts? My /etc/mail/rulesdujour can be found at:
> http://www.netbits.us/rulesdujour
>
> Oh - perl 5.6.1 on debian
>
> Thanks,
>
> Josh
>
--
Chris Thielen
Easily generate SpamAssassin rules to catch obfuscated spam phrases
(0BFU$C/\TED SPA/\/\ P|-|RA$ES): http://www.sandgnat.com/cmos/
Keep up to date with the latest third party SpamAssassin Rulesets:
http://www.exit0.us/index.php/RulesDuJour