Hi,
I must be doing something terribly wrong, but I am not able to get a non empty response from doveadm HTTP API when using userFile parameter. E. g. in getQuota or search command. Single user or wildcard working as expected.
./doveadm_cli.py --apikey $key --apiurl http://localhost:8180/doveadm/v1 (doveadm) quotaGet userFile=/tmp/f [] Results: 0
cat /tmp/f box1@domain.tld box2@domain.tld
Result with plain cURL is exactly the same. curl -X POST http://localhost:8180/doveadm/v1 -H "Content-Type: application/json" -H "Authorization: X-Dovecot-API xxx" -d '[["quotaGet",{"userFile":"/tmp/f"},"tag1"]]' [["doveadmResponse",[],"tag1"]]
Doveadm binary has no problem of reading that file. In a debug log I can see request finishes after "Handling LIST request" and does not jump to "Handling USER request" as in doveadm (binary) case. Am I missing something?
dovecot: doveadm(::1): Executing command quota get dovecot: doveadm: Debug: auth-master: userdb list: Started listing users (user_mask=*) dovecot: doveadm: Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb: Connecting dovecot: doveadm: Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb (pid=13811,uid=0): Client connected (fd=8) dovecot: doveadm(::1): Debug: auth-master: userdb list: Finished listing users dovecot: doveadm(::1): Debug: auth-master: conn unix:/var/run/dovecot/auth-userdb (pid=13811,uid=0): Disconnected: Connection closed (fd=8) dovecot: auth: Debug: master in: LIST#0111#011user=* dovecot: doveadm(::1): doveadm: ::1 - - "POST /doveadm/v1 HTTP/1.1" 200 77 "http://localhost:8180/doveadm/v1" "python-requests/2.6.0 CPython/2.7.5" dovecot: auth-worker(13875): Debug: Loading modules from directory: /usr/lib64/dovecot/auth dovecot: auth-worker(13875): Debug: Module loaded: /usr/lib64/dovecot/auth/lib20_auth_var_expand_crypt.so dovecot: auth-worker(13875): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_mysql.so dovecot: auth-worker(13875): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): Server accepted connection (fd=15) dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): Sending version handshake dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): auth-worker<1>: Handling LIST request dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): auth-worker<1>: sql(*): Performing userdb lookup dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): auth-worker<1>: sql(*): SELECT email AS user FROM mailbox WHERE active=1 dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): auth-worker<1>: sql(*): Finished userdb lookup dovecot: auth-worker(13875): Debug: conn unix:auth-worker (pid=13839,uid=97): auth-worker<1>: Finished
doveconf -n # 2.3.14 (cee3cbc0d): /etc/dovecot/dovecot.conf # Pigeonhole version 0.5.14 (1b5c82b2) # OS: Linux 3.10.0-862.2.3.el7.x86_64 x86_64 CentOS Linux release 7.5.1804 (Core) # Hostname: xxx auth_debug = yes auth_mechanisms = plain login cram-md5 auth_verbose = yes default_client_limit = 6000 default_process_limit = 512 disable_plaintext_auth = no doveadm_api_key = # hidden, use -P to show it mail_debug = yes mail_home = /h/v/%d/%n mail_location = maildir:~/Maildir mail_plugins = quota managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext mbox_write_locks = fcntl namespace inbox { inbox = yes list = yes location = mailbox "Deleted Items" { special_use = \Trash } mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Items" { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Spam { special_use = \Junk } mailbox Trash { special_use = \Trash } prefix = type = private } passdb { args = /etc/dovecot/local-sql.conf driver = sql } plugin { quota = maildir quota_grace = 10M quota_rule2 = Kos:storage=+100M quota_rule3 = Trash:storage=+100M quota_rule4 = Deleted Messages:storage=+100M quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Mailbox is full quota_status_success = DUNNO sieve = file:~/sieve;active=~/.dovecot.sieve } service auth-worker { idle_kill = 30 secs } service auth { unix_listener /var/spool/postfix/private/auth { group = mail mode = 0660 user = postfix } unix_listener auth-userdb { mode = 0600 user = vmail } } service doveadm { client_limit = 1 inet_listener http { address = localhost port = 8180 } process_min_avail = 1 unix_listener doveadm-server { mode = 0600 user = vmail } user = vmail } service imap-login { process_limit = 4096 process_min_avail = 10 service_count = 1 } service imap { process_limit = 4096 } service lmtp { process_min_avail = 5 unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } user = vmail } service pop3-login { client_limit = 2048 } service quota-status { client_limit = 1 executable = quota-status -p postfix process_min_avail = 5 unix_listener /var/spool/postfix/private/dovecot-quota-status { group = postfix mode = 0600 user = postfix } user = vmail } ssl_ca =
Kind regards, Libor