From: Timo Sirainen Date: Fri, 27 May 2016 09:49:30 +0000 (+0300) Subject: lmtp, quota-status: Don't send mail_storage_service_lookup() error to client. X-Git-Tag: 2.3.0.rc1~3627 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6008a666d9c3df66fd8a437369133e8519b4e24;p=thirdparty%2Fdovecot%2Fcore.git lmtp, quota-status: Don't send mail_storage_service_lookup() error to client. This is in preparation for changing the returned error to contain the full error string. The current error string is pretty useless for any purpose. --- diff --git a/src/lmtp/commands.c b/src/lmtp/commands.c index 77d271cb7b..49abcafd61 100644 --- a/src/lmtp/commands.c +++ b/src/lmtp/commands.c @@ -627,7 +627,7 @@ int cmd_rcpt(struct client *client, const char *args) { struct mail_recipient *rcpt; struct mail_storage_service_input input; - const char *params, *address, *username, *detail, *prefix; + const char *params, *address, *username, *detail; const char *const *argv; const char *error = NULL; char delim = '\0'; @@ -691,9 +691,8 @@ int cmd_rcpt(struct client *client, const char *args) &rcpt->service_user, &error); if (ret < 0) { - prefix = t_strdup_printf(ERRSTR_TEMP_USERDB_FAIL_PREFIX, - username); - client_send_line(client, "%s%s", prefix, error); + i_error("Failed to lookup user %s: %s", username, error); + client_send_line(client, ERRSTR_TEMP_MAILBOX_FAIL, address); return 0; } if (ret == 0) { diff --git a/src/plugins/quota/quota-status.c b/src/plugins/quota/quota-status.c index 53164b282f..f2ab82ee95 100644 --- a/src/plugins/quota/quota-status.c +++ b/src/plugins/quota/quota-status.c @@ -117,7 +117,11 @@ static void client_handle_request(struct quota_client *client) value = t_strdup(value); /* user's pool is being freed */ mail_user_unref(&user); mail_storage_service_user_free(&service_user); + } else { + i_error("Failed to lookup user %s: %s", input.username, error); + error = "Temporary internal error"; } + if (ret < 0) { /* temporary failure */ o_stream_send_str(client->conn.output, t_strdup_printf(