Reproducer:

# useradd -c " " myuser  # or more whitespaces
# su - myuser
$ echo | mail -s TEST root@localhost
# journalctl -u postfix | tail
Jun 30 13:31:13 vm-postfix8 postfix/pickup[4476]: 91309115983C:
uid=1000 from=<myuser>
Jun 30 13:31:13 vm-postfix8 postfix/pickup[4476]: warning:
maildrop/D19752025C83: error writing 91309115983C: queue file write
error
Jun 30 13:31:13 vm-postfix8 postfix/master[4475]: warning: process
/usr/libexec/postfix/cleanup pid 4797 killed by signal 11

Attached workaround patch.

It seems postfix-3.6.1 is also affected. The postfix-2 wasn't
affected, that's why I flagged it as a regression.

Original downstream bug report including the debug analysis:
https://bugzilla.redhat.com/show_bug.cgi?id=1977732

Debug analysis and reproducer provided by Renaud Métrich <rmetr...@redhat.com>

thanks & regards

Jaroslav
diff --git a/src/cleanup/cleanup_message.c b/src/cleanup/cleanup_message.c
index 391c711..be5ce42 100644
--- a/src/cleanup/cleanup_message.c
+++ b/src/cleanup/cleanup_message.c
@@ -773,6 +773,8 @@ static void cleanup_header_done_callback(void *context)
 		    /* Normalize whitespace. */
 		    token = tok822_scan_limit(state->fullname, &dummy_token,
 					      var_token_limit);
+		    if (!token)
+				token = tok822_alloc(TOK822_QSTRING, state->fullname);
 		} else {
 		    token = tok822_alloc(TOK822_QSTRING, state->fullname);
 		}

Reply via email to