Syntax error in rule file.

Ricardo Aguiar ricardo at memosis.pt
Wed May 3 10:14:25 IST 2006


Ok. After adding the line to Config.pm. This are the line on the console after running the "MailScanner -debug"

[root at server MailScanner]# MailScanner -debug
In Debugging mode, not forking...
internalvalue = "0" and settype = "yesno"
internalvalue = "0" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "1" and settype = "yesno"
internalvalue = "0" and settype = "yesno"
internalvalue = "" and settype = "yesno"
internalvalue = "" and settype = "yesno"
internalvalue = "/etc/MailScanner/filename.no.rules.conf" and settype = "other"
internalvalue = "/etc/MailScanner/filename.rules.conf" and settype = "other"
internalvalue = "/etc/MailScanner/filetype.no.rules.conf" and settype = "other"
internalvalue = "/etc/MailScanner/filetype.rules.conf" and settype = "other"

In the log file:

May  3 09:57:48 server MailScanner[7608]: MailScanner E-Mail Virus Scanner version 4.53.6 starting... 
May  3 09:57:49 server MailScanner[7608]: Syntax error in line 1 of ruleset file /etc/MailScanner/filename.rules.rules 
May  3 09:57:49 server MailScanner[7608]: Syntax error in line 2 of ruleset file /etc/MailScanner/filename.rules.rules 
May  3 09:57:49 server MailScanner[7608]: Found syntax errors in /etc/MailScanner/filename.rules.rules. 
May  3 09:57:49 server MailScanner[7608]: Read 717 hostnames from the phishing whitelist 
May  3 09:57:51 server MailScanner[7608]: Using SpamAssassin results cache 
May  3 09:57:51 server MailScanner[7608]: Connected to SpamAssassin cache database 
May  3 09:57:51 server MailScanner[7608]: Expired 5 records from the SpamAssassin cache 
May  3 09:57:51 server MailScanner[7608]: Enabling SpamAssassin auto-whitelist functionality... 
May  3 09:58:01 server MailScanner[7608]: ClamAV scanner using unrar command /usr/bin/unrar 
May  3 09:58:01 server MailScanner[7608]: Using locktype = flock 
May  3 10:01:04 server update.virus.scanners: Delaying cron job up to 600 seconds 

This file has tabs, no spaces.
[root at server MailScanner]# cat /etc/MailScanner/filename.no.rules.conf
allow   .       -       -

I could add the /etc/MailScanner/filename.rules.conf" but it is the original. If it helps the md5sum is:
[root at server MailScanner]# md5sum /etc/MailScanner/filename.rules.conf
2299715e7f67935f73fe0c457a5cae8e  /etc/MailScanner/filename.rules.conf

I hope that this helps.


-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian Field
Sent: terça-feira, 2 de Maio de 2006 19:40
To: MailScanner discussion
Subject: Re: Syntax error in rule file.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Very odd. I can't reproduce it.

Can you add to Config.pm
print STDERR "internalvalue = \"$internalvalue\" and settype = \"$settype\"\n"; just before line 2225.

Then do a "MailScanner -debug" and let me know what this line prints.

Either that, or mail me off-list with remote login details and root password for your system, and I'll take a look after I've eaten my dinner.

Ricardo Aguiar wrote:
> Hi,
>
> I just upgraded from version '4.51.6' to '4.53.6' and I'm using a rule file to control filenames per domain.
>
> After running "MailScanner -lint" with the new version installed I get:
>
> Syntax error in line 1 of ruleset file 
> /etc/MailScanner/filename.rules.rules at 
> /usr/lib/MailScanner/MailScanner/Config.pm line 2265 Syntax error in 
> line 2 of ruleset file /etc/MailScanner/filename.rules.rules at 
> /usr/lib/MailScanner/MailScanner/Config.pm line 2265 Found syntax errors in /etc/MailScanner/filename.rules.rules. at /usr/lib/MailScanner/MailScanner/Config.pm line 2120 Read 717 hostnames from the phishing whitelist Checking for SpamAssassin errors (if you use it)...
> Using SpamAssassin results cache
> Connected to SpamAssassin cache database SpamAssassin reported no 
> errors.
>
>
> ### filename.rules.rules ###
> FromOrTo:       domain.com      /etc/MailScanner/filename.no.rules.conf
> FromOrTo:       default         /etc/MailScanner/filename.rules.conf
>
>
> This file is unchanged and work perfectly with version '4.51.6'.
>
> Thanks in advanced for any help.
>
>  ______________________________________
> | Ricardo d'Aguiar                     |
> |                                      |-
> | EMail .: ricardo at memosis.pt          |#|
>  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ #|  
> |#######################################|
>   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
>
>   

- --
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store Professional Support Services at www.MailScanner.biz MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.6 (Build 6060)

iQA/AwUBRFenbBH2WUcUFbZUEQJ2TgCfa9se7V7yyq77ES2oWC3xfHOOv0IAmQGT
ilWwsL3DITfKNDI3Un/ZCWKO
=bERL
-----END PGP SIGNATURE-----

--
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
MailScanner thanks transtec Computers for their support.

--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website! 


More information about the MailScanner mailing list