You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Martin Schiøtz <ma...@gmail.com> on 2006/07/06 10:49:23 UTC
spamassassin and sql
Hi
I'm trying to setup spamassassin with postgres for with bayes_sql,
awl_sql, dcc, razor using sql user_pref etc.
I have configured the database with:
http://spamassassin.apache.org/full/3.1.x/dist/sql/awl_pg.sql
wget http://spamassassin.apache.org/full/3.1.x/dist/sql/bayes_pg.sql
wget http://spamassassin.apache.org/full/3.1.x/dist/sql/userpref_pg.sql
I'm using:
spamassassin-3.1.3
postgresql-8.1.4
I can see that spamd is using the right sql user_pref but I get a lot
of postgres encoding errors when scanning mails.
>From mailllog:
Jul 6 04:07:48 BlackPete spamd[4192]: bayes: tok_get: SQL error:
ERROR: invalid byte sequence for encoding "UTF8": 0xc829
Jul 6 04:07:48 BlackPete spamd[4192]: bayes: _put_token: SQL error:
ERROR: invalid byte sequence for encoding "UTF8": 0xc829
I guess this has something to do with string-escaping in postgres. How
do I solv this problem?
Best regards,
Martin
Re: spamassassin and sql
Posted by Martin Schiøtz <ma...@gmail.com>.
On 7/6/06, Stuart Johnston <st...@ebby.com> wrote:
> Martin Schiøtz wrote:
> > Hi
> >
> > I'm trying to setup spamassassin with postgres for with bayes_sql,
> > awl_sql, dcc, razor using sql user_pref etc.
> >
> > I have configured the database with:
> > http://spamassassin.apache.org/full/3.1.x/dist/sql/awl_pg.sql
> > wget http://spamassassin.apache.org/full/3.1.x/dist/sql/bayes_pg.sql
> > wget http://spamassassin.apache.org/full/3.1.x/dist/sql/userpref_pg.sql
> >
> > I'm using:
> > spamassassin-3.1.3
> > postgresql-8.1.4
> >
> > I can see that spamd is using the right sql user_pref but I get a lot
> > of postgres encoding errors when scanning mails.
> > From mailllog:
> > Jul 6 04:07:48 BlackPete spamd[4192]: bayes: tok_get: SQL error:
> > ERROR: invalid byte sequence for encoding "UTF8": 0xc829
> > Jul 6 04:07:48 BlackPete spamd[4192]: bayes: _put_token: SQL error:
> > ERROR: invalid byte sequence for encoding "UTF8": 0xc829
> >
> > I guess this has something to do with string-escaping in postgres. How
> > do I solv this problem?
>
> Do you have a line like this in your local.cf?
>
> bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL
>
I got this:
bayes_store_module Mail::SpamAssassin::BayesStore::SQL
but using PgSQL solved problem :-)
- Martin :-)
Re: spamassassin and sql
Posted by Stuart Johnston <st...@ebby.com>.
Martin Schiøtz wrote:
> Hi
>
> I'm trying to setup spamassassin with postgres for with bayes_sql,
> awl_sql, dcc, razor using sql user_pref etc.
>
> I have configured the database with:
> http://spamassassin.apache.org/full/3.1.x/dist/sql/awl_pg.sql
> wget http://spamassassin.apache.org/full/3.1.x/dist/sql/bayes_pg.sql
> wget http://spamassassin.apache.org/full/3.1.x/dist/sql/userpref_pg.sql
>
> I'm using:
> spamassassin-3.1.3
> postgresql-8.1.4
>
> I can see that spamd is using the right sql user_pref but I get a lot
> of postgres encoding errors when scanning mails.
> From mailllog:
> Jul 6 04:07:48 BlackPete spamd[4192]: bayes: tok_get: SQL error:
> ERROR: invalid byte sequence for encoding "UTF8": 0xc829
> Jul 6 04:07:48 BlackPete spamd[4192]: bayes: _put_token: SQL error:
> ERROR: invalid byte sequence for encoding "UTF8": 0xc829
>
> I guess this has something to do with string-escaping in postgres. How
> do I solv this problem?
Do you have a line like this in your local.cf?
bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL