[Mimedefang] Patch to Add Spamd Support

Richard Laager rlaager at wiktel.com
Tue Jun 17 15:23:00 EDT 2003


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

> On Tue, 17 Jun 2003, Richard Laager wrote:
> 
> > Has it always been this way?
> 
> Yup; since way back.
> 
> > I've done both of these things already. The big change was 
> pre-compiling
> > the SpamAssassin code *outside* of the filter_XXX functions.
> 
> That's an interesting idea.  This could be done by adding the 
> following
> code to the filter (outside any routine)
> 
> spam_assassin_init()->compile_now(0) if defined(spam_assassin_init());

...

> > Finally, I haven't gotten the auto-whitelist to work with 
> MIMEDefang's
> > default spam_assassin_ functions.
> 
> They don't work easily with MD.  You have to do your own 
> initialization,
> as you suggested.

Would the following work to pre-compile and setup the whitelist? If so,
then I could stick to spam_assassin_check() later in the code instead of
doing my own SpamAssassin checking, right?

my $sa = spam_assassin_init();
if (defined($sa)) {
    $sa->compile_now(1);
    my $awl = Mail::SpamAssassin::DBBasedAddrList->new();
    $sa->set_persistent_address_list_factory($awl) if defined ($awl);
}

BTW, isn't compile_now(1) desired instead of compile_now(0) as the
sa-mimedefang.cf file is listed as the userprefs_file?

Richard Laager

-----BEGIN PGP SIGNATURE-----
Version: 6.5.8ckt http://www.ipgpp.com/

iQA/AwUBPu9qdm31OrleHxvOEQLoOwCgj5fLt9UYC5Y6bJ5k1akgSlhAJjYAn1pv
8sC7HcemJDAq6Ds48yZyPMq8
=MXWj
-----END PGP SIGNATURE-----




More information about the MIMEDefang mailing list