Re: Malformed header - what would you do?

Paul Smith <[email protected]>
Newsgroups gmane.ietf.rfc822
Message-ID <[email protected]>
At 08:43 15/07/2005, Adam M. Costello wrote:

>Paul Smith <[email protected]> wrote:
>
>Your software is correct, and the Microsoft software is incorrect.

That was my feeling ;)


> > Is the software adding the 'X-SPAM-STATUS' line wrong (ie is it
> > allowed to have FWS at the end of a line and put a CRLF before that
> > final FWS)?
>
>That software is wrong according to RFC-2822, which is only four years
>old.  It forbids the creation of messages containing whitespace-only
>lines in the header, but still requires all parsers to handle them
>properly, because they were valid under RFC-822.

Ah, I've just found that in section 3.2.3 - I'd been studying section 2.2.x 
madly looking for something saying that, but couldn't find it (otherwise, 
I'd probably not have asked the question here)

> > What would you do?  Is our software wrong?
>
>Your software is not wrong to simply add a header field.  One thing
>you might consider is to first repair the header by removing all
>whitespace-only lines, or just whitespace-only lines at the end of the
>header, if that's easier.  In general, mucking with somebody else's
>headers is a no-no and is dangerous, but this would just be a form of
>refolding (which is supposed to be safe) for the purpose of making the
>message more conformant to RFC-2822, so it's probably justifiable (in my
>opinion).

Yep - now I've found that bit in section 3.2.3 of RFC 2822, I'll probably 
strip out any whitespace only header lines (with an option to leave them 
in, in case it causes problems for someone for some odd reason..)

Thanks for the pointers.


Paul                            VPOP3 - Internet Email Server/Gateway
[email protected]                      http://www.pscs.co.uk/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.