You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Oliver Schulze L." <ol...@samera.com.py> on 2006/12/18 17:05:08 UTC

Perl SA module and logs like spamd

Hi,
I'm using SA from mimedefang.org,
Is there is a way to tell SA Perl module to write to log files
in the same way/format as spamd does?

That will help using tools like sa-stats.pl

Thanks
Oliver

-- 
Oliver Schulze L.   | Get my e-mail after a captcha in:
Asuncion - Paraguay | http://tinymailto.com/oliver 


Re: Perl SA module and logs like spamd

Posted by Fred T <sp...@freddyt.com>.
Hello Oliver,

Monday, December 18, 2006, 11:05:08 AM, you wrote:

> Hi,
> I'm using SA from mimedefang.org,
> Is there is a way to tell SA Perl module to write to log files
> in the same way/format as spamd does?

> That will help using tools like sa-stats.pl

> Thanks
> Oliver


In mimedefang-filter in filter_end I use:
--cut--
my $recipz;
$hits = "" unless defined $hits;
$names = "" unless defined $names;
$Scantime = "" unless defined $Scantime;
$size = "" unless defined $size;
foreach $reciptb (@Recipients) {
  $recipz = $recipz . $reciptb . ",";
}
if ($hits >= 6.0) {
  md_syslog("notice", "result: Y $hits - $names scantime=$Scantime,size=$size,user=$Recipients[0],autolearn=yes");
} else {
  md_syslog("notice", "result: N $hits - $names scantime=$Scantime,size=$size,user=$recipz,autolearn=no");
}
--cut--

Watch for line wraps, and I'm not sure if I had to make any other
changes besides this, but this is all I can see from looking at my
filter.

-- 
Best regards,
 Fred                            mailto:spamassassin@freddyt.com