mysql_stmt_execute error: *Duplicate entry*

Issue #497 resolved
Ivan Uzunov created an issue

Hello,

I managed to install mailpiler, and iredmail on the same host under CentOS 6.6. With few tweaks here and there everything is working fine i think. I use secondary machine card with internal IP address to bind mail piler. But from time to time i see in the maillog on the machine this message : mysql_stmt_execute error: Duplicate entry '2147-archive@xxx.xxxx.xxx' for key 'id' (errno: 1062) This is something that i see from time to time for a different mailboxes. Everything looks fine in the web interface and search is working also but i want to know what this error means and did i really has this Duplicate mail entry-s archived. After i finish the installation i tested the import tool and i imported one mailbox via IMAP can this be a problem ? Also is it normal to have 10k archived messages and 13k duplicated messages ? according to web UI i mean.

Thanks in advance. Br. Ivan Uzunov.

Comments (8)

  1. Janos SUTO repo owner

    Please describe how did you configured ire mail to support archiving. I think the high number of duplicates and the mysql errors are related.

  2. Ivan Uzunov reporter

    Hello, I used CentOS 6.6 with latest iredmail + iredadmin-pro-mysql, default installation with one domain only and around 150mboxes. After this, i mainly used this FAQ : https://extremeshok.com/5381/rhel-centos-redhat-mailpiler-sphinx-mariadb-mysql/ for mailpiler installation with few changes during the compilation mainly because this FAQ is slightly out of date. My machine has two physical cards i configured postfix to listen only on the real machine ip of the first card, not on all interfaces and i am using a second card with fake address and dns name for mailpiler daemon. In the postfix config i always_bcc all mails to fake domain that is resolving to the fake ip address on the second card. So when postfix receive a mail, this mail is forwarded locally to the mailpiler daemon at port 25 on the second card. I took nginx configuration file from OVA image and web is working fine. During the setup i dont want to loose (not archiving) mails and i bcc all of the mail traffic to the real mailbox. After piler was up i used the import tool and imported all content of this mailbox via local imap.

    This is pretty much the whole story. MailPiler is still not in production so if you think its better to drop the mysql tables and start from scratch i can do this, but after this i will need to import all of the current mails again. If you need any specifics from config files please let me know.

    Br. Ivan Uzunov.

  3. Janos SUTO repo owner

    Thanks for the description. Do you send a copy to piler for each recipients or one copy per email (even if it has 10 recipients)?

  4. ivan.uzunov

    I don't know, where can i check this ? This is can be configured somewhere ? The only thing that i put into postfix main.cf is this line : always_bcc = archive@arch.xxx-xxx.xxx

  5. Log in to comment