HTTP DoveAdm API - Possible bug?

Chris Malton chris at deltav-tech.co.uk
Tue Sep 18 17:09:30 EEST 2018


Hi all,

It seems that setting userMask in the doveadm http api's "user" command 
to anything involving wildcards ?s or *s causes the API to fail.

When using the API with a userMask set to the fully qualified email 
address, I get the expected fields back.

 From a python shell, with an asterisk causes the following behaviour 
(note that doveadm is a python module that wrappers the dovecot API into 
Python's requests module).

 >>> doveadm.do_query("http://[xxxx:xxxx:xxxx:xxxx::ffff]:24280", 
"API_KEY_HERE", [ ["user", { "userMask": ["*"] }, "c01"] ])
'[["doveadmResponse",,"c01"]]'

If I run the same command with a valid mailbox in the userMask Field, I 
get the response I expect:

 >>> doveadm.do_query("http://[[xxxx:xxxx:xxxx:xxxx::ffff]:24280", 
"API_KEY_HERE", [ ["user", { "userMask": ["test at test.mydomain.com"] }, 
"c01"] ])
'[["doveadmResponse",{"test at test.mydomain.com":{"uid":"x","gid":"y","home":"/mail/test.mydomain.com/users/test","mail":"maildir:/mail/test.mydomain.com/users/test/Maildir/:INDEX=/indexes/test.mydomain.com/test","nice":"10"}},"c01"]]'


Chatting with people in #dovecot revealed similar behaviour elsewhere so 
it doesn't appear to be just me.  I've also selectively edited the above 
to avoid leaking data.

We're running on the following

# 2.2.34 (874deae): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.22 (22940fb7)
# OS: Linux 4.9.0-7-amd64 x86_64 Debian 9.5 ext4

If you need a full copy of the config, please let me know and I'll talk 
to my client, however, I don't think this is config related.

Thanks in advance.

Regards,

Chris Malton

-- 
Delta V Technologies Limited
03333 402 402    www.deltav-tech.co.uk
Office: 17 Elm Close, Southampton, SO16 7DT
Company No. 11006104 Registered in England and Wales



More information about the dovecot mailing list