Looks like everything is still running fine

Thanks Mark
Justin

>>> "Justin Hillyard" <[EMAIL PROTECTED]> 16/11/2006 17:31 >>>
Hi Mark,

I've had the 2.4.4rc2 running all afternoon and no errors so far...excellent...

I'll give you another update tomorrow morning

Thanks for all your help
Justin




>>> Mark Martinec <[EMAIL PROTECTED]> 16/11/2006 14:10 >>>

Jus,

I'll be more specific:

> If you don't ALTER the quarantine.mail_text to bytea then PostgreSQL
> will complain when amavisd 2.4.4 tries to store a message to a SQL
> quarantine.

You would be getting an error like:

TROUBLE in check_mail: quar+notif FAILED: temporarily unable to quarantine:
  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, DBD::Pg::st execute failed:
  ERROR: column "mail_text" is of type text but expression is of type bytea
  HINT:  You will need to rewrite or cast the expression

> As a stop-gap solution if you don't want to alter data type just yet,
> it is possible to let Pg do conversion on-the-fly by changing
> the SQL clauses. Placing the following in amavisd.conf should do:
>
> $sql_clause{'ins_quar'} =
>   "INSERT INTO quarantine (mail_id, chunk_ind, mail_text)".
>   " VALUES (?,?,encode(?,'escape'))";
>
> $sql_clause{'sel_quar'} =
>   "SELECT decode(mail_text,'escape') FROM quarantine".
>   " WHERE mail_id=? ORDER BY chunk_ind";

The above is a good short-term (or a first step in a two-step) solution
when upgrading amavisd-new to 2.4.4 and quarantining to PostgreSQL,
before there is an opportunity to ALTER a data type of quarantine.mail_text.
It makes it possible to retain a database in a form compatible with
both 2.4.3 and 2.4.4.

When a database is finally ALTERed to use data type 'bytea',
the above two overrides to $sql_clause{'ins_quar'} and $sql_clause{'sel_quar'}
are to be removed and amavisd restarted. If they are not removed,
the resulting error is much like the one above, except for the text:

  ERROR: column "mail_text" is of type bytea but expression is of type text

which reminds you to remove the $sql_clause overrides and restart amavisd.

  Mark



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
_______________________________________________
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/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
_______________________________________________
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/



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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