use "_" instead of " " as new line substitute, do not delete trailing new line
diff --git a/src/mail/ngx_mail_smtp_handler.c b/src/mail/ngx_mail_smtp_handler.c
index 1a69602..96cb762 100644
--- a/src/mail/ngx_mail_smtp_handler.c
+++ b/src/mail/ngx_mail_smtp_handler.c
@@ -539,15 +539,7 @@
             continue;
         }
 
-        cmd.data[i] = ' ';
-    }
-
-    while (i) {
-        if (cmd.data[i - 1] != ' ') {
-            break;
-        }
-
-        i--;
+        cmd.data[i] = '_';
     }
 
     cmd.len = i;