doveadm: problem listing shared mailboxes using a wildcard
I'm setting up a dovecot server with private and shared namespaces. My test setup has these mailboxes:
# /bin/doveadm mailbox list -u fdl01@spike.test INBOX/sub01 shared shared/sammel01@spike.test shared/sammel02@spike.test INBOX
In order to do some post-login scripting foo I'd like to get a list of shared mailboxes the user is currently subscribed to. The doveadm-mailbox man page says "It's also possible to use wildcards in the mailbox name."
I'd like to use that feature to output only mailboxes from the shared namespace. However usind the wildcard character * doesn't output anything:
# /bin/doveadm mailbox list -u fdl01@spike.test -s shared* #
Am I doing something wrong?
p@rick
P.S. Running dovecot-2.2.10-8.el7.x86_64 on a centos server.
-- [*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
You might need to quote that last argument, otherwise it can get interpreted by the shell as globbing, which obviously is not what you want.
I've been using wildcard arguments enclosed within '' and "" for various doveadm commands without issues so far.
On 25.06.18 - 16:03, Patrick Ben Koetter wrote:
# /bin/doveadm mailbox list -u fdl01@spike.test -s shared*
Cheers, Thore
-- Thore Bödecker
GPG ID: 0xD622431AF8DB80F3 GPG FP: 0F96 559D 3556 24FC 2226 A864 D622 431A F8DB 80F3
- Thore Bödecker me@foxxx0.de:
You might need to quote that last argument, otherwise it can get interpreted by the shell as globbing, which obviously is not what you want.
I've been using wildcard arguments enclosed within '' and "" for various doveadm commands without issues so far.
Right. I had thought so too (and forgot to mention it in my intial post), but it doesn't make a difference:
# /bin/doveadm mailbox list -s -u fdl01@spike.test shared\* # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared*' # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared\*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared\*'
p@rick
-- [*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
Please provide doveconf -n
---Aki TuomiDovecot oy -------- Original message --------From: Patrick Ben Koetter p@sys4.de Date: 25/06/2018 17:21 (GMT+02:00) To: dovecot@dovecot.org Cc: Thore Bödecker me@foxxx0.de Subject: Re: doveadm: problem listing shared mailboxes using a wildcard
- Thore Bödecker me@foxxx0.de:
You might need to quote that last argument, otherwise it can get interpreted by the shell as globbing, which obviously is not what you want.
I've been using wildcard arguments enclosed within '' and "" for various doveadm commands without issues so far.
Right. I had thought so too (and forgot to mention it in my intial post), but it doesn't make a difference:
# /bin/doveadm mailbox list -s -u fdl01@spike.test shared\* # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared*' # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared\*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared\*'
p@rick
-- [*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
- Aki Tuomi aki.tuomi@dovecot.fi:
Please provide doveconf -n
[root@spike ~]# doveconf -n # 2.2.10: /etc/dovecot/dovecot.conf # OS: Linux 3.10.0-862.3.3.el7.x86_64 x86_64 CentOS Linux release 7.5.1804 (Core) xfs auth_debug = yes first_valid_uid = 1000 mail_debug = yes mail_location = sdbox:/srv/mail/%u mail_plugins = acl 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 ihave mbox_write_locks = fcntl namespace { ignore_on_failure = no list = children location = sdbox:%%h prefix = shared/%%u/ separator = / subscriptions = no type = shared } namespace inbox { ignore_on_failure = no inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = separator = / type = private } passdb { args = scheme=PLAIN username_format=%u /etc/dovecot/users default_fields = nopassword=y driver = passwd-file } plugin { acl = vfile acl_shared_dict = file:/var/lib/dovecot/db/shared-mailboxes.db sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } service auth { unix_listener auth-userdb { group = vmail mode = 0777 user = vmail } } service imap { executable = imap post-login } service post-login { executable = script-login /usr/local/bin/postlogin user = vmail } ssl = required ssl_cert =
---Aki TuomiDovecot oy -------- Original message --------From: Patrick Ben Koetter p@sys4.de Date: 25/06/2018 17:21 (GMT+02:00) To: dovecot@dovecot.org Cc: Thore Bödecker me@foxxx0.de Subject: Re: doveadm: problem listing shared mailboxes using a wildcard
- Thore Bödecker me@foxxx0.de:
You might need to quote that last argument, otherwise it can get interpreted by the shell as globbing, which obviously is not what you want.
I've been using wildcard arguments enclosed within '' and "" for various doveadm commands without issues so far.
Right. I had thought so too (and forgot to mention it in my intial post), but it doesn't make a difference:
# /bin/doveadm mailbox list -s -u fdl01@spike.test shared\* # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared*' # /bin/doveadm mailbox list -s -u fdl01@spike.test "shared\*" # /bin/doveadm mailbox list -s -u fdl01@spike.test 'shared\*'
p@rick
-- [*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
-- [*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64 Schleißheimer Straße 26/MG,80333 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263 Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief Aufsichtsratsvorsitzender: Florian Kirstein
On 25 Jun 2018, at 16.03, Patrick Ben Koetter p@sys4.de wrote:
In order to do some post-login scripting foo I'd like to get a list of shared mailboxes the user is currently subscribed to. The doveadm-mailbox man page says "It's also possible to use wildcards in the mailbox name."
I'd like to use that feature to output only mailboxes from the shared namespace. However usind the wildcard character * doesn't output anything:
# /bin/doveadm mailbox list -u fdl01@spike.test mailto:fdl01@spike.test -s shared*
The wildcards traverse only within the same namespace, so in this case the "shared/" namespace, which doesn't have any mailboxes (only child namespaces). Maybe we'll change this for v2.4.
participants (4)
-
Aki Tuomi
-
Patrick Ben Koetter
-
Thore Bödecker
-
Timo Sirainen