OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: CRLF Was: Postfix with entourage

From: Wietse Venema (wietseporcupine.org)
Date: Fri Jan 02 2004 - 12:24:43 CST


Luca Berra:
> On Fri, Jan 02, 2004 at 12:26:26PM -0500, Wietse Venema wrote:
> >Luca Berra:
> >> speaking of <CR> without <LF> i am receiving a lot of spam with bare
> >> <CR> in the headers, and at least one with a <CR> in the body.
> >> I'd like to stop it, do i have to use header/body checks or did i miss
> >> something?
> >> L.
> >
> >Quoting from smtp_stream.c, this is how Postfix handles some common
> >protocol violations.
> >
> > /*
> > * Strip off the record terminator: either CRLF or just bare LF.
> > *
> > * XXX RFC 2821 disallows sending bare CR everywhere. We remove bare CR
> > * if received before CRLF, and leave it alone otherwise.
> > */
>
> would you consider adding some code for strict rfc2821 compliance, i
> think i can produce a patch for it. (i deliver all my mail to a cyrus
> server that just rejects it anyway)

At this level you cannot enforce compliance. You can only modify
or delete non-compliant data.

Whether I would take a patch depends on the code.

- No changes to the read-a-character loop.

- Must tolerate RFC821 compliant data.

        Wietse