ClamAV 0.93 released
Steve Freegard
steve.freegard at fsl.com
Wed Apr 30 13:46:05 IST 2008
Hi Rick,
Rick Cooper wrote:
> If you really want to see mailscanner lose weight without losing speed you
> should see it when it's using spamd instead of the perl mod.IIRC it drops to
> 15mg or so per child, make that 21mg (just checked ) and is just as fast,
> and spamd shares the sigs with it's children, again IIRC.
Yes - I've done this using GenericSpamScanner.pm
package MailScanner::CustomConfig;
use Mail::SpamAssassin::Client;
sub GenericSpamScanner {
my($ip, $from, $to, $message) = @_;
# Create spamd connection
my $spamd = new Mail::SpamAssassin::Client({port => 783, host =>
'127.0.0.1', user => 'mailscanner'});
if(!$spamd) {
MailScanner::Log::WarnLog("Unable to connect to spamd!");
return(0,"Unable to connect to spamd");
}
my($mess) = join('',@$message);
# Process message
MailScanner::Log::InfoLog("Calling spamd....");
my($result) = $spamd->process($mess);
MailScanner::Log::InfoLog("Got score %s from spamd",$result->{score});
return($result->{score}, $result->{score});
}
1;
I couldn't find any difference in speed to using the native Perl calls,
however this way allows you to be creative with what user is sent to
spamd to allow per-user/per-domain rules scores and bayes databases.
The only thing I haven't been able to do is to actually return a decent
Spam Report back to MailScanner.
Cheers,
Steve.
More information about the MailScanner
mailing list