CRLF vs LF [was: ... writing out X-Bogosity header ... ]

David Relson relson at osagesoftware.com
Wed Feb 25 00:35:11 CET 2004


On Tue, 24 Feb 2004 14:17:44 -0500
Jim Correia wrote:

> On Feb 24, 2004, at 1:15 PM, Pavel Kankovsky wrote:

...[snip]...

> > No & no. Most, if not all, unix MTAs use LF alone to separate lines 
> > when
> > the mail is stored in a local file (e.g. a BSD mailbox) or fed to a
> > local process. CRLF is for SMTP (and, ehm, for certain backward
> > platforms).
> >
> > CRLF might be an option but it should not be the default setting.
> 
> Yeah - I did some more digging last night and discovered that at the 
> MTA level things are all LF based, so bogofilter was behaving 
> correctly.
> 
> I sent David private mail re: the patch and reworked my glue code to
> do the transformations before and after the fork (I was working on a 
> client side filter where the data uses CRLF network endings on both 
> sides of the call to bogofilter.)
> 
> - Jim

Greetings all,

A controversy!  Such fun!

The patch I made is adaptive, i.e. it looks at the first line of the
message and acts appropriately.  If the first line ends with LF, then
bogofilter will use LFs at the end of each line it adds.  If the first
line ends with CRLF, then bogofilter will use CRLFs.

In my linux/postfix/procmail, all that occurs are LFs.  However, I do
_know_ that bogofilter has encountered CRLFs.  So, even if there are no
problems in Jim's environment, he _did_ spot a problem.  That problem
has been fixed.

If the fix causes additional _real_ problems (not just suspected
problems), we'll deal with it.

David




More information about the Bogofilter mailing list