[dovecot quota-status] error "Invalid character in path"

Stephan Bosch stephan at rename-it.nl
Wed Oct 31 04:05:50 EET 2018


Hi,


Op 18/10/2018 om 23:59 schreef k675154 at keit.eu:
> Hello,
>
> I'm using using:
> - dovecot 2.3.3 (dcead646b)
> - postfix 3.3.1
> - dovecot "quota = maildir:User quota"
>
> I'm facing the error:
>
> "quota-status: Error: quota-status: Client sent
> invalid recipient address: Invalid character in path"
>
> This occurred with this e-mail address:
> "John Smith"@keit.eu

That is weird. I just tested that the SMTP path parser in Dovecot 
correctly handles the address as you present it above. But I wonder what 
Postfix actually sends. Unfortunately, the current error message in 
quota-status is rather unhelpful in that regard. You could apply the 
following patch (against master, but v2.3 should be no problem) to get a 
better error message:

diff --git a/src/plugins/quota/quota-status.c 
b/src/plugins/quota/quota-status.c
index c88586d55..fdfd0fc4c 100644
--- a/src/plugins/quota/quota-status.c
+++ b/src/plugins/quota/quota-status.c
@@ -1,6 +1,7 @@
  /* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING 
file */

  #include "lib.h"
+#include "str-sanitize.h"
  #include "ostream.h"
  #include "connection.h"
  #include "restrict-access.h"
@@ -169,8 +170,8 @@ static int client_input_line(struct connection 
*conn, const char *line)
                         SMTP_ADDRESS_PARSE_FLAG_BRACKETS_OPTIONAL,
                         &client->recipient, &error) < 0) {
                         i_error("quota-status: "
-                               "Client sent invalid recipient address: %s",
-                               error);
+                               "Client sent invalid recipient address 
`%s': "
+                               "%s", str_sanitize(line + 10, 256), error);
                         return 0;
                 }
         } else if (str_begins(line, "size=")) {


> Well I know it is not a conventional address but it is normally
> perfectly authorized.

Yes, Dovecot v2.3 pays special attention to parse these correctly.
> When I disable quota check, I can received correctly the incoming
> e-mail.
>
> So is there a mean to enable quota check with this kind of e-mail
> address ?

Please try the patch.. then I can tell you more.

Regards,

Stephan.


More information about the dovecot mailing list