(proposed patch to maildrop/formatmbox.C attached)
This issue was reported to Debian BTS: http://bugs.debian.org/520344 on
Mar 2009 and I recently took part in its maintenance.
The maildrop's log file generates funny line when "from:" exists in the DKIM
header content like in the attached example mailbox.txt.
You can reproduce this by running:
/usr/bin/maildrop < mailbox.txt
This generate log entry as (space indented with | for readability):
|Date: Sun Jun 17 10:29:24 2012
|From: "Barnikow, Katja" <katja.barnikow@...>message-id:date:subject:con
I checked this source and I think I found the bug :-)
This bug is in maildrop/formatmbox.C where pointer skipping excess
whitespaces (but not banklines) at the start of line.
There is no need to do this since From: header always start at the first
character. Continuation lines in header files have leading space.
Patch is for upstream 2.5.5 version.
In old 2.0.3 source, this bug caused the From: header content to be
overwritten by the second match and not concatenated like now. It is
probably because 2.0.3 version was not using "bufp->append(p, l);" but
making simple assignment in the last part of this function.
So this patch should fix to match only ^From: but if this header exist
twice, those contents are concatenated (without space).