Thanks Aki,

We'll see if we can backport this internally to the version we're currently running as a temporary fix until we can do a proper upgrade.

Regards,

Chris

On 19/09/18 07:57, Aki Tuomi wrote:
Yeah. This is a bug, there is a fix pending.

 From bb200128c83610d213b2ff2e59f1e0440ecbd2c9 Mon Sep 17 00:00:00 2001
From: Aki Tuomi <aki.tu...@dovecot.fi>
Date: Tue, 18 Sep 2018 20:37:38 +0300
Subject: [PATCH] doveadm: Fix doveadm user output when called from server

Was forgotten in a13b1245bee0b6524b4aeb3c8fd9e34af648b746
---
  src/doveadm/doveadm-auth-server.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/doveadm/doveadm-auth-server.c 
b/src/doveadm/doveadm-auth-server.c
index 44278e467e..d9e4e01c74 100644
--- a/src/doveadm/doveadm-auth-server.c
+++ b/src/doveadm/doveadm-auth-server.c
@@ -170,6 +170,10 @@ cmd_user_list(struct auth_master_connection *conn,
        const char *username, *user_mask = "*";
        unsigned int i;
+ doveadm_print_init(DOVEADM_PRINT_TYPE_FORMATTED);
+       doveadm_print_formatted_set_format("%{username}\n");
+       doveadm_print_header_simple("username");
+
        if (users[0] != NULL && users[1] == NULL)
                user_mask = users[0];
@@ -180,7 +184,7 @@ cmd_user_list(struct auth_master_connection *conn,
                                break;
                }
                if (users[i] != NULL)
-                       printf("%s\n", username);
+                       doveadm_print(username);
        }
        if (auth_master_user_list_deinit(&ctx) < 0)
                i_fatal("user listing failed");

--
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

Reply via email to