amavis-user March 2012 archive
Main Archive Page > Month Archives  > amavis-user archives
amavis-user: amavisd-new SQL-Error... Please Help!

amavisd-new SQL-Error... Please Help!

From: Klaus Tachtler <klaus_at_nospam>
Date: Fri Mar 16 2012 - 09:16:55 GMT
To: amavis-users@amavis.org

Hello List,

my english ist not the best, sorry for that, but I have following Problem...

Follwoing error message ouccurs in /var/log/maillog:

(!)WARN save_info_final: sql exec: err=1452, 23000, DBD::mysql::st
execute failed: Cannot add or update a child row: a foreign key
constraint fails (`amavis`.`msgrcpt`, CONSTRAINT `msgrcpt_ibfk_2`
FOREIGN KEY (`mail_id`) REFERENCES `msgs` (`mail_id`) ON DELETE
CASCADE) at (eval 99) line 166.

The Problem ONLY occurs in the LOG-file, when the daily cron jobs
startet und a cleanup script from MailZu ist running, I think, OR
maybe it's only a accident?

My question is, what ist the Problem and how can i solve this?

OS : Linux CentOS 6.2 (64-bit)
amavisd-new Version: 2.6.6
             Release: 2.el6.rf
MySQL-Version : 5.1.61
       Release : 1.el6_2.1

/etc/amavisd.conf (relevant Part):
...
@lookup_sql_dsn =
   ( ['DBI:mysql:database=amavis;host=10.0.0.30;port=3306', 'amavis', '...'] );
@storage_sql_dsn = @lookup_sql_dsn;
...

Thank you for your help!
Klaus.

-- ------------------------------------------------ e-Mail : klaus@tachtler.net Homepage: http://www.tachtler.net DokuWiki: http://www.dokuwiki.tachtler.net ------------------------------------------------