hints [was: Long, folded "To:" line]

David Relson relson at osagesoftware.com
Wed Sep 3 01:15:12 CEST 2003


On 03 Sep 2003 08:55:43 +1000
michael at optusnet.com.au wrote:

> David Relson <relson at osagesoftware.com> writes:
> [...]
> > Jason,
> > 
> > The following patch prevents a very, very long unfolded line from
> > overflowing the buffer.  Flex-2.5.4 uses an 8k buffer and your
> > message's folded "To:" line has 9k - thus the problem.  Since the
> > standards specify the line length not exceed 998 chars, this should
> > be fine (with the extra addresses not being tagged as "to:userid").
> 
> Careful. Doesn't the RFC talk about the _folded_ line length
> not exceeding 998 chars?

Greetings Michael,

Indeed, I believe you're right.  How do _you_ think such long lines
should be handled?  The patch allows a very long line, that will have
its tokens tagged (if it's a To:, From:, Return-Path:, or Subject:
line), though folds after the max length aren't tagged.

At the moment bogofilter only has one such special token,
spc:invalid_end_of_header.  We could add "spc:LineTooLong.  Have you
other hints that ought to be added?

By the way, with the new bogoreader.c module, there's now a good place
for doing end-of-message processing (such as adding special tokens).

David

> 
> Also, might it be a good idea to add a token when we detect
> non-RFC compliant email? (':LineTooLong' or something).
> 
> Michael.




More information about the Bogofilter mailing list