diff -r a0c3daf7e501 src/deliver/deliver.c
--- a/src/deliver/deliver.c	Mon Aug 13 18:00:18 2007 +0300
+++ b/src/deliver/deliver.c	Tue Aug 14 16:47:34 2007 +0100
@@ -16,6 +16,7 @@
 #include "strescape.h"
 #include "var-expand.h"
 #include "message-address.h"
+#include "message-parser.h"
 #include "istream-header-filter.h"
 #include "mbox-storage.h"
 #include "dict-client.h"
@@ -410,6 +411,18 @@ static const char *address_sanitize(cons
 	return ret;
 }
 
+static void save_header_callback(struct message_header_line *hdr,
+                                 bool *matched, void *context)
+{
+	i_assert(matched && context == NULL);
+	if (hdr != NULL) {
+		if (strncmp(hdr->name, "From ", 5) == 0) {
+			*matched = TRUE;
+		}
+	}
+	return;
+}
+
 static struct istream *create_mbox_stream(int fd, const char *envelope_sender)
 {
 	const char *mbox_hdr;
@@ -426,7 +439,7 @@ static struct istream *create_mbox_strea
 						     HEADER_FILTER_NO_CR,
 						     mbox_hide_headers,
 						     mbox_hide_headers_count,
-						     NULL, NULL);
+						     save_header_callback, NULL);
 	i_stream_unref(&input);
 
 	input_list[0] = i_stream_create_from_data(default_pool, mbox_hdr,
