Re: [exim] how exim parses multiple headers into variables

Top Pagina
Delete this message
Reply to this message
Auteur: Heiko Schlittermann
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] how exim parses multiple headers into variables
Hi,

Marc Haber <mh+exim-users@???> (Do 30 Apr 2015 17:30:26 CEST):
> On Thu, 30 Apr 2015 16:15:05 +0200, Heiko Schlittermann
> <hs@???> wrote:
> >    Headers add "X-torres-Spam-Score: -4.2\n-4.4\n"

>
> The problem is that a header line beginning with "-" is regarded as
> beginning of the body, at least by mutt.


Mutt even considers a line w/o a leading minus sign as the beginning of
the body. I just checked it in mutt, it seems to autoconvert

    X-Torres-Spam-Score: 4.5
    -4.5


to
    X-Torres-Spam-Score: 4.5


    -4.5


And this change is written to the message file! (At least if I use a
local maildir storage).

Seing this, there is no bug in Exim. Exim does just what you told it to
do. As indicated by the filter test output.


> This causes the better part
> of the actual header to be displayed in the body pane. As far as I
> remember, a proper header line either starts with whitespace or with a
> Header Name followed by a colon.


Yes, I just wanted to check if your filter test output does not differ
from that one I get.

Using 'headers add "x-torres-spam-score: $h_x-spam-score"' IS wrong.
For that reason I proposed the solution using reduce{}, that does
basically the same as the sg{} solution from Marc. Both may be
considered ugly, but the reduce{} at least treats the $h_x-spam-score
as what it is - a '\n' delimted LIST of header values.

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -