Ruleset-from-function Custom Function Broken??

Rose, Bobby brose at med.wayne.edu
Fri Mar 7 03:22:30 GMT 2008


I've tried that with the same result.  It's reading in that ruleset
based on what I've debugged.  I think what is occurring is that when
ruleset-from-function creates that temp mailscanner.conf and reads in
that single keyword and processes it, all the other config values resort
to the defaults of ConfigDefs.  If I disable strict refs in the
/bin/MailScanner file and uncommment 
print STDERR "Queues are \"" . join('","', at inqdirs) . "\"\n";
Then if I start I get 

In Debugging mode, not forking...
Trying to setlogsock(unix)
Defining virusscan =
&VirusScanning('/opt/MailScanner/etc/rules/virus.scanning.rules')
Defining virusscan = /opt/MailScanner/etc/rules/virus.scanning.rules
Keyword is virusscan, filename is
/opt/MailScanner/etc/rules/virus.scanning.rules and type is yesno
SpamAssassin temp dir =
/var/spool/MailScanner/incoming/SpamAssassin-Temp
Queues are ""
Building a message batch to scan...

And in the log

Mar  6 22:12:40 eeyore MailScanner.conf-test[17335]: MailScanner E-Mail
Virus Scanner version 4.67.6 starting... 
Mar  6 22:12:41 eeyore MailScanner.conf-test[17335]: Skipping Custom
Function file Ruleset-from-Function.bak as its name does not end in .pm
or .pl 
Mar  6 22:12:41 eeyore MailScanner.conf-test[17335]: Read 817 hostnames
from the phishing whitelist 
Mar  6 22:12:41 eeyore MailScanner.conf-test[17335]: Read 5574 hostnames
from the phishing blacklist 
Mar  6 22:12:42 eeyore MailScanner.conf-test[17335]: Config: calling
custom init function MailWatchLogging 
Mar  6 22:12:42 eeyore MailScanner.conf-test[17335]: Started SQL Logging
child 
Mar  6 22:12:42 eeyore MailScanner.conf-test[17335]: Config: calling
custom init function
VirusScanning('/opt/MailScanner/etc/rules/virus.scanning.rules') 
Mar  6 22:12:42 eeyore MailScanner.conf-test[17335]: SpamAssassin
temporary working directory is
/var/spool/MailScanner/incoming/SpamAssassin-Temp 
Mar  6 22:12:43 eeyore MailScanner.conf-test[17335]: Using SpamAssassin
results cache 
Mar  6 22:12:43 eeyore MailScanner.conf-test[17335]: Connected to
SpamAssassin cache database 
Mar  6 22:12:43 eeyore MailScanner.conf-test[17335]: Enabling
SpamAssassin auto-whitelist functionality... 
Mar  6 22:12:52 eeyore MailScanner.conf-test[17335]: I have found
clamavmodule antivir scanners installed, and will use them all by
default. 
Mar  6 22:12:55 eeyore MailScanner.conf-test[17335]: Using locktype =
posix 
Mar  6 22:12:55 eeyore MailScanner.conf-test[17335]: Creating hardcoded
struct_flock subroutine for linux (Linux-type) 

But in my mailscanner.conf file, SA auto-whitelist is no and the virus
scanners isn't sent to auto.  If I drop something into the mqueue.in,
nothing happens...the mailscanner process doesn't see it since I'm
guessing it no longer has it's queue defined.

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian
Field
Sent: Thursday, March 06, 2008 11:29 AM
To: MailScanner discussion
Subject: Re: Ruleset-from-function Custom Function Broken??

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



Rose, Bobby wrote:
> Doe anyone know how this example is supposed to work?  I'm rtrying to 
> use it as a template but if I set Virus Scanning =  
> &VirusScanning('%rules-dir%/virus.scanning.rules')
> and don't change anything with Ruleset-from-function.pm  I start a 
> MailScanner process in debug
>  
> Can't use string ("/var/spool/mqueue.in") as an ARRAY ref while 
> "strict refs" in use at ./MailScannerTest line 1427.
>  and I also see
What happens if you don't use "%rules-dir%" but give the real directory
name there instead?
>  
> Enabling SpamAssassin auto-whitelist functionality...
>  
> in the maillogs even though that isn't enabled in the MailScanner.conf

> file
>  
> If I remove the Virus Scaning custom function and start in debug, 
> there's no error and no SA Autowhitelist message is logged.
>  
> I'm thinking something changed in Config.pm that breaks the calling of

> rulesets external to config.pm
>  
> Any ideas?
>  
> Bobby

Jules

- --
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

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


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.8.1 (Build 2523)
Comment: (pgp-secured)
Charset: ISO-8859-1

wj8DBQFH0BvUEfZZRxQVtlQRAhCBAJ42irIMILFvy9V+7/NmucXXfDAl+gCfZjyd
KDuAeCgCKSS/s2xw7z46mwE=
=sU8n
-----END PGP SIGNATURE-----

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

--
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