Ruleset-from-function Custom Function Broken??

Rose, Bobby brose at med.wayne.edu
Mon Mar 10 21:17:54 GMT 2008


FYI I've tried calling
&LastSpamVirusScanning('/tmp/test','/opt/MailScanner/etc/rules/virus.sca
nning.rules') as a test and that returns the same of error 

Can't use string ("/var/spool/mqueue.in.test") as an ARRAY ref while
"strict refs" in use at ./MailScanner line 1427.

So the examples for calling a ruleset from a function seems to be
broken.  

-=B





-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Rose,
Bobby
Sent: Thursday, March 06, 2008 10:23 PM
To: MailScanner discussion
Subject: RE: Ruleset-from-function Custom Function Broken??

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




More information about the MailScanner mailing list