[Mimedefang] Please review: new Spamc feature

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Tue Oct 25 20:36:22 EDT 2005

John Nemeth wrote:
>      Why don't you create a function to call spamd directly, similar
> to the way that MIMEDefang calls clamd?  That way, you won't have the
> spamc process overhead?

Something like

use Mail::SpamAssassin::Client;

my $c = new Mail::SpamAssassin::Client(...);
my $report = $c->check($msg);


and then in Client.pm

package Mail::SpamAssassin::Client;

# open the socket
# write the message
# read the report


That is another good idea.

It's harder, but potentially faster.

A potential drawback is that it relies on the SpamAssassin API.  But if I could get Mail::SpamAssassin::Client added to the SpamAssassin package, it might be just the ticket.

As far as processes go, spamc is very low overhead... just a sh call and a very light binary.  My MIMEDefang directory and /tmp directory are both ramdisks, so there's no disk I/O in slamming the data around.

Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer

More information about the MIMEDefang mailing list