[Mimedefang] SpamAssassin and SQL user preferences

Zach Lowry zach at zachlowry.net
Thu Aug 29 15:22:00 EDT 2002


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

> On Sun, 18 Aug 2002 09:20:01 -0500
> "Zach Lowry" <zach at zachlowry.net> wrote:
> 
> > I'm running MIME Defang with Sendmail 8.12, Cyrus, Amavisd, and
> > Spamassassin 2.31. I used Spamass-milter previously, but it had a
> > a condition of creating many different spamd processes, and
> > bogged down the server. MIMEDefang works great, but I need to use
> > my SQL
> > preferences I have set up for SA. It doesn't seem to be getting
> > those by itself, even though I added the DBD entries into the
> > sa-mimedefang.cf file. Anybody have an idea?
> 
> In general, it's problematic to have per-user preferences in a
> milter because a message might be for more than one user.  If you
> use
> stream_by_recipient (see the mimedefang-filter man page), you can
> do it.  But you still have to tell SA to use the SQL preferences,
> and you'd have to read the SpamAssassin Perl module man pages and
> probably the mimedefang.pl source to figure out how to do that.
> 

Ok, I believe that I have it configured to stream_by_recipient. But
I'm not sure what to add to the mimedefang.pl source to have it call
the SQL database to query for the user preferences. I'm not an avid
Perl programmer, so I will probably ask mostly dumb questions. 

I replaced this:

        $SASpamTester = Mail::SpamAssassin->new({
            local_tests_only   => $SALocalTestsOnly,
            dont_copy_prefs    => 1,
            userprefs_filename => $config});

with this:

	$SASpamTester = Mail::SpamAssassin->load_scoreonly_sql
(@Recipients);

But that didn't seem to work. I'm guessing because @Recipients is an
array, and it's looking for a string. 

Am I on the right track here?

Thanks!

Zach Lowry

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPW5zEYHWQmQc5olOEQJrLwCgps5H1OucntXLjUxiP5aYcT6851sAoMkI
E7jzMzmflkC6GpxEBYvwYSX+
=eOKz
-----END PGP SIGNATURE-----




More information about the MIMEDefang mailing list