John Fawcett wrote: > Ken Murchison wrote: > >>[EMAIL PROTECTED] wrote: >> >> >>>Hello list, >>> >>>We're currently running Cyrus IMAP 2.2.8 and having the following >>>problem. >>>When a message arrives via LMTP with the header "Subject: >>>SUBJECTLINE\r\r\n" the message i broken and all other header-lines after >>>this line are put in the body! This is not cute at all .. >>> >>>I suppose this "conversion" happens in spool_copy_msg()? >> >> >>Cyrus isn't converting anything. What you're seeing is GIGO (garbage >>in, garbage out). The message is broken per RFC 2822. You should >>complain about the software that generated this message. >> > > cyrus will convert bare \r to \r\n. So the above sequence would > become \r\n\r\n. This is the sequence (ie a blank line) which > indicates the end of the header section, so this would explain > precisely the behavious that is being seen. > > What alternative behaviour would be correct? I suspect that it would > be better to remove \r instead of adding an extra \n as currently > happens. An alternative would be to reject malformed messages > instead of attepting to fix the message and getting it wrong. > > Anyone know of a good reason why cyrus converts bare \r to \r\n? > > John
Following up to my own post: I just took another look at the code. Cyrus doesn't convert bare \r to \r\n as I suggested, but bare \n to \r\n. Instead bare \r are just dropped. so that doesn't explain at all what was being seen. I don't think the above issue results from these conversions in spool_copy_msg(). John > >>>The message pass through Exim, Amavis and SpamAssassin without any >>>problem before it's reaching Cyrus. >>> >>>Somebody have an idea how to correct this properly? >> >> >>If you want to build more intelligence into Cyrus' message parsing, we'd >>be glad to look at a patch, but we're not going to expend a lot of >>energy trying to "fix" broken messages. >> > > > --- > Cyrus Home Page: http://asg.web.cmu.edu/cyrus > Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu > List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html --- Cyrus Home Page: http://asg.web.cmu.edu/cyrus Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html