Message contains invalid header

Andrew Morgan morgan at orst.edu
Fri Oct 27 13:32:37 EDT 2006


On Fri, 27 Oct 2006, Marten Lehmann wrote:

> Hello,
>
>> But your Cyrus IMAPd has to work with these headers! It has to be able
>> to sort by date, search for message ID, index the body, search for any
>> header field! So you cannot just ignore errors in Cyrus.
>
> yes, I understand. But I don't know which characters are problematic for 
> Cyrus. I just see the message "Message containes invalid headers". So what? 
> Is it an empty Message-ID? Is it a NUL-character? Is it 8bit in header where 
> usually only 7bit is allowed (munge8bit is false in our setup)? There is now 
> documentation on this. Do I have to be a programmer in watch through thousand 
> lines of source code to find it out? Actually, I just want to use Cyrus, not 
> change it.

Looking at the source code, it appears that error message is only 
generated when there is an empty Message-ID: header.  As other people have 
said, there are ways to have your MTA fix-up the Message-ID: header 
before the message is handed to Cyrus.

There are separate error messages for other conditions:

     case IMAP_MESSAGE_CONTAINSNULL:
         prot_printf(pout, "554 5.6.0 Message contains NUL characters\r\n");
         break;

     case IMAP_MESSAGE_CONTAINSNL:
         prot_printf(pout, "554 5.6.0 Message contains bare newlines\r\n");
         break;

     case IMAP_MESSAGE_CONTAINS8BIT:
         prot_printf(pout, "554 5.6.0 Message contains non-ASCII characters in headers\r\n");
         break;

     case IMAP_MESSAGE_BADHEADER:
         prot_printf(pout, "554 5.6.0 Message contains invalid header\r\n");
         break;



 	Andy


More information about the Info-cyrus mailing list