Double Carriage return breaks header ..

John Fawcett johnml at michaweb.net
Sat May 28 09:27:19 EDT 2005


Ken Murchison wrote:
> lists-cyrus at tripnet.se 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

>>
>> 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




More information about the Info-cyrus mailing list