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:

diff --git a/src/cleanup/cleanup_message.c b/src/cleanup/cleanup_message.c
index 47b7177..b0ae686 100644
--- a/src/cleanup/cleanup_message.c
+++ b/src/cleanup/cleanup_message.c
@@ -385,11 +385,15 @@ static const char *cleanup_act(CLEANUP_STATE *state, char 
*context,
     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);
+               return (buf);
+           }
+           cleanup_act_log(state, "prepend", context, buf, optional_text);
+           cleanup_out_header(state, optional_text);
        } else {
            cleanup_act_log(state, "prepend", context, buf, optional_text);
            cleanup_out_string(state, REC_TYPE_NORM, optional_text);

-- 
        Viktor.

Reply via email to