• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Dovecot Error: auth-master: userdb list: User listing returned failure

Jadek

New Pleskian
Server operating system version
Debian GNU/Linux 10 (buster)
Plesk version and microupdate number
Plesk Obsidian Web Admin Edition 18.0.48
Hi, i can't seem to get my dove adm commands to work on plesk obsidian. I keep getting the error below;

doveadm user -f 'username' '*'
Error: auth-master: userdb list: User listing returned failure
Fatal: user listing failed

Here is my configuration. From my research, the issue appears to revolve around the use of the static driver which doesn't allow user iteration. I'd have to switch the configuration to use the passwd-file but struggling to do that.

auth_mechanisms = plain login digest-md5 cram-md5 apop
auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345 67890&.-_@+'
disable_plaintext_auth = no
first_valid_uid = 30
imap_client_workarounds = delay-newmail
imap_logout_format = rcvd=%i, sent=%o
mail_home = /var/qmail/mailnames/%Ld/%Ln
mail_location = maildir:/var/qmail/mailnames/%Ld/%Ln/Maildir:UTF-8
mail_log_prefix = "service=%s, user=%u, ip=[%r]. "
mail_plugins = " quota"
managesieve_logout_format = rcvd=%i, sent=%o
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacati on subaddress comparator-i;ascii-numeric relational regex imap4flags copy includ e variables body enotify environment mailbox date index ihave duplicate mime for everypart extracttext imapflags notify
namespace inbox {
inbox = yes
location =
mailbox Drafts {
auto = create
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Spam {
auto = create
special_use = \Junk
}
mailbox Trash {
auto = create
special_use = \Trash
}
prefix = INBOX.
separator = .
}
passdb {
driver = plesk
}
plugin {
quota = maildir:User quota
quota_grace = 0
quota_warning = storage=95%% quota-warning %u
sieve = ~/.dovecot.sieve
sieve_dir = ~/sieve
sieve_extensions = +notify +imapflags
}
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
pop3_logout_format = rcvd=%i, sent=%o, top=%t/%p, retr=%r/%b, del=%d/%m, size=%s
protocols = imap pop3 sieve
service auth-worker {
group =
user =
}
service auth {
group =
unix_listener auth-userdb {
group = popuser
mode = 0600
user = popuser
}
user =
}
service imap-login {
process_limit = 1024
service_count = 1
}
service imap {
process_limit = 1024
service_count = 1
}
service pop3-login {
process_limit = 1024
service_count = 1
}
service pop3 {
process_limit = 1024
service_count = 1
}
service quota-warning {
executable = script /usr/lib/plesk-9.0/send-quota-warning
unix_listener quota-warning {
user = popuser
}
user = popuser
}
service stats {
unix_listener stats-writer {
user = popuser
}
}
ssl_cert = </etc/dovecot/private/dovecot.pem
ssl_cipher_list = EECDH+AESGCM+AES128:EECDH+AESGCM+AES256:EECDH+CHACHA20:EDH+AES GCM+AES128:EDH+AESGCM+AES256:EDH+CHACHA20:EECDH+SHA256+AES128:EECDH+SHA384+AES25 6:EDH+SHA256+AES128:EDH+SHA256+AES256:EECDH+SHA1+AES128:EECDH+SHA1+AES256:EDH+SH A1+AES128:EDH+SHA1+AES256:EECDH+HIGH:EDH+HIGH:AESGCM+AES128:AESGCM+AES256:CHACHA 20:SHA256+AES128:SHA256+AES256:SHA1+AES128:SHA1+AES256:HIGH:!aNULL:!eNULL:!EXPOR T:!DES:!RC4:!3DES:!MD5:!PSK:!KRB5:!aECDH:!kDH
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1
ssl_prefer_server_ciphers = yes
userdb {
args = uid=popuser gid=popuser
driver = static
}
protocol imap {
mail_plugins = " quota imap_quota"
}
protocol pop3 {
pop3_uidl_format = UID%u-%v
}
protocol lda {
mail_plugins = " quota sieve"
}
local_name domain.com {
ssl_cert = </opt/psa/var/certificates/scfyOUL15
ssl_key = # hidden, use -P to show it
}
local_name mail.hotelmeritoria.com {
ssl_cert = </opt/psa/var/certificates/scfyOUL15
ssl_key = # hidden, use -P to show it
}
local_name domain.org {
ssl_cert = </opt/psa/var/certificates/scfIi4CKT
ssl_key = # hidden, use -P to show it
}
local_name domain.org {
ssl_cert = </opt/psa/var/certificates/scfIi4CKT
ssl_key = # hidden, use -P to show it
}

Grateful if I could get some advice on resolving this issue.
 
Hi Jedi, Unfortunately not! So i had to use a workaround to achieve the task I was attempting to handle using the doveadm utility.
 
Might have TWO solutions for you fine folks. Ran into the same problem. I had a cron job that was:

@daily doveadm expunge -A mailbox Junk savedbefore 2w;doveadm expunge -A mailbox Trash savedbefore 2w

This job clears out old emails in the Junk and then the Trash folders if they were moved there more than two weeks ago. The problem, as identified in this server-fault forum post, is that the username that doveadm is using may not be the usernames that you are using. For example, dovecot expects the username and not [email protected]. The way I configured my dovecot instance was that usernames and emails are the same.

The supposedly easy fix is to modify your /etc/dovecot/dovecot-sql.conf.ext with the following line:

iterate_query = SELECT *yourusernameField* AS user FROM *yourUserTable*;

Swap out your info between replace the asterisks with your information. Mine looked like this:

iterate_query = SELECT email AS user FROM virtual_users;

Tbh, mine actually looked like this to strip off the domain:
iterate_query = SELECT SUBSTRING_INDEX(email,'@',1) AS user FROM virtual_users;

However, that still didn't work when I ran

doveadm expunge -A mailbox Junk savedbefore 2w

Luckily, there is another option for doveadm expunge. The "-F" which takes the list of users from a file. I made the file /etc/dovecot/userList.txt and adding in my users, one per line. I then ran:
Sudo doveadm expunge -F /etc/dovecot/userList.txt mailbox Junk savedbefore 2w

And if worked! Hope this helps!
 
Back
Top