<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — Solve Amavisd duplicate entry issue]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic1677.xml" />
	<updated>2011-02-17T16:17:29Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic1677-solve-amavisd-duplicate-entry-issue.html</id>
		<entry>
			<title type="html"><![CDATA[Solve Amavisd duplicate entry issue]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post7822.html#p7822" />
			<content type="html"><![CDATA[<p>Hi, all.</p><p>If you integrated Amavisd with MySQL (@storage_sql_dsn) by following our <a href="http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Integrate.MySQL.in.Amavisd">wiki tutorial</a> before 2011-02-17, you will some error log in mail log like below:<br /></p><div class="quotebox"><blockquote><p>1. Feb 17 03:29:19 gw amavis[27760]: (27760-02) (!)WARN save_info_final: sql exec: err=1062, 23000, DBD::mysql::st execute failed: <span style="color: red">Duplicate entry</span> &#039;0-6N6HdTgjTr8R-0&#039; for key &#039;PRIMARY&#039; at (eval 115) line 166, &lt;GEN38&gt; line 172.</p></blockquote></div><p>This is caused by incorrect SQL structure, you can simply fix it by executing below commands:<br /></p><div class="codebox"><pre><code>$ mysql -uroot -p
mysql&gt; USE amavisd;
mysql&gt; ALTER TABLE msgrcpt DROP PRIMARY KEY;
mysql&gt; CREATE INDEX idx_mail_id ON msgrcpt (mail_id);</code></pre></div><p>Sorry about this trouble.</p><p>P.S. Amavisd-new-2.7.0 beta version already solves this issue.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2011-02-17T16:17:29Z</updated>
			<id>http://www.iredmail.org/forum/post7822.html#p7822</id>
		</entry>
</feed>
