You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2007/10/09 19:13:13 UTC

Re: header lines being folded into one?

Per Jessen writes:
> Mark Martinec wrote:
> 
> > Per,
> > 
> >> X-Originating-IP: [17.148.16.66]
> >> X-Originating-IP: 134.32.140.207
> > ...
> >> It looks to me like the two X-Originating-IP lines are merged into
> >> one, and my regex is then applied to:
> >>
> >> X-Originating-IP: [17.148.16.66]134.32.140.207
> > 
> > True (with newline inbetween).
> > 
> >> Is this normal/correct behaviour?
> > 
> > Don't know, it seems it has been designed that way purposely,
> > but it causes surprises and unexpected matching when same
> > header field name occurs more than once in a message.
> > This was already mentioned on the list. A workaround is
> > to use a /m flag on almost any regexp in rules, especially
> > those which use anchors (^ and $), e.g.:
> > 
> >   header L_LANIECA_S1 Subject =~ /^(girls|love|screensaver)$/m
> > 
> > To me it looks like a misfeature.
> 
> Yeah, that was my thought too.  At the very least it's
> counter-intuitive.  Thanks for the /m hint. 

Yeah -- it's long-standing, but surprising, behaviour.  it should probably
be documented in the Conf manpage somewhere...

--j.