Message contains invalid header

Andrew Morgan morgan at orst.edu
Mon Oct 30 15:46:03 EST 2006


On Sat, 28 Oct 2006, Marten Lehmann wrote:

> Hi,
>
>>     case IMAP_MESSAGE_BADHEADER:
>>         prot_printf(pout, "554 5.6.0 Message contains invalid header\r\n");
>>         break;
>
> what can I do to fix these headers? I have one message (which appears to be 
> spam, but that is not the point), where I cannot find any problem. No 8bit 
> characters, no empty message-id header, what else could be wrong with it?

It looks like that particular error message can also be generated if a 
header contains ascii characters outside the decimal range 33-57, 59-126:

             if (!((c >= 33 && c <= 57) || (c >= 59 && c <= 126))) {
                 r = IMAP_MESSAGE_BADHEADER;
                 goto ph_error;
             }

Have a look at the message headers themselves (not the values stored in 
the headers).

 	Andy


More information about the Info-cyrus mailing list