1

I can search old mails for single user:

doveadm search -u 'user@mydomain.tld' mailbox Trash savedbefore 180d

returns results

f35jv2jh35vj2v5jh2v53…. 31
f35jv2jh35vj2v5jh2v53…. 42
…

The same search for all users return nothing (no output):

doveadm search -A mailbox Trash savedbefore 180d

I receive no output, no errors...

Medera
  • 131
  • 1
  • 8

1 Answers1

1

I had to setup two variables to make the -A option work:

-A: When using the LDAP userdb module, make sure that the iterate_attrs and iterate_filter settings in /etc/dovecot/dovecot-ldap.conf.ext match your LDAP schema. Otherwise doveadm(1) will be unable to iterate over all users.

Example configuration in dovecot-ldap.conf.ext file:

# For using doveadm -A:
iterate_attrs = =user=%{ldap:uid}
iterate_filter = (objectClass=posixAccount)

Source: Dovecot Wiki: Userdb LDAP

anx
  • 8,963
  • 5
  • 24
  • 48
Medera
  • 131
  • 1
  • 8