[Dovecot] possible dovecot problem (fwd)
Timo Sirainen
tss at iki.fi
Fri May 23 02:03:32 EEST 2003
On Fri, 2003-05-23 at 01:06, Mark E. Mallett wrote:
> > Maybe Dovecot is parsing the headers wrong in some conditions. Can you
> > reproduce this in some way? The invalid envelope headers are probably
> > cached in index file, deleting that should probably fix this for at
> > least the old messages?
>
> I was able to reproduce it without any effort.
Ah, yes. The "end of header" was treated as duplicate of last header
except with empty value.
Hmm. Maybe I should also handle differently the cases when same header
occurs multiple times.. Or maybe not, RFC2822 doesn't allow them more
than once anyway..
Index: message-parser.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-mail/message-parser.c,v
retrieving revision 1.39
diff -u -r1.39 message-parser.c
--- message-parser.c 3 May 2003 17:28:20 -0000 1.39
+++ message-parser.c 22 May 2003 23:00:04 -0000
@@ -680,7 +680,8 @@
if (size == 0 || (size == 1 && msg[0] == '\r')) {
/* end of headers */
line->eoh = TRUE;
- line->name_len = line->value_len = 0;
+ line->name_len = line->value_len = line->full_value_len = 0;
+ line->name = ""; line->value = line->full_value = NULL;
} else if (line->continued) {
line->value = msg;
line->value_len = size;
More information about the dovecot
mailing list