Jason,

>   I moved from 2.5 to 2.6 and encountered some errors.   Regretfully, I
> wiped my database and started fresh.  This morning, I found mail queued
> up for several hours.  It was due to this error:
>
> Sep 28 00:00:01 mail amavis[30234]: (30234-03) (!!)TROUBLE in
> check_mail: sql-enter FAILED: find_or_save_addr: failed to in
>
> sert addr [email protected]: sql exec: err=1062, 23000, DBD::mysql::st
> execute failed: Duplicate entry '[email protected]


> I see this email last summer:
>
> "Looks like the AUTO_INCREMENT counter value was reset after the change
> of the table msgs, and started counting from zero again. Not good."
>

As the post you found suggests, it looks like the auto-increment counter is
b0rked.  It's a simple fix, though you'll have to lose all of your
historical stats data.

1) Shutdown amavis to prevent anything nasty happening whilst you're
playing with the database (/etc/init.d/amavis stop or similar)
2) Login to MySQL on the console - "mysql -p"
3) Switch to the amavis database - "use amavis" (replace 'amavis' with
whatever your DB is called)

You'll need to reset all of the tables to 'factory defaults' (including all
of the counters). Whilst 'delete from' will remove the data, it won't reset
the auto-increment counters.  Truncate on the other hand will do both

4) Issue the command 'truncate table msgs;' to mysql which will clear
everything out of msgs and reset the counters. Repeat this for the msg_rcpt
and maddr tables...

5) truncate table msg_rcpt;
6) truncate table maddr;

7) Logout of mysql and restart amavis (/etc/init.d/amavis start or similar)

Wiping all three tables will ensure that everything starts from a known
good state - and the references between the tables don't get messed up.

Be sure that you don't truncate the policy, wblist or users table otherwise
you'll lose all of your configuration!

I've no idea why this would happen - though the steps above should resolve
it.

HTH


Richard



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
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