Yes, you are right, building from Ubuntu source package was a better idea. I just finished it, and it actually already build with --with-solr option. After compiling, all these packages were created :
dovecot-core_2.2.9-1ubuntu2.1_amd64.deb
dovecot-dbg_2.2.9-1ubuntu2.1_amd64.deb
dovecot-dev_2.2.9-1ubuntu2.1_amd64.deb
dovecot-gssapi_2.2.9-1ubuntu2.1_amd64.deb
dovecot-imapd_2.2.9-1ubuntu2.1_amd64.deb
dovecot-ldap_2.2.9-1ubuntu2.1_amd64.deb
dovecot-lmtpd_2.2.9-1ubuntu2.1_amd64.deb
dovecot-managesieved_2.2.9-1ubuntu2.1_amd64.deb
dovecot-mysql_2.2.9-1ubuntu2.1_amd64.deb
dovecot-pgsql_2.2.9-1ubuntu2.1_amd64.deb
dovecot-pop3d_2.2.9-1ubuntu2.1_amd64.deb
dovecot-sieve_2.2.9-1ubuntu2.1_amd64.deb
dovecot-solr_2.2.9-1ubuntu2.1_amd64.deb
dovecot-sqlite_2.2.9-1ubuntu2.1_amd64.deb
mail-stack-delivery_2.2.9-1ubuntu2.1_all.deb
The one I needed were all already installed by iredmail install. So after reinstalling dovecot-core.dpkg, I just had to install dovecot-solr.dpkg to have solr working ! Nice ! and Sieve works again...
So overhaul it's actually quite easy to get solr and dovecot working together.
I only have one issue remaining :
I moved all my emails from my gmail account to a new account on iredmail called user-gmail (thanks to IMAPSYNC). The transfer worked great and I can now read my gmail mails using dovecot. I have 6go of mails, so the search function is very important (that's mainly for this that I needed solr). But although solr is working fine with my main email account, I get this error with the user-gmail account (from dovecot.log):
Sep 24 15:43:49 indexer-worker: Error: User user-gmail@vxxxxxxx.fr lookup failed: Unknown user
Sep 24 15:43:49 imap(user-gmail@vxxxxxxxx.fr): Error: indexer failed to index mailbox Trash
Do you have any idea about this error?
anyway, thanks a lot for your support and your suggestions that helped me a lot.