"doveadm index -A": Failed to iterate through some users

Discussion in 'Installation/Configuration' started by bax, Apr 7, 2014.

  1. bax

    bax Member


    I'm trying to execute doveadm index -A * -q

    This is the message I'm getting in the console:

    doveadm(root): Error: User listing returned failure
    doveadm: Error: Failed to iterate through some users

    This is what is found in the logs (mail.log):
    dovecot: auth-worker(18429): Warning: mysql: Query failed, retrying: Table 'dbispconfig.users' doesn't exist
    dovecot: auth-worker(18429): Error: sql: Iterate query failed: Table 'dbispconfig.users' doesn't exist (using built-in default iterate_query: SELECT username, domain FROM users)
    Anything I could try?

    Thank you!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if your custom dovecot setup needs additional mysql tables.
  3. bax

    bax Member

    Actually dovecot is as set up by ISPConfig3 (lastest RC from the blog).
    I only added some stricter TLS-settings and fts-solr Plugin in dovecot.conf…
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Which perfect server tutorial did you use to setup your system?

    You did not install any other dovecot modules, indexers or changed any other lines in the dovecot files except of the cipher suite?
  5. bax

    bax Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Your problem is caused by the solr indexer that you added manually, and not the iSPConfig RC. The doveadm -A command requires a additional sql configuration setting:



    iterate_query = SELECT userid AS username, domain FROM users

    the users are in the mail_user table in ispconfig. The username and domain are in the email field, so you might have to use the mysql split commant to split them by the @ sign.
  7. bax

    bax Member

    Thank you!
    I totally oversaw this!
    There even is a line in dovecot-sql.conf that just has to be uncommented:

    # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers.
    # Do not enable it on Dovecot 1.x servers
    iterate_query = SELECT email as user FROM mail_user
    Now works like a charm!

    Autocommit is enabled in solr config to run every 10 minutes.


    */10 * * * * root doveadm index -A -q INBOX
    12 2 * * * root doveadm index -A -q *
    47 3 * * * root curl http://localhost:8983/solr/update?optimize=true
    17 3 4 * * root doveadm fts rescan -A      

Share This Page