Stefan,

> using DBD:Pg 1.49-2, pgsql 8.3.3 and amavisd-2.6.1, I get the
> following error:
> Sep 29 16:29:40 nemea amavis[8255]: (08255-01) writing mail text to
> SQL failed: Error closing, flush: sql inserting text failed, sql exec:
> err=7, 25P02, DBD::Pg::st execute failed: ERROR:  current transaction
> is aborted, commands ignored until end of transaction block at
> (eval 44) line 177, <GEN25> line 500. at (eval 44) line 68,
> <GEN25> line 500. 


> Having a look at the pgsql log, I see that in fact the error causing
> said transaction to fail is:
>
> 2008-09-29 15:11:14 CEST ERROR:  invalid byte sequence for encoding
> "UTF8": 0xe46c74
> 2008-09-29 15:11:14 CEST STATEMENT:  INSERT INTO quarantine (mail_id,
> chunk_ind, mail_text) VALUES ($1,$2,$3)
>
> I have tested both ways, defining quarantine.mail_test as bytea and as
> text (latter version with added "encode" statements in
> $sql_clause{'ins_quar'}.

Please see RELEASE_NOTES (2.6.0), text starting at:

- when SQL logging (pen pals) or SQL lookups are used, one can choose a
  binary or a character data type for fields users.email, mailaddr.email,
  and maddr.email; [...]

I hope it explains the situation and the solution.
The "encode"+bytea does not solve the situation, the SQL client
(i.e. amavisd) needs to specify a data type of the argument in
a call to sql.

  Mark

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to