Romaric,

> > Indeed. This was fixed in amavisd-new-2.4.4.  From release notes:
> > - PostgreSQL: when storing mail text to a quarantine use pg_type=PG_BYTEA
> >   attribute on a field 'quarantine.mail_text';  previously the following
> >   error could be reported:
> >     451 4.5.0 Storing to sql db as mail_id ... failed:
> >       writing mail text to SQL failed: Error closing, flush:
> >       sql inserting text failed,
> >       sql exec: err=7, 22P02, DBD::Pg::st execute failed:
> >       ERROR: invalid input syntax for type bytea

> My column mail_text is already of type bytea, that's why most of the
> spam are quarantined without problem. I'll activate log on postgresql to
> see what happen on the database side. (I'm beginner with postgresql, I
> use Mysql most of the time, but for thousends of spams postgresql is
> better, I think) Perhaps the request is limited in size, or the field
> mail_text in bytea is limited, so a spam can't be quarantined when it's
> too big. (?)

The type of the database column is one half of the problem
(which you have already eliminated). The other half is that
the caller must tell DBD::Pg what data type it is providing
as argument. In case of PostgreSQL the extra parameter is
pg_type, value DBD::Pg::PG_BYTEA. The difficulty of a change
is that other data fields must NOT be declared PG_BYTEA,
so one additional argument (data type) needs to be carried
around through a chain of subroutine calls.

Make a diff between file amavisd from 2.4.3 and 2.4.4 distributions
to get an idea. See also man page for DBD::Pg and look for pg_type.

> >> I got another problem, when I release mail (ham) with amavisd-release,
> >> they come back in the spam quarantine. I use Mailzu 0.8RC1 to manage
> >> them but the probleme is not with mailzu.
> >> If I wait 1 hour or more, I can finally release them. Why ?

Seems I misunderstood the question. If a released message comes
back in a quarantine, it looks like it was released back to MTA
on its incoming port, not to 10025. Versions of amavisd
before 2.4.3 could not release directly to 10025 - I almost
forgot about it:

amavisd-new-2.4.3 release notes

- introduce new variables $resend_method and $release_method (also members
  of policy banks), both are undefined by default.  If defined and nonempty,
  $resend_method overrides forward_method on forwarding a defanged mail,
  and $release_method overrides notify_method on releasing a message from
  quarantine. The $resend_method might be useful when a modified mail
  requires local DKIM or DomainKeys re-signing;

>  >Perhaps you should be looking for a more agile distribution :)
>
> Actually I prefer Gentoo :), but the server was installed with Debian
> and I can't stop it...

So don't stop it, install a substitute and reroute mail  :)

  Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
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