Viktor Dukhovni: > On Wed, Sep 30, 2015 at 12:54:51PM +0200, Daniel Caillibaud wrote: > > > I have quite a lot (~200 / day) > > panic: cleanup_find_header_start: short header without padding > > in my mail.log > > The patch below might help:
To avoid a segfault, use the patch below. This applies to all supported Postfix releases (2.9 and onwards). Wietse --- /var/tmp/postfix-3.1-20150924/src/cleanup/cleanup_message.c 2014-12-06 20:35:33.000000000 -0500 +++ src/cleanup/cleanup_message.c 2015-10-03 20:24:20.000000000 -0400 @@ -385,11 +385,19 @@ if (STREQUAL(value, "PREPEND", command_len)) { if (*optional_text == 0) { msg_warn("PREPEND action without text in %s map", map_class); - } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0 - && !is_header(optional_text)) { - msg_warn("bad PREPEND header text \"%s\" in %s map -- " - "need \"headername: headervalue\"", - optional_text, map_class); + } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0) { + if (!is_header(optional_text)) { + msg_warn("bad PREPEND header text \"%s\" in %s map -- " + "need \"headername: headervalue\"", + optional_text, map_class); + } else { + VSTRING *temp; /* XXX Impedance mismatch. */ + + cleanup_act_log(state, "prepend", context, buf, optional_text); + temp = vstring_import(mystrdup(optional_text)); + cleanup_out_header(state, temp); + vstring_free(temp); + } } else { cleanup_act_log(state, "prepend", context, buf, optional_text); cleanup_out_string(state, REC_TYPE_NORM, optional_text);